From 04d70dc76d6fb27c58bb3d923a79910f7074f1eb Mon Sep 17 00:00:00 2001 From: aoowweenn Date: Sat, 31 Mar 2018 13:29:42 +0800 Subject: [PATCH 01/47] adjust encoding to fit the new utf8 library --- code/MMDPmxParser.cpp | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/code/MMDPmxParser.cpp b/code/MMDPmxParser.cpp index 2eb724a31..fa0d4b823 100644 --- a/code/MMDPmxParser.cpp +++ b/code/MMDPmxParser.cpp @@ -93,16 +93,13 @@ 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[targetSize] = { 0 }; + + utf8::utf16to8( sourceStart, sourceStart + size/2, targetStart ); - result.assign(targetReserved, targetStart - targetReserved); - delete[] targetReserved; + std::string result(targetStart); return result; } else @@ -474,7 +471,6 @@ namespace pmx void PmxSoftBody::Read(std::istream * /*stream*/, PmxSetting * /*setting*/) { - // 未実装 std::cerr << "Not Implemented Exception" << std::endl; throw; } @@ -510,7 +506,6 @@ 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) @@ -518,23 +513,20 @@ namespace pmx std::cerr << "invalid magic number." << std::endl; throw; } - // バージョン 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; } - // ファイル設定 this->setting.Read(stream); - // モデル情報 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(vertex_count); for (int i = 0; i < vertex_count; i++) @@ -542,7 +534,7 @@ namespace pmx vertices[i].Read(stream, &setting); } - // 面 + // read indices stream->read((char*) &index_count, sizeof(int)); this->indices = mmd::make_unique(index_count); for (int i = 0; i < index_count; i++) @@ -550,7 +542,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(texture_count); for (int i = 0; i < texture_count; i++) @@ -558,7 +550,7 @@ namespace pmx this->textures[i] = ReadString(stream, setting.encoding); } - // マテリアル + // read materials stream->read((char*) &material_count, sizeof(int)); this->materials = mmd::make_unique(material_count); for (int i = 0; i < material_count; i++) @@ -566,7 +558,7 @@ namespace pmx this->materials[i].Read(stream, &setting); } - // ボーン + // read bones stream->read((char*) &this->bone_count, sizeof(int)); this->bones = mmd::make_unique(this->bone_count); for (int i = 0; i < this->bone_count; i++) @@ -574,7 +566,7 @@ namespace pmx this->bones[i].Read(stream, &setting); } - // モーフ + // read morphs stream->read((char*) &this->morph_count, sizeof(int)); this->morphs = mmd::make_unique(this->morph_count); for (int i = 0; i < this->morph_count; i++) @@ -582,7 +574,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(this->frame_count); for (int i = 0; i < this->frame_count; i++) @@ -590,7 +582,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(this->rigid_body_count); for (int i = 0; i < this->rigid_body_count; i++) @@ -598,7 +590,7 @@ namespace pmx this->rigid_bodies[i].Read(stream, &setting); } - // ジョイント + // read joints stream->read((char*) &this->joint_count, sizeof(int)); this->joints = mmd::make_unique(this->joint_count); for (int i = 0; i < this->joint_count; i++) From 1ea723078590aca11a8fc55ba21799f0ef977f62 Mon Sep 17 00:00:00 2001 From: aoowweenn Date: Sat, 31 Mar 2018 14:06:26 +0800 Subject: [PATCH 02/47] Handle materials with texture id < 0 --- code/MMDImporter.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/MMDImporter.cpp b/code/MMDImporter.cpp index 76ad9115c..474586413 100644 --- a/code/MMDImporter.cpp +++ b/code/MMDImporter.cpp @@ -354,8 +354,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)); From 21b518e350383f3954111b11910f5af726b9c6a5 Mon Sep 17 00:00:00 2001 From: aoowweenn Date: Sat, 31 Mar 2018 14:44:18 +0800 Subject: [PATCH 03/47] use memset to allow VS compiler --- code/MMDPmxParser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/MMDPmxParser.cpp b/code/MMDPmxParser.cpp index fa0d4b823..2a6a20b48 100644 --- a/code/MMDPmxParser.cpp +++ b/code/MMDPmxParser.cpp @@ -95,7 +95,8 @@ namespace pmx // UTF16 to UTF8 const uint16_t* sourceStart = (uint16_t*)buffer.data(); const unsigned int targetSize = size * 3; // enough to encode - char targetStart[targetSize] = { 0 }; + char targetStart[targetSize]; + std::memset(targetStart, 0, targetSize * sizeof(char)); utf8::utf16to8( sourceStart, sourceStart + size/2, targetStart ); From 814b56e5e2c6da331c6b4f71b5f167ff2fa5afb1 Mon Sep 17 00:00:00 2001 From: wuxq Date: Sat, 28 Apr 2018 15:05:21 +0800 Subject: [PATCH 04/47] multi joint has bug with ReplaceData multi joint has a bug in ReplaceData_joint with "bin" change --- code/glTF2Exporter.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/glTF2Exporter.cpp b/code/glTF2Exporter.cpp index fcf8005ae..9bd9bae33 100644 --- a/code/glTF2Exporter.cpp +++ b/code/glTF2Exporter.cpp @@ -642,9 +642,8 @@ void ExportSkin(Asset& mAsset, const aiMesh* aimesh, Ref& meshRef, RefbufferView->byteLength; unsigned int s_bytesPerComp= ComponentTypeSize(ComponentType_UNSIGNED_SHORT); unsigned int bytesPerComp = ComponentTypeSize(vertexJointAccessor->componentType); - unsigned int s_bytesLen = bytesLen * s_bytesPerComp / bytesPerComp; Ref buf = vertexJointAccessor->bufferView->buffer; - uint8_t* arrys = new uint8_t[s_bytesLen]; + 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; @@ -655,7 +654,7 @@ void ExportSkin(Asset& mAsset, const aiMesh* aimesh, Ref& meshRef, RefReplaceData_joint(offset, bytesLen, arrys, s_bytesLen); + buf->ReplaceData_joint(offset, bytesLen, arrys, bytesLen); vertexJointAccessor->componentType = ComponentType_UNSIGNED_SHORT; p.attributes.joint.push_back( vertexJointAccessor ); From cc1bde0514773ff9b96ca2284215e20545017f4a Mon Sep 17 00:00:00 2001 From: wuxq Date: Tue, 8 May 2018 18:31:27 +0800 Subject: [PATCH 05/47] change the length of bufferView byteLength chang the joint attribute bufferView byteLength --- code/glTF2Exporter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/glTF2Exporter.cpp b/code/glTF2Exporter.cpp index 431046d72..041250bee 100644 --- a/code/glTF2Exporter.cpp +++ b/code/glTF2Exporter.cpp @@ -642,6 +642,7 @@ void ExportSkin(Asset& mAsset, const aiMesh* aimesh, Ref& meshRef, RefbufferView->byteLength; unsigned int s_bytesPerComp= ComponentTypeSize(ComponentType_UNSIGNED_SHORT); unsigned int bytesPerComp = ComponentTypeSize(vertexJointAccessor->componentType); + unsigned int s_bytesLen = bytesLen * s_bytesPerComp / bytesPerComp; Ref buf = vertexJointAccessor->bufferView->buffer; uint8_t* arrys = new uint8_t[bytesLen]; unsigned int i = 0; @@ -656,6 +657,7 @@ void ExportSkin(Asset& mAsset, const aiMesh* aimesh, Ref& meshRef, RefReplaceData_joint(offset, bytesLen, arrys, bytesLen); vertexJointAccessor->componentType = ComponentType_UNSIGNED_SHORT; + vertexJointAccessor->bufferView->byteLength = s_bytesLen; p.attributes.joint.push_back( vertexJointAccessor ); } From 94fb4ada1676b073ebc2984ed743c22c91fb870d Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 10 Aug 2018 22:39:35 +0200 Subject: [PATCH 06/47] Create Build.md Add prototype for build instructions --- Build.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 Build.md diff --git a/Build.md b/Build.md new file mode 100644 index 000000000..b548c1794 --- /dev/null +++ b/Build.md @@ -0,0 +1,7 @@ +# Build instructions + +> cmake CMakeLists.txt +make -j4 + +##UWP +See https://stackoverflow.com/questions/40803170/cmake-uwp-using-cmake-to-build-universal-windows-app From 78fe5e7f04c39698459d4c6dde0a4b01bbc7be36 Mon Sep 17 00:00:00 2001 From: Joe Schutte Date: Mon, 3 Sep 2018 11:33:56 -0700 Subject: [PATCH 07/47] Fix expensive memory allocation and memory copying occurring in obj files with a large number of meshes. --- code/ObjFileImporter.cpp | 43 ++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/code/ObjFileImporter.cpp b/code/ObjFileImporter.cpp index 2b6730e4e..cac0e8fa0 100644 --- a/code/ObjFileImporter.cpp +++ b/code/ObjFileImporter.cpp @@ -211,12 +211,29 @@ void ObjFileImporter::CreateDataFromImport(const ObjFile::Model* pModel, aiScene } if (pModel->m_Objects.size() > 0) { + + unsigned int meshCount = 0; + unsigned int childCount = 0; + + for(size_t index = 0; index < pModel->m_Objects.size(); ++index) { + if(pModel->m_Objects[index] > 0) { + ++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 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()]; @@ -287,9 +304,8 @@ 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 ) { unsigned int meshId = pObject->m_Meshes[ i ]; @@ -442,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 ]; @@ -770,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 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; } From 640698ba57adfa55dc294192720a68d52994d2a0 Mon Sep 17 00:00:00 2001 From: Joe Schutte Date: Mon, 3 Sep 2018 13:22:46 -0700 Subject: [PATCH 08/47] Fix compile error that clang caught. --- code/ObjFileImporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/ObjFileImporter.cpp b/code/ObjFileImporter.cpp index cac0e8fa0..93d48ba16 100644 --- a/code/ObjFileImporter.cpp +++ b/code/ObjFileImporter.cpp @@ -216,7 +216,7 @@ void ObjFileImporter::CreateDataFromImport(const ObjFile::Model* pModel, aiScene unsigned int childCount = 0; for(size_t index = 0; index < pModel->m_Objects.size(); ++index) { - if(pModel->m_Objects[index] > 0) { + if(pModel->m_Objects[index]) { ++childCount; meshCount += (unsigned int)pModel->m_Objects[index]->m_Meshes.size(); } From 2ee09b2528103d8cda0a6bb75f6199cfd4d0e74b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B6ber?= Date: Wed, 5 Sep 2018 15:49:15 +0200 Subject: [PATCH 09/47] Correct 3MF displaycolor import --- code/D3MFImporter.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/code/D3MFImporter.cpp b/code/D3MFImporter.cpp index e02c5f41d..e1a0d92d0 100644 --- a/code/D3MFImporter.cpp +++ b/code/D3MFImporter.cpp @@ -297,8 +297,9 @@ private: 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 ) { + if ( 9 != len && 7 != len) { return false; } @@ -313,26 +314,28 @@ private: ++buf; comp[ 1 ] = *buf; ++buf; - diffuse.r = static_cast( strtol( comp, NULL, 16 ) ); + diffuse.r = static_cast( strtol( comp, NULL, 16 ) ) / 255.0; comp[ 0 ] = *buf; ++buf; comp[ 1 ] = *buf; ++buf; - diffuse.g = static_cast< ai_real >( strtol( comp, NULL, 16 ) ); + diffuse.g = static_cast< ai_real >( strtol( comp, NULL, 16 ) ) / 255.0; comp[ 0 ] = *buf; ++buf; comp[ 1 ] = *buf; ++buf; - diffuse.b = static_cast< ai_real >( strtol( comp, NULL, 16 ) ); + diffuse.b = static_cast< ai_real >( strtol( comp, NULL, 16 ) ) / 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 ) ); + diffuse.a = static_cast< ai_real >( strtol( comp, NULL, 16 ) ) / 255.0; return true; } From c25a2dfc22ef47088d44f7dc83c3302ecc794168 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sat, 8 Sep 2018 19:15:56 +0200 Subject: [PATCH 10/47] Assbin: add unittest. --- code/AssbinExporter.cpp | 1012 ++++++++++++++-------------- code/AssbinExporter.h | 11 +- test/CMakeLists.txt | 1 + test/unit/utAssbinImportExport.cpp | 67 ++ 4 files changed, 583 insertions(+), 508 deletions(-) create mode 100644 test/unit/utAssbinImportExport.cpp diff --git a/code/AssbinExporter.cpp b/code/AssbinExporter.cpp index 2ca9b732c..a662e011e 100644 --- a/code/AssbinExporter.cpp +++ b/code/AssbinExporter.cpp @@ -244,585 +244,585 @@ size_t WriteArray(IOStream * stream, const T* in, unsigned int size) { 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 +// ---------------------------------------------------------------------------------- +/** @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; + +private: + // ------------------------------------------------------------------- + void Grow(size_t need = 0) { - private: + 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) )); - - const uint8_t* const old = buffer; - buffer = new uint8_t[new_size]; - - if (old) { - memcpy(buffer,old,cur_size); - delete[] old; - } - - cur_size = new_size; + 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; - } - - 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() { - // not implemented - } - - 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); - } - - memcpy(buffer+cursor, pvBuffer, pSize); - cursor += pSize; - - return pCount; - } - - }; - - // ---------------------------------------------------------------------------------- - /** @class AssbinExport - * @brief Assbin exporter class - * - * This class performs the .assbin exporting, and is responsible for the file layout. - */ - class AssbinExport + AssbinChunkWriter( IOStream * container, uint32_t magic, size_t initial = 4096) + : buffer(NULL), magic(magic), container(container), cur_size(0), cursor(0), initial(initial) { - private: - bool shortened; - bool compressed; + } - protected: - // ----------------------------------------------------------------------------------- - void WriteBinaryNode( IOStream * container, const aiNode* node) - { - AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AINODE ); + 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; + } - unsigned int nb_metadata = (node->mMetaData != NULL ? node->mMetaData->mNumProperties : 0); + void * GetBufferPointer() { return buffer; } - Write(&chunk,node->mName); - Write(&chunk,node->mTransformation); - Write(&chunk,node->mNumChildren); - Write(&chunk,node->mNumMeshes); - Write(&chunk,nb_metadata); + // ------------------------------------------------------------------- + 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 + } - for (unsigned int i = 0; i < node->mNumMeshes;++i) { - Write(&chunk,node->mMeshes[i]); - } + virtual size_t FileSize() const { + return cursor; + } - for (unsigned int i = 0; i < node->mNumChildren;++i) { - WriteBinaryNode( &chunk, node->mChildren[i] ); - } + // ------------------------------------------------------------------- + virtual size_t Write(const void* pvBuffer, size_t pSize, size_t pCount) { + pSize *= pCount; + if (cursor + pSize > cur_size) { + Grow(cursor + pSize); + } - 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; + memcpy(buffer+cursor, pvBuffer, pSize); + cursor += pSize; - Write(&chunk, key); - Write(&chunk, type); - - switch (type) { - case AI_BOOL: - Write(&chunk, *((bool*) value)); - break; - case AI_INT32: - Write(&chunk, *((int32_t*) value)); - break; - case AI_UINT64: - Write(&chunk, *((uint64_t*) value)); - break; - case AI_FLOAT: - Write(&chunk, *((float*) value)); - break; - case AI_DOUBLE: - Write(&chunk, *((double*) value)); - break; - case AI_AISTRING: - Write(&chunk, *((aiString*) value)); - break; - case AI_AIVECTOR3D: - Write(&chunk, *((aiVector3D*) value)); - break; + 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; + +protected: + // ----------------------------------------------------------------------------------- + void WriteBinaryNode( IOStream * container, const aiNode* node) + { + AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AINODE ); + + unsigned int nb_metadata = (node->mMetaData != NULL ? node->mMetaData->mNumProperties : 0); + + Write(&chunk,node->mName); + Write(&chunk,node->mTransformation); + Write(&chunk,node->mNumChildren); + Write(&chunk,node->mNumMeshes); + Write(&chunk,nb_metadata); + + for (unsigned int i = 0; i < node->mNumMeshes;++i) { + Write(&chunk,node->mMeshes[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(&chunk, key); + Write(&chunk, type); + + switch (type) { + case AI_BOOL: + Write(&chunk, *((bool*) value)); + break; + case AI_INT32: + Write(&chunk, *((int32_t*) value)); + break; + case AI_UINT64: + Write(&chunk, *((uint64_t*) value)); + break; + case AI_FLOAT: + Write(&chunk, *((float*) value)); + break; + case AI_DOUBLE: + Write(&chunk, *((double*) value)); + break; + case AI_AISTRING: + Write(&chunk, *((aiString*) value)); + break; + case AI_AIVECTOR3D: + Write(&chunk, *((aiVector3D*) value)); + break; #ifdef SWIG - case FORCE_32BIT: + case FORCE_32BIT: #endif // SWIG - default: - break; - } - } - } - - // ----------------------------------------------------------------------------------- - void WriteBinaryTexture(IOStream * container, const aiTexture* tex) - { - AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AITEXTURE ); - - Write(&chunk,tex->mWidth); - Write(&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); - } + default: + break; } + } + } + // ----------------------------------------------------------------------------------- + void WriteBinaryTexture(IOStream * container, const aiTexture* tex) + { + AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AITEXTURE ); + + Write(&chunk,tex->mWidth); + Write(&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); + } } - // ----------------------------------------------------------------------------------- - void WriteBinaryBone(IOStream * container, const aiBone* b) - { - AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIBONE ); + } - Write(&chunk,b->mName); - Write(&chunk,b->mNumWeights); - Write(&chunk,b->mOffsetMatrix); + // ----------------------------------------------------------------------------------- + void WriteBinaryBone(IOStream * container, const aiBone* b) + { + AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIBONE ); - // for the moment we write dumb min/max values for the bones, too. - // maybe I'll add a better, hash-like solution later + Write(&chunk,b->mName); + Write(&chunk,b->mNumWeights); + Write(&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(&chunk,b->mWeights,b->mNumWeights); + } + + // ----------------------------------------------------------------------------------- + void WriteBinaryMesh(IOStream * container, const aiMesh* mesh) + { + AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIMESH ); + + Write(&chunk,mesh->mPrimitiveTypes); + Write(&chunk,mesh->mNumVertices); + Write(&chunk,mesh->mNumFaces); + Write(&chunk,mesh->mNumBones); + Write(&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(&chunk,c); + + aiVector3D minVec, maxVec; + if (mesh->mVertices) { if (shortened) { - WriteBounds(&chunk,b->mWeights,b->mNumWeights); + WriteBounds(&chunk,mesh->mVertices,mesh->mNumVertices); } // else write as usual - else WriteArray(&chunk,b->mWeights,b->mNumWeights); + else WriteArray(&chunk,mesh->mVertices,mesh->mNumVertices); } - - // ----------------------------------------------------------------------------------- - void WriteBinaryMesh(IOStream * container, const aiMesh* mesh) - { - AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIMESH ); - - Write(&chunk,mesh->mPrimitiveTypes); - Write(&chunk,mesh->mNumVertices); - Write(&chunk,mesh->mNumFaces); - Write(&chunk,mesh->mNumBones); - Write(&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(&chunk,c); - - aiVector3D minVec, maxVec; - if (mesh->mVertices) { - if (shortened) { - WriteBounds(&chunk,mesh->mVertices,mesh->mNumVertices); - } // else write as usual - else WriteArray(&chunk,mesh->mVertices,mesh->mNumVertices); - } - if (mesh->mNormals) { - if (shortened) { - WriteBounds(&chunk,mesh->mNormals,mesh->mNumVertices); - } // else write as usual - else WriteArray(&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(&chunk,mesh->mTangents,mesh->mNumVertices); - WriteArray(&chunk,mesh->mBitangents,mesh->mNumVertices); - } - } - for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_COLOR_SETS;++n) { - if (!mesh->mColors[n]) - break; - - if (shortened) { - WriteBounds(&chunk,mesh->mColors[n],mesh->mNumVertices); - } // else write as usual - else WriteArray(&chunk,mesh->mColors[n],mesh->mNumVertices); - } - for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_TEXTURECOORDS;++n) { - if (!mesh->mTextureCoords[n]) - break; - - // write number of UV components - Write(&chunk,mesh->mNumUVComponents[n]); - - if (shortened) { - WriteBounds(&chunk,mesh->mTextureCoords[n],mesh->mNumVertices); - } // else write as usual - else WriteArray(&chunk,mesh->mTextureCoords[n],mesh->mNumVertices); - } - - // 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 (mesh->mNormals) { if (shortened) { - unsigned int processed = 0; - for (unsigned int job;(job = std::min(mesh->mNumFaces-processed,512u));processed += job) { + WriteBounds(&chunk,mesh->mNormals,mesh->mNumVertices); + } // else write as usual + else WriteArray(&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(&chunk,mesh->mTangents,mesh->mNumVertices); + WriteArray(&chunk,mesh->mBitangents,mesh->mNumVertices); + } + } + for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_COLOR_SETS;++n) { + if (!mesh->mColors[n]) + break; - uint32_t hash = 0; - for (unsigned int a = 0; a < job;++a) { + if (shortened) { + WriteBounds(&chunk,mesh->mColors[n],mesh->mNumVertices); + } // else write as usual + else WriteArray(&chunk,mesh->mColors[n],mesh->mNumVertices); + } + for (unsigned int n = 0; n < AI_MAX_NUMBER_OF_TEXTURECOORDS;++n) { + if (!mesh->mTextureCoords[n]) + break; - const aiFace& f = mesh->mFaces[processed+a]; - uint32_t tmp = f.mNumIndices; + // write number of UV components + Write(&chunk,mesh->mNumUVComponents[n]); + + if (shortened) { + WriteBounds(&chunk,mesh->mTextureCoords[n],mesh->mNumVertices); + } // else write as usual + else WriteArray(&chunk,mesh->mTextureCoords[n],mesh->mNumVertices); + } + + // 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(&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( f.mIndices[i] ); hash = SuperFastHash(reinterpret_cast(&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( f.mIndices[i] ); - hash = SuperFastHash(reinterpret_cast(&tmp),sizeof tmp,hash); - } - } - Write(&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(&chunk,f.mNumIndices); - - for (unsigned int a = 0; a < f.mNumIndices;++a) { - if (mesh->mNumVertices < (1u<<16)) { - Write(&chunk,f.mIndices[a]); - } - else Write(&chunk,f.mIndices[a]); } } + Write(&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]; - // write bones - if (mesh->mNumBones) { - for (unsigned int a = 0; a < mesh->mNumBones;++a) { - const aiBone* b = mesh->mBones[a]; - WriteBinaryBone(&chunk,b); + static_assert(AI_MAX_FACE_INDICES <= 0xffff, "AI_MAX_FACE_INDICES <= 0xffff"); + Write(&chunk,f.mNumIndices); + + for (unsigned int a = 0; a < f.mNumIndices;++a) { + if (mesh->mNumVertices < (1u<<16)) { + Write(&chunk,f.mIndices[a]); + } + else Write(&chunk,f.mIndices[a]); } } } - // ----------------------------------------------------------------------------------- - void WriteBinaryMaterialProperty(IOStream * container, const aiMaterialProperty* prop) - { - AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIMATERIALPROPERTY ); - - Write(&chunk,prop->mKey); - Write(&chunk,prop->mSemantic); - Write(&chunk,prop->mIndex); - - Write(&chunk,prop->mDataLength); - Write(&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); - - Write(&chunk,mat->mNumProperties); - for (unsigned int i = 0; i < mat->mNumProperties;++i) { - WriteBinaryMaterialProperty( &chunk, mat->mProperties[i]); + // write bones + if (mesh->mNumBones) { + for (unsigned int a = 0; a < mesh->mNumBones;++a) { + const aiBone* b = mesh->mBones[a]; + WriteBinaryBone(&chunk,b); } } + } - // ----------------------------------------------------------------------------------- - void WriteBinaryNodeAnim(IOStream * container, const aiNodeAnim* nd) - { - AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AINODEANIM ); + // ----------------------------------------------------------------------------------- + void WriteBinaryMaterialProperty(IOStream * container, const aiMaterialProperty* prop) + { + AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIMATERIALPROPERTY ); - Write(&chunk,nd->mNodeName); - Write(&chunk,nd->mNumPositionKeys); - Write(&chunk,nd->mNumRotationKeys); - Write(&chunk,nd->mNumScalingKeys); - Write(&chunk,nd->mPreState); - Write(&chunk,nd->mPostState); + Write(&chunk,prop->mKey); + Write(&chunk,prop->mSemantic); + Write(&chunk,prop->mIndex); - if (nd->mPositionKeys) { - if (shortened) { - WriteBounds(&chunk,nd->mPositionKeys,nd->mNumPositionKeys); + Write(&chunk,prop->mDataLength); + Write(&chunk,(unsigned int)prop->mType); + chunk.Write(prop->mData,1,prop->mDataLength); + } - } // else write as usual - else WriteArray(&chunk,nd->mPositionKeys,nd->mNumPositionKeys); - } - if (nd->mRotationKeys) { - if (shortened) { - WriteBounds(&chunk,nd->mRotationKeys,nd->mNumRotationKeys); + // ----------------------------------------------------------------------------------- + void WriteBinaryMaterial(IOStream * container, const aiMaterial* mat) + { + AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIMATERIAL); - } // else write as usual - else WriteArray(&chunk,nd->mRotationKeys,nd->mNumRotationKeys); - } - if (nd->mScalingKeys) { - if (shortened) { - WriteBounds(&chunk,nd->mScalingKeys,nd->mNumScalingKeys); + Write(&chunk,mat->mNumProperties); + for (unsigned int i = 0; i < mat->mNumProperties;++i) { + WriteBinaryMaterialProperty( &chunk, mat->mProperties[i]); + } + } - } // else write as usual - else WriteArray(&chunk,nd->mScalingKeys,nd->mNumScalingKeys); - } + // ----------------------------------------------------------------------------------- + void WriteBinaryNodeAnim(IOStream * container, const aiNodeAnim* nd) + { + AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AINODEANIM ); + + Write(&chunk,nd->mNodeName); + Write(&chunk,nd->mNumPositionKeys); + Write(&chunk,nd->mNumRotationKeys); + Write(&chunk,nd->mNumScalingKeys); + Write(&chunk,nd->mPreState); + Write(&chunk,nd->mPostState); + + if (nd->mPositionKeys) { + if (shortened) { + WriteBounds(&chunk,nd->mPositionKeys,nd->mNumPositionKeys); + + } // else write as usual + else WriteArray(&chunk,nd->mPositionKeys,nd->mNumPositionKeys); + } + if (nd->mRotationKeys) { + if (shortened) { + WriteBounds(&chunk,nd->mRotationKeys,nd->mNumRotationKeys); + + } // else write as usual + else WriteArray(&chunk,nd->mRotationKeys,nd->mNumRotationKeys); + } + if (nd->mScalingKeys) { + if (shortened) { + WriteBounds(&chunk,nd->mScalingKeys,nd->mNumScalingKeys); + + } // else write as usual + else WriteArray(&chunk,nd->mScalingKeys,nd->mNumScalingKeys); + } + } + + + // ----------------------------------------------------------------------------------- + void WriteBinaryAnim( IOStream * container, const aiAnimation* anim ) + { + AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIANIMATION ); + + Write(&chunk,anim->mName); + Write(&chunk,anim->mDuration); + Write(&chunk,anim->mTicksPerSecond); + Write(&chunk,anim->mNumChannels); + + 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(&chunk,l->mName); + Write(&chunk,l->mType); + + if (l->mType != aiLightSource_DIRECTIONAL) { + Write(&chunk,l->mAttenuationConstant); + Write(&chunk,l->mAttenuationLinear); + Write(&chunk,l->mAttenuationQuadratic); + } + + Write(&chunk,l->mColorDiffuse); + Write(&chunk,l->mColorSpecular); + Write(&chunk,l->mColorAmbient); + + if (l->mType == aiLightSource_SPOT) { + Write(&chunk,l->mAngleInnerCone); + Write(&chunk,l->mAngleOuterCone); + } + + } + + // ----------------------------------------------------------------------------------- + void WriteBinaryCamera( IOStream * container, const aiCamera* cam ) + { + AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AICAMERA ); + + Write(&chunk,cam->mName); + Write(&chunk,cam->mPosition); + Write(&chunk,cam->mLookAt); + Write(&chunk,cam->mUp); + Write(&chunk,cam->mHorizontalFOV); + Write(&chunk,cam->mClipPlaneNear); + Write(&chunk,cam->mClipPlaneFar); + Write(&chunk,cam->mAspect); + } + + // ----------------------------------------------------------------------------------- + void WriteBinaryScene( IOStream * container, const aiScene* scene) + { + AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AISCENE ); + + // basic scene information + Write(&chunk,scene->mFlags); + Write(&chunk,scene->mNumMeshes); + Write(&chunk,scene->mNumMaterials); + Write(&chunk,scene->mNumAnimations); + Write(&chunk,scene->mNumTextures); + Write(&chunk,scene->mNumLights); + Write(&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 animations + for (unsigned int i = 0; i < scene->mNumAnimations;++i) { + const aiAnimation* anim = scene->mAnimations[i]; + WriteBinaryAnim(&chunk,anim); } - // ----------------------------------------------------------------------------------- - void WriteBinaryAnim( IOStream * container, const aiAnimation* anim ) - { - AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AIANIMATION ); - - Write(&chunk,anim->mName); - Write(&chunk,anim->mDuration); - Write(&chunk,anim->mTicksPerSecond); - Write(&chunk,anim->mNumChannels); - - for (unsigned int a = 0; a < anim->mNumChannels;++a) { - const aiNodeAnim* nd = anim->mChannels[a]; - WriteBinaryNodeAnim(&chunk,nd); - } + // write all textures + for (unsigned int i = 0; i < scene->mNumTextures;++i) { + const aiTexture* mesh = scene->mTextures[i]; + WriteBinaryTexture(&chunk,mesh); } - // ----------------------------------------------------------------------------------- - void WriteBinaryLight( IOStream * container, const aiLight* l ) - { - AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AILIGHT ); - - Write(&chunk,l->mName); - Write(&chunk,l->mType); - - if (l->mType != aiLightSource_DIRECTIONAL) { - Write(&chunk,l->mAttenuationConstant); - Write(&chunk,l->mAttenuationLinear); - Write(&chunk,l->mAttenuationQuadratic); - } - - Write(&chunk,l->mColorDiffuse); - Write(&chunk,l->mColorSpecular); - Write(&chunk,l->mColorAmbient); - - if (l->mType == aiLightSource_SPOT) { - Write(&chunk,l->mAngleInnerCone); - Write(&chunk,l->mAngleOuterCone); - } - + // write lights + for (unsigned int i = 0; i < scene->mNumLights;++i) { + const aiLight* l = scene->mLights[i]; + WriteBinaryLight(&chunk,l); } - // ----------------------------------------------------------------------------------- - void WriteBinaryCamera( IOStream * container, const aiCamera* cam ) - { - AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AICAMERA ); - - Write(&chunk,cam->mName); - Write(&chunk,cam->mPosition); - Write(&chunk,cam->mLookAt); - Write(&chunk,cam->mUp); - Write(&chunk,cam->mHorizontalFOV); - Write(&chunk,cam->mClipPlaneNear); - Write(&chunk,cam->mClipPlaneFar); - Write(&chunk,cam->mAspect); + // write cameras + for (unsigned int i = 0; i < scene->mNumCameras;++i) { + const aiCamera* cam = scene->mCameras[i]; + WriteBinaryCamera(&chunk,cam); } - // ----------------------------------------------------------------------------------- - void WriteBinaryScene( IOStream * container, const aiScene* scene) - { - AssbinChunkWriter chunk( container, ASSBIN_CHUNK_AISCENE ); + } - // basic scene information - Write(&chunk,scene->mFlags); - Write(&chunk,scene->mNumMeshes); - Write(&chunk,scene->mNumMaterials); - Write(&chunk,scene->mNumAnimations); - Write(&chunk,scene->mNumTextures); - Write(&chunk,scene->mNumLights); - Write(&chunk,scene->mNumCameras); +public: + AssbinExport() + : shortened(false), compressed(false) // temporary settings until properties are introduced for exporters + { + } - // write node graph - WriteBinaryNode( &chunk, scene->mRootNode ); + // ----------------------------------------------------------------------------------- + // Write a binary model dump + void WriteBinaryDump(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene) + { + IOStream * out = pIOSystem->Open( pFile, "wb" ); + if (!out) return; - // write all meshes - for (unsigned int i = 0; i < scene->mNumMeshes;++i) { - const aiMesh* mesh = scene->mMeshes[i]; - WriteBinaryMesh( &chunk,mesh); - } + time_t tt = time(NULL); + tm* p = gmtime(&tt); - // write materials - for (unsigned int i = 0; i< scene->mNumMaterials; ++i) { - const aiMaterial* mat = scene->mMaterials[i]; - WriteBinaryMaterial(&chunk,mat); - } - - // write all animations - for (unsigned int i = 0; i < scene->mNumAnimations;++i) { - const aiAnimation* anim = scene->mAnimations[i]; - WriteBinaryAnim(&chunk,anim); - } - - - // 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); - } - - // write cameras - for (unsigned int i = 0; i < scene->mNumCameras;++i) { - const aiCamera* cam = scene->mCameras[i]; - WriteBinaryCamera(&chunk,cam); - } - - } - - public: - AssbinExport() - : shortened(false), compressed(false) // temporary settings until properties are introduced for exporters - { - } - - // ----------------------------------------------------------------------------------- - // 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 ); + // 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 + out->Write( s, 44, 1 ); + // == 44 bytes - Write( out, ASSBIN_VERSION_MAJOR ); - Write( out, ASSBIN_VERSION_MINOR ); - Write( out, aiGetVersionRevision() ); - Write( out, aiGetCompileFlags() ); - Write( out, shortened ); - Write( out, compressed ); - // == 20 bytes + Write( out, ASSBIN_VERSION_MAJOR ); + Write( out, ASSBIN_VERSION_MINOR ); + Write( out, aiGetVersionRevision() ); + Write( out, aiGetCompileFlags() ); + Write( out, shortened ); + Write( out, compressed ); + // == 20 bytes - char buff[256]; - strncpy(buff,pFile,256); - out->Write(buff,sizeof(char),256); + 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); + 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 + // 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 ); + // ==== 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 ); + // 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(uncompressedStream.Tell()); - uLongf compressedSize = (uLongf)(uncompressedStream.Tell() * 1.001 + 12.); - uint8_t* compressedBuffer = new uint8_t[ compressedSize ]; + uLongf uncompressedSize = static_cast(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 ); + compress2( compressedBuffer, &compressedSize, (const Bytef*)uncompressedStream.GetBufferPointer(), uncompressedSize, 9 ); - out->Write( &uncompressedSize, sizeof(uint32_t), 1 ); - out->Write( compressedBuffer, sizeof(char), compressedSize ); + out->Write( &uncompressedSize, sizeof(uint32_t), 1 ); + out->Write( compressedBuffer, sizeof(char), compressedSize ); - delete[] compressedBuffer; - } - else - { - WriteBinaryScene( out, pScene ); - } - - pIOSystem->Close( out ); + delete[] compressedBuffer; } - }; + else + { + WriteBinaryScene( out, pScene ); + } + + pIOSystem->Close( out ); + } +}; void ExportSceneAssbin(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* /*pProperties*/) { diff --git a/code/AssbinExporter.h b/code/AssbinExporter.h index 2539984c3..ee70d78b6 100644 --- a/code/AssbinExporter.h +++ b/code/AssbinExporter.h @@ -46,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 -// nothing really needed here - reserved for future use like properties +#include -#endif +// 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 // AI_ASSBINEXPORTER_H_INC diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b6be32dca..675812a52 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -114,6 +114,7 @@ SET( IMPORTERS unit/utCSMImportExport.cpp unit/utB3DImportExport.cpp unit/utMDCImportExport.cpp + unit/utAssbinImportExport.cpp ) SET( MATERIAL diff --git a/test/unit/utAssbinImportExport.cpp b/test/unit/utAssbinImportExport.cpp new file mode 100644 index 000000000..c464a0c82 --- /dev/null +++ b/test/unit/utAssbinImportExport.cpp @@ -0,0 +1,67 @@ +/* +--------------------------------------------------------------------------- +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 "UnitTestPCH.h" +#include "SceneDiffer.h" +#include "AbstractImportExportBase.h" +#include +#include +#include + +using namespace Assimp; + +class utAssbinImportExport : public AbstractImportExportBase { +public: + virtual bool importerTest() { + Assimp::Importer importer; + const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/OBJ/spider.obj", aiProcess_ValidateDataStructure ); + Exporter exporter; + EXPECT_EQ( aiReturn_SUCCESS, exporter.Export( scene, "assbin", ASSIMP_TEST_MODELS_DIR "/OBJ/spider_test.assbin" ) ); + const aiScene *newScene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/OBJ/spider_test.assbin", aiProcess_ValidateDataStructure ); + + return newScene != nullptr; + } +}; + +TEST_F( utAssbinImportExport, import3DFromFileTest ) { + EXPECT_TRUE( importerTest() ); +} From c3d8464a371112ac7deaa755cdd3d5fe13fc00f5 Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Mon, 10 Sep 2018 16:41:12 +0300 Subject: [PATCH 11/47] Remove aiCreateAndRegisterDefaultMaterial, it's completely wrong --- code/Assimp.cpp | 2 -- code/Importer.cpp | 2 -- code/MaterialSystem.cpp | 20 -------------------- code/STLLoader.cpp | 5 ++--- include/assimp/material.h | 20 -------------------- test/unit/utMaterialSystem.cpp | 10 +--------- 6 files changed, 3 insertions(+), 56 deletions(-) diff --git a/code/Assimp.cpp b/code/Assimp.cpp index 2a9b896e7..b682d257b 100644 --- a/code/Assimp.cpp +++ b/code/Assimp.cpp @@ -272,8 +272,6 @@ void aiReleaseImport( const aiScene* pScene) ASSIMP_BEGIN_EXCEPTION_REGION(); - aiReleaseDefaultMaterial(); - // find the importer associated with this data const ScenePrivateData* priv = ScenePriv(pScene); if( !priv || !priv->mOrigImporter) { diff --git a/code/Importer.cpp b/code/Importer.cpp index 7aabe0a5f..32bec9414 100644 --- a/code/Importer.cpp +++ b/code/Importer.cpp @@ -178,7 +178,6 @@ Importer::~Importer() { // Delete all import plugins DeleteImporterInstanceList(pimpl->mImporter); - aiReleaseDefaultMaterial(); // Delete all post-processing plug-ins for( unsigned int a = 0; a < pimpl->mPostProcessingSteps.size(); a++) @@ -385,7 +384,6 @@ void Importer::FreeScene( ) { ASSIMP_BEGIN_EXCEPTION_REGION(); - aiReleaseDefaultMaterial(); delete pimpl->mScene; pimpl->mScene = NULL; diff --git a/code/MaterialSystem.cpp b/code/MaterialSystem.cpp index 3679c93c7..fa8fb819c 100644 --- a/code/MaterialSystem.cpp +++ b/code/MaterialSystem.cpp @@ -387,26 +387,6 @@ aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat, return AI_SUCCESS; } -static aiMaterial *DefaultMaterial = nullptr; - -// ------------------------------------------------------------------------------------------------ -// Will return the default material. -aiMaterial *aiCreateAndRegisterDefaultMaterial() { - if (nullptr == DefaultMaterial) { - DefaultMaterial = new aiMaterial; - aiString s; - s.Set(AI_DEFAULT_MATERIAL_NAME); - DefaultMaterial->AddProperty(&s, AI_MATKEY_NAME); - } - - return DefaultMaterial; -} - -// ------------------------------------------------------------------------------------------------ -// Will return the default material. -void aiReleaseDefaultMaterial() { - DefaultMaterial = nullptr; -} static const unsigned int DefaultNumAllocated = 5; diff --git a/code/STLLoader.cpp b/code/STLLoader.cpp index 3f8c810fa..fb866bb7a 100644 --- a/code/STLLoader.cpp +++ b/code/STLLoader.cpp @@ -214,11 +214,10 @@ void STLImporter::InternReadFile( const std::string& pFile, aiScene* pScene, IOS // create a single default material, using a white diffuse color for consistency with // other geometric types (e.g., PLY). - aiMaterial* pcMat = aiCreateAndRegisterDefaultMaterial(); - /*aiMaterial* pcMat = new aiMaterial(); + aiMaterial* pcMat = new aiMaterial(); aiString s; s.Set(AI_DEFAULT_MATERIAL_NAME); - pcMat->AddProperty(&s, AI_MATKEY_NAME);*/ + pcMat->AddProperty(&s, AI_MATKEY_NAME); aiColor4D clrDiffuse(ai_real(1.0),ai_real(1.0),ai_real(1.0),ai_real(1.0)); if (bMatClr) { diff --git a/include/assimp/material.h b/include/assimp/material.h index 6564e047b..911853b4b 100644 --- a/include/assimp/material.h +++ b/include/assimp/material.h @@ -1565,26 +1565,6 @@ C_ENUM aiReturn aiGetMaterialTexture(const C_STRUCT aiMaterial* mat, unsigned int* flags /*= NULL*/); #endif // !#ifdef __cplusplus -// --------------------------------------------------------------------------- -/** @brief Helper function to get all values pertaining to a particular -* texture slot from a material structure. -* -* @return Pointer showing to the default material. -*/ -// --------------------------------------------------------------------------- -#ifdef __cplusplus -ASSIMP_API aiMaterial *aiCreateAndRegisterDefaultMaterial(void); -#else -C_STRUCT aiMaterial *aiCreateAndRegisterDefaultMaterial(void); -#endif // !#ifdef __cplusplus - -// --------------------------------------------------------------------------- -/** - * @brief Helper function to release the default material instance, the - * instance will not be destroyed. - */ -// --------------------------------------------------------------------------- -ASSIMP_API void aiReleaseDefaultMaterial(); #ifdef __cplusplus } diff --git a/test/unit/utMaterialSystem.cpp b/test/unit/utMaterialSystem.cpp index 550dc63da..55ee6e2a0 100644 --- a/test/unit/utMaterialSystem.cpp +++ b/test/unit/utMaterialSystem.cpp @@ -129,18 +129,10 @@ TEST_F(MaterialSystemTest, testStringProperty) { EXPECT_STREQ("Hello, this is a small test", s.data); } -// ------------------------------------------------------------------------------------------------ -TEST_F(MaterialSystemTest, testDefaultMaterialAccess) { - aiMaterial *mat = aiCreateAndRegisterDefaultMaterial(); - EXPECT_NE(nullptr, mat); - aiReleaseDefaultMaterial(); - - delete mat; -} // ------------------------------------------------------------------------------------------------ TEST_F(MaterialSystemTest, testMaterialNameAccess) { - aiMaterial *mat = aiCreateAndRegisterDefaultMaterial(); + aiMaterial *mat = new aiMaterial(); EXPECT_NE(nullptr, mat); aiString name = mat->GetName(); From 4ff52c98bb6a4a687fb5f5b38c445d7e757ebb60 Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Mon, 10 Sep 2018 16:43:27 +0300 Subject: [PATCH 12/47] Add unit test for two independent importers loading STL models --- test/unit/utSTLImportExport.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/unit/utSTLImportExport.cpp b/test/unit/utSTLImportExport.cpp index 9ebfb0f05..ee62253fd 100644 --- a/test/unit/utSTLImportExport.cpp +++ b/test/unit/utSTLImportExport.cpp @@ -67,6 +67,20 @@ TEST_F( utSTLImporterExporter, importSTLFromFileTest ) { EXPECT_TRUE( importerTest() ); } + +TEST_F(utSTLImporterExporter, test_multiple) { + // import same file twice, each with its own importer + // must work both times and not crash + Assimp::Importer importer1; + const aiScene *scene1 = importer1.ReadFile( ASSIMP_TEST_MODELS_DIR "/STL/Spider_ascii.stl", aiProcess_ValidateDataStructure ); + EXPECT_NE(nullptr, scene1); + + Assimp::Importer importer2; + const aiScene *scene2 = importer2.ReadFile( ASSIMP_TEST_MODELS_DIR "/STL/Spider_ascii.stl", aiProcess_ValidateDataStructure ); + EXPECT_NE(nullptr, scene2); +} + + TEST_F( utSTLImporterExporter, test_with_two_solids ) { Assimp::Importer importer; const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/STL/triangle_with_two_solids.stl", aiProcess_ValidateDataStructure ); From 081365df48ad8eb11e35b8ace7436e2cd7a78ef6 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Mon, 10 Sep 2018 22:42:24 +0200 Subject: [PATCH 13/47] Introduce simple export test for assbin. --- code/AssbinLoader.cpp | 14 +++++++++----- test/unit/utAssbinImportExport.cpp | 9 ++++++++- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/code/AssbinLoader.cpp b/code/AssbinLoader.cpp index 21a48fc99..68d4a2bca 100644 --- a/code/AssbinLoader.cpp +++ b/code/AssbinLoader.cpp @@ -188,13 +188,17 @@ aiQuatKey Read(IOStream * stream) } template -void ReadArray(IOStream * stream, T * out, unsigned int size) -{ - for (unsigned int i=0; i(stream); +void ReadArray( IOStream *stream, T * out, unsigned int size) { + ai_assert( nullptr != stream ); + ai_assert( nullptr != out ); + + for (unsigned int i=0; i(stream); + } } -template void ReadBounds( IOStream * stream, T* /*p*/, unsigned int n ) -{ +template +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 ); } diff --git a/test/unit/utAssbinImportExport.cpp b/test/unit/utAssbinImportExport.cpp index c464a0c82..9348de8cf 100644 --- a/test/unit/utAssbinImportExport.cpp +++ b/test/unit/utAssbinImportExport.cpp @@ -54,6 +54,7 @@ public: virtual bool importerTest() { Assimp::Importer importer; const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/OBJ/spider.obj", aiProcess_ValidateDataStructure ); + Exporter exporter; EXPECT_EQ( aiReturn_SUCCESS, exporter.Export( scene, "assbin", ASSIMP_TEST_MODELS_DIR "/OBJ/spider_test.assbin" ) ); const aiScene *newScene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/OBJ/spider_test.assbin", aiProcess_ValidateDataStructure ); @@ -62,6 +63,12 @@ public: } }; -TEST_F( utAssbinImportExport, import3DFromFileTest ) { +TEST_F( utAssbinImportExport, exportAssbin3DFromFileTest ) { + Assimp::Importer importer; + const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/OBJ/spider.obj", aiProcess_ValidateDataStructure ); + EXPECT_NE( nullptr, scene ); +} + +TEST_F( utAssbinImportExport, import3ExportAssbinDFromFileTest ) { EXPECT_TRUE( importerTest() ); } From afd47d5ab6312b5b2f494c8b8e342c91d1ef7151 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Tue, 11 Sep 2018 09:12:28 +0200 Subject: [PATCH 14/47] Update AssbinLoader.cpp Fix memory leak, --- code/AssbinLoader.cpp | 213 +++++++++++++++++++----------------------- 1 file changed, 94 insertions(+), 119 deletions(-) diff --git a/code/AssbinLoader.cpp b/code/AssbinLoader.cpp index 68d4a2bca..191dc2137 100644 --- a/code/AssbinLoader.cpp +++ b/code/AssbinLoader.cpp @@ -79,16 +79,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 ); @@ -98,17 +99,17 @@ bool AssbinImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bo return strncmp( s, "ASSIMP.binary-dump.", 19 ) == 0; } +// ----------------------------------------------------------------------------------- template -T Read(IOStream * stream) -{ +T Read(IOStream * stream) { T t; stream->Read( &t, sizeof(T), 1 ); return t; } +// ----------------------------------------------------------------------------------- template <> -aiVector3D Read(IOStream * stream) -{ +aiVector3D Read(IOStream * stream) { aiVector3D v; v.x = Read(stream); v.y = Read(stream); @@ -116,9 +117,9 @@ aiVector3D Read(IOStream * stream) return v; } +// ----------------------------------------------------------------------------------- template <> -aiColor4D Read(IOStream * stream) -{ +aiColor4D Read(IOStream * stream) { aiColor4D c; c.r = Read(stream); c.g = Read(stream); @@ -127,9 +128,9 @@ aiColor4D Read(IOStream * stream) return c; } +// ----------------------------------------------------------------------------------- template <> -aiQuaternion Read(IOStream * stream) -{ +aiQuaternion Read(IOStream * stream) { aiQuaternion v; v.w = Read(stream); v.x = Read(stream); @@ -138,9 +139,9 @@ aiQuaternion Read(IOStream * stream) return v; } +// ----------------------------------------------------------------------------------- template <> -aiString Read(IOStream * stream) -{ +aiString Read(IOStream * stream) { aiString s; stream->Read(&s.length,4,1); stream->Read(s.data,s.length,1); @@ -148,18 +149,18 @@ aiString Read(IOStream * stream) return s; } +// ----------------------------------------------------------------------------------- template <> -aiVertexWeight Read(IOStream * stream) -{ +aiVertexWeight Read(IOStream * stream) { aiVertexWeight w; w.mVertexId = Read(stream); w.mWeight = Read(stream); return w; } +// ----------------------------------------------------------------------------------- template <> -aiMatrix4x4 Read(IOStream * stream) -{ +aiMatrix4x4 Read(IOStream * stream) { aiMatrix4x4 m; for (unsigned int i = 0; i < 4;++i) { for (unsigned int i2 = 0; i2 < 4;++i2) { @@ -169,24 +170,25 @@ aiMatrix4x4 Read(IOStream * stream) return m; } +// ----------------------------------------------------------------------------------- template <> -aiVectorKey Read(IOStream * stream) -{ +aiVectorKey Read(IOStream * stream) { aiVectorKey v; v.mTime = Read(stream); v.mValue = Read(stream); return v; } +// ----------------------------------------------------------------------------------- template <> -aiQuatKey Read(IOStream * stream) -{ +aiQuatKey Read(IOStream * stream) { aiQuatKey v; v.mTime = Read(stream); v.mValue = Read(stream); return v; } +// ----------------------------------------------------------------------------------- template void ReadArray( IOStream *stream, T * out, unsigned int size) { ai_assert( nullptr != stream ); @@ -197,12 +199,14 @@ void ReadArray( IOStream *stream, T * out, unsigned int size) { } } +// ----------------------------------------------------------------------------------- template 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(stream); (void)(chunkID); @@ -277,8 +281,7 @@ void AssbinImporter::ReadBinaryNode( IOStream * stream, aiNode** node, aiNode* p } // ----------------------------------------------------------------------------------- -void AssbinImporter::ReadBinaryBone( IOStream * stream, aiBone* b ) -{ +void AssbinImporter::ReadBinaryBone( IOStream * stream, aiBone* b ) { uint32_t chunkID = Read(stream); (void)(chunkID); ai_assert(chunkID == ASSBIN_CHUNK_AIBONE); @@ -290,20 +293,22 @@ 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(stream,b->mWeights,b->mNumWeights); } } +// ----------------------------------------------------------------------------------- +static bool fitsIntoUI16(unsigned int mNumVertices) { + return ( mNumVertices < (1u<<16) ); +} -void AssbinImporter::ReadBinaryMesh( IOStream * stream, aiMesh* mesh ) -{ +// ----------------------------------------------------------------------------------- +void AssbinImporter::ReadBinaryMesh( IOStream * stream, aiMesh* mesh ) { uint32_t chunkID = Read(stream); (void)(chunkID); ai_assert(chunkID == ASSBIN_CHUNK_AIMESH); @@ -318,70 +323,61 @@ void AssbinImporter::ReadBinaryMesh( IOStream * stream, aiMesh* mesh ) // first of all, write bits for all existent vertex components unsigned int c = Read(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(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(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(stream,mesh->mTangents,mesh->mNumVertices); mesh->mBitangents = new aiVector3D[mesh->mNumVertices]; ReadArray(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(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(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(stream,mesh->mTextureCoords[n],mesh->mNumVertices); } @@ -393,9 +389,8 @@ void AssbinImporter::ReadBinaryMesh( IOStream * stream, aiMesh* mesh ) // using Assimp's standard hashing function. if (shortened) { Read(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) { @@ -406,12 +401,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(stream); - } - else - { + } else { f.mIndices[a] = Read(stream); } } @@ -428,8 +421,8 @@ void AssbinImporter::ReadBinaryMesh( IOStream * stream, aiMesh* mesh ) } } -void AssbinImporter::ReadBinaryMaterialProperty(IOStream * stream, aiMaterialProperty* prop) -{ +// ----------------------------------------------------------------------------------- +void AssbinImporter::ReadBinaryMaterialProperty(IOStream * stream, aiMaterialProperty* prop) { uint32_t chunkID = Read(stream); (void)(chunkID); ai_assert(chunkID == ASSBIN_CHUNK_AIMATERIALPROPERTY); @@ -446,8 +439,7 @@ void AssbinImporter::ReadBinaryMaterialProperty(IOStream * stream, aiMaterialPro } // ----------------------------------------------------------------------------------- -void AssbinImporter::ReadBinaryMaterial(IOStream * stream, aiMaterial* mat) -{ +void AssbinImporter::ReadBinaryMaterial(IOStream * stream, aiMaterial* mat) { uint32_t chunkID = Read(stream); (void)(chunkID); ai_assert(chunkID == ASSBIN_CHUNK_AIMATERIAL); @@ -469,8 +461,7 @@ void AssbinImporter::ReadBinaryMaterial(IOStream * stream, aiMaterial* mat) } // ----------------------------------------------------------------------------------- -void AssbinImporter::ReadBinaryNodeAnim(IOStream * stream, aiNodeAnim* nd) -{ +void AssbinImporter::ReadBinaryNodeAnim(IOStream * stream, aiNodeAnim* nd) { uint32_t chunkID = Read(stream); (void)(chunkID); ai_assert(chunkID == ASSBIN_CHUNK_AINODEANIM); @@ -497,9 +488,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(stream,nd->mRotationKeys,nd->mNumRotationKeys); } @@ -508,19 +498,16 @@ 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(stream,nd->mScalingKeys,nd->mNumScalingKeys); } } } - // ----------------------------------------------------------------------------------- -void AssbinImporter::ReadBinaryAnim( IOStream * stream, aiAnimation* anim ) -{ +void AssbinImporter::ReadBinaryAnim( IOStream * stream, aiAnimation* anim ) { uint32_t chunkID = Read(stream); (void)(chunkID); ai_assert(chunkID == ASSBIN_CHUNK_AIANIMATION); @@ -531,8 +518,7 @@ void AssbinImporter::ReadBinaryAnim( IOStream * stream, aiAnimation* anim ) anim->mTicksPerSecond = Read (stream); anim->mNumChannels = Read(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(); @@ -541,8 +527,8 @@ void AssbinImporter::ReadBinaryAnim( IOStream * stream, aiAnimation* anim ) } } -void AssbinImporter::ReadBinaryTexture(IOStream * stream, aiTexture* tex) -{ +// ----------------------------------------------------------------------------------- +void AssbinImporter::ReadBinaryTexture(IOStream * stream, aiTexture* tex) { uint32_t chunkID = Read(stream); (void)(chunkID); ai_assert(chunkID == ASSBIN_CHUNK_AITEXTURE); @@ -556,8 +542,7 @@ 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); } @@ -566,8 +551,7 @@ void AssbinImporter::ReadBinaryTexture(IOStream * stream, aiTexture* tex) } // ----------------------------------------------------------------------------------- -void AssbinImporter::ReadBinaryLight( IOStream * stream, aiLight* l ) -{ +void AssbinImporter::ReadBinaryLight( IOStream * stream, aiLight* l ) { uint32_t chunkID = Read(stream); (void)(chunkID); ai_assert(chunkID == ASSBIN_CHUNK_AILIGHT); @@ -590,12 +574,10 @@ void AssbinImporter::ReadBinaryLight( IOStream * stream, aiLight* l ) l->mAngleInnerCone = Read(stream); l->mAngleOuterCone = Read(stream); } - } // ----------------------------------------------------------------------------------- -void AssbinImporter::ReadBinaryCamera( IOStream * stream, aiCamera* cam ) -{ +void AssbinImporter::ReadBinaryCamera( IOStream * stream, aiCamera* cam ) { uint32_t chunkID = Read(stream); (void)(chunkID); ai_assert(chunkID == ASSBIN_CHUNK_AICAMERA); @@ -611,8 +593,8 @@ void AssbinImporter::ReadBinaryCamera( IOStream * stream, aiCamera* cam ) cam->mAspect = Read(stream); } -void AssbinImporter::ReadBinaryScene( IOStream * stream, aiScene* scene ) -{ +// ----------------------------------------------------------------------------------- +void AssbinImporter::ReadBinaryScene( IOStream * stream, aiScene* scene ) { uint32_t chunkID = Read(stream); (void)(chunkID); ai_assert(chunkID == ASSBIN_CHUNK_AISCENE); @@ -627,12 +609,11 @@ void AssbinImporter::ReadBinaryScene( IOStream * stream, aiScene* scene ) scene->mNumCameras = Read(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]; for (unsigned int i = 0; i < scene->mNumMeshes;++i) { scene->mMeshes[i] = new aiMesh(); @@ -641,8 +622,7 @@ void AssbinImporter::ReadBinaryScene( IOStream * stream, aiScene* scene ) } // Read materials - if (scene->mNumMaterials) - { + if (scene->mNumMaterials) { scene->mMaterials = new aiMaterial*[scene->mNumMaterials]; for (unsigned int i = 0; i< scene->mNumMaterials; ++i) { scene->mMaterials[i] = new aiMaterial(); @@ -651,8 +631,7 @@ void AssbinImporter::ReadBinaryScene( IOStream * stream, aiScene* scene ) } // Read all animations - if (scene->mNumAnimations) - { + if (scene->mNumAnimations) { scene->mAnimations = new aiAnimation*[scene->mNumAnimations]; for (unsigned int i = 0; i < scene->mNumAnimations;++i) { scene->mAnimations[i] = new aiAnimation(); @@ -661,8 +640,7 @@ void AssbinImporter::ReadBinaryScene( IOStream * stream, aiScene* scene ) } // Read all textures - if (scene->mNumTextures) - { + if (scene->mNumTextures) { scene->mTextures = new aiTexture*[scene->mNumTextures]; for (unsigned int i = 0; i < scene->mNumTextures;++i) { scene->mTextures[i] = new aiTexture(); @@ -671,8 +649,7 @@ void AssbinImporter::ReadBinaryScene( IOStream * stream, aiScene* scene ) } // Read lights - if (scene->mNumLights) - { + if (scene->mNumLights) { scene->mLights = new aiLight*[scene->mNumLights]; for (unsigned int i = 0; i < scene->mNumLights;++i) { scene->mLights[i] = new aiLight(); @@ -681,8 +658,7 @@ void AssbinImporter::ReadBinaryScene( IOStream * stream, aiScene* scene ) } // Read cameras - if (scene->mNumCameras) - { + if (scene->mNumCameras) { scene->mCameras = new aiCamera*[scene->mNumCameras]; for (unsigned int i = 0; i < scene->mNumCameras;++i) { scene->mCameras[i] = new aiCamera(); @@ -692,13 +668,15 @@ 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(stream); unsigned int versionMinor = Read(stream); @@ -719,8 +697,7 @@ 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(stream); uLongf compressedSize = static_cast(stream->FileSize() - stream->Tell()); @@ -737,9 +714,7 @@ void AssbinImporter::InternReadFile( const std::string& pFile, aiScene* pScene, delete[] uncompressedData; delete[] compressedData; - } - else - { + } else { ReadBinaryScene(stream,pScene); } From ab5c100fd451603ff5020b6ec43ebbf103e91b7a Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Tue, 11 Sep 2018 09:43:38 +0200 Subject: [PATCH 15/47] Update utAssbinImportExport.cpp Fix unittests when no export is configured. --- test/unit/utAssbinImportExport.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/unit/utAssbinImportExport.cpp b/test/unit/utAssbinImportExport.cpp index 9348de8cf..bbfb9421b 100644 --- a/test/unit/utAssbinImportExport.cpp +++ b/test/unit/utAssbinImportExport.cpp @@ -49,6 +49,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. using namespace Assimp; +#ifndef ASSIMP_BUILD_NO_EXPORT + class utAssbinImportExport : public AbstractImportExportBase { public: virtual bool importerTest() { @@ -72,3 +74,5 @@ TEST_F( utAssbinImportExport, exportAssbin3DFromFileTest ) { TEST_F( utAssbinImportExport, import3ExportAssbinDFromFileTest ) { EXPECT_TRUE( importerTest() ); } + +#endif // #ifndef ASSIMP_BUILD_NO_EXPORT From d5de32ec1c685edfbd9b2c5c2049105e2f671e48 Mon Sep 17 00:00:00 2001 From: FRICOTEAUX Date: Tue, 11 Sep 2018 16:07:43 +0200 Subject: [PATCH 16/47] FBX import: fix import of direct data by vertices + unify node renaming --- code/FBXConverter.cpp | 8 ++------ code/FBXMeshGeometry.cpp | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/code/FBXConverter.cpp b/code/FBXConverter.cpp index b088b22e0..0cbe04d8f 100644 --- a/code/FBXConverter.cpp +++ b/code/FBXConverter.cpp @@ -185,12 +185,8 @@ void FBXConverter::ConvertNodes( uint64_t id, aiNode& parent, const aiMatrix4x4& } if ( !name_carrier ) { - NodeNameCache::const_iterator it = mNodeNames.find(original_name); - if ( it != mNodeNames.end() ) { - original_name = original_name + std::string( "001" ); - } - - mNodeNames.insert( original_name ); + std::string old_original_name = original_name; + GetUniqueName(old_original_name, original_name); nodes_chain.push_back( new aiNode( original_name ) ); } else { original_name = nodes_chain.back()->mName.C_Str(); diff --git a/code/FBXMeshGeometry.cpp b/code/FBXMeshGeometry.cpp index 8bfd60570..aa794d4df 100644 --- a/code/FBXMeshGeometry.cpp +++ b/code/FBXMeshGeometry.cpp @@ -437,7 +437,7 @@ void ResolveVertexDataArray(std::vector& data_out, const Scope& source, // deal with this more elegantly and with less redundancy, but right // now it seems unavoidable. if (MappingInformationType == "ByVertice" && isDirect) { - if (!HasElement(source, indexDataElementName)) { + if (!HasElement(source, dataElementName)) { return; } std::vector tempData; From 7911faf130360a23fb0c48854b52cc4711b4e150 Mon Sep 17 00:00:00 2001 From: Paul Arden Date: Thu, 13 Sep 2018 16:04:04 +1000 Subject: [PATCH 17/47] Fixed problem getting glTF 2.0 camera type, fixes #2138. --- code/glTF2Asset.inl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) mode change 100644 => 100755 code/glTF2Asset.inl diff --git a/code/glTF2Asset.inl b/code/glTF2Asset.inl old mode 100644 new mode 100755 index 5a87715ce..b17df3d4e --- a/code/glTF2Asset.inl +++ b/code/glTF2Asset.inl @@ -1023,7 +1023,12 @@ inline void Mesh::Read(Value& pJSON_Object, Asset& pAsset_Root) inline void Camera::Read(Value& obj, Asset& /*r*/) { - type = MemberOrDefault(obj, "type", Camera::Perspective); + 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"; From b20ab96a4335a1c464d45c90798eb36624d87aee Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Thu, 13 Sep 2018 13:43:26 +0300 Subject: [PATCH 18/47] Fix blend test files --- test/models/BLEND/BlenderDefault_250.blend | Bin 396963 -> 396964 bytes .../BLEND/BlenderDefault_250_Compressed.blend | Bin 63802 -> 63805 bytes test/models/BLEND/BlenderDefault_262.blend | Bin 472019 -> 472020 bytes test/models/BLEND/BlenderDefault_269.blend | Bin 492003 -> 492004 bytes test/models/BLEND/BlenderDefault_271.blend | Bin 484166 -> 484168 bytes test/models/BLEND/CubeHierarchy_248.blend | Bin 156281 -> 156284 bytes test/models/BLEND/MirroredCube_252.blend | Bin 89084 -> 89085 bytes test/models/BLEND/SuzanneSubdiv_252.blend | Bin 86252 -> 86253 bytes .../TexturedPlane_ImageUvPacked_248.blend | Bin 142259 -> 142260 bytes test/models/BLEND/blender_269_regress1.blend | Bin 556243 -> 556244 bytes test/models/BLEND/yxa_1.blend | Bin 440053 -> 440076 bytes 11 files changed, 0 insertions(+), 0 deletions(-) diff --git a/test/models/BLEND/BlenderDefault_250.blend b/test/models/BLEND/BlenderDefault_250.blend index 80bff9f5d34d232e8633dec4f6a220b34d4110eb..4cdddeab46054a849fbd73af844650e2ff010ac3 100644 GIT binary patch delta 27 icmZ2HS7OOriG~)&7N!>F7M2#)DQs1Yyj!c-H2DCBvF7M2#)DQs0+tJyU90C|)MRsaA1 diff --git a/test/models/BLEND/BlenderDefault_250_Compressed.blend b/test/models/BLEND/BlenderDefault_250_Compressed.blend index 99294d010e70998ec777ebc5c67a8e02153bd91e..1a6f4df3ba5a9855e31e11a145f38187840da9ea 100644 GIT binary patch delta 30 jcmdn>iFxlQ<_#XAjJ%sYM0d3VDWAY delta 24 gcmdn{iFwy2<_#XAn>|H$wQpvb+rqcGbM+Qq0F)04j{pDw diff --git a/test/models/BLEND/BlenderDefault_262.blend b/test/models/BLEND/BlenderDefault_262.blend index 5d4f2d4d36ee37011713a20e5876bd4b77664e73..a9bab65152b888eaa2ed3ebd50ae615b61657a79 100644 GIT binary patch delta 31 ncmccoT;|GinT8g|7N!>F7M2#)7Pc+yuOt|Gx4)8Le<=k3(MJpE delta 29 lcmcceT;}p~nT8g|7N!>F7M2#)7Pc+yuOzm=mSBG=1pvOh3)}zz diff --git a/test/models/BLEND/BlenderDefault_269.blend b/test/models/BLEND/BlenderDefault_269.blend index ef75dbd92388943188ab4c165f2d0edde28fcc7c..ed4352f4dd1e3081868d20ee072cad6f530d4ed9 100644 GIT binary patch delta 31 mcmaFdEcc{YuAzmog{g(Pg{6hHg>4IaSvVu__OfvHTrB{)pbBpQ delta 29 kcmaFTEcdusuAzmog{g(Pg{6hHg>4IaS@`zyaQ0j+0IA0cVgLXD diff --git a/test/models/BLEND/BlenderDefault_271.blend b/test/models/BLEND/BlenderDefault_271.blend index d1b178bef711addd00b5a9d81dc412c9828153ea..bbf04c2a0a35c78e162aad2f91a2c22cc7b9cfef 100644 GIT binary patch delta 38 ucmX?hO!mYv*@hOz7N!>F7M2#)7Pc+yzf2f;r~fix_h;nY?rF;YR~G;tRSk#$ delta 34 qcmX?cO!n9@*@hOz7N!>F7M2#)7Pc+yzf7k8HevVQ?rqBcR~G>FRt;|e diff --git a/test/models/BLEND/CubeHierarchy_248.blend b/test/models/BLEND/CubeHierarchy_248.blend index ebf062d3b4bb45f808ad5d22e2e8a6c421a08187..c4761b05e7ccea1d4316dd2228cc92ea03fe0263 100644 GIT binary patch delta 39 xcmV+?0NDTe#0mVw39u2{0S%K8+v@=hv;5l!0Rs&R2a~`PvJw*v_lCIDLo2a^B* delta 17 ZcmaF6koC<%)`l&NFZ{N@^kZaU0sv2m2ZjIu diff --git a/test/models/BLEND/TexturedPlane_ImageUvPacked_248.blend b/test/models/BLEND/TexturedPlane_ImageUvPacked_248.blend index 1fa09af7f8a6d7064877cb59bfa7006d7ddcbbf2..d01a3eb753861fcd32345ddb060c3357e9932e4d 100644 GIT binary patch delta 19 Zcmdmdony;&j)pCaQ(PH&w*v|JX8=}52iO1r delta 17 ZcmdmTon!NLj)pCaQ(U)Cb!C))1^`Qh2g?8e diff --git a/test/models/BLEND/blender_269_regress1.blend b/test/models/BLEND/blender_269_regress1.blend index ff78851ad58f0ad66a8a59321ba0f176693300a8..f8ecf7483d7141f724e54e2b33ec16d405a452a1 100644 GIT binary patch delta 33 ocmccoQ}N1A#fBEf7N!>F7M2#)7Pc1lEgWeF7M2#)7Pc1lEgWe<+tY(Ma|Nq5}Vwc&FLOd1F1L0EUSUk zbQ6}zKuXJ$#U4mynt}~kW6IJEy~VCwE%pUL5KhV delta 191 zcmeBqC-wEMR6`463sVd878YAAVXpt8Y^?ve85zN}EEmUr#qB{_EWa72`{}UcPv57* z;w;Ve-%wQGzqORee#y5`YuzJ?&)r3EQi^-z$Pk97cyu0J)O^j#eI61 i1-QkE>z)6Fb_N~w0YFgz From 0adc032f6983bc74f3556081c0b66f8fe874369d Mon Sep 17 00:00:00 2001 From: Vincent Fazio Date: Fri, 14 Sep 2018 13:09:44 +1000 Subject: [PATCH 19/47] Updated to be in sync with assimp header files --- port/PyAssimp/pyassimp/structs.py | 246 ++++++++++++++++++++++++------ 1 file changed, 196 insertions(+), 50 deletions(-) diff --git a/port/PyAssimp/pyassimp/structs.py b/port/PyAssimp/pyassimp/structs.py index 7cd8e634c..15e50b14b 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_ = [ @@ -251,7 +251,7 @@ class Metadata(Structure): class Node(Structure): """ - See 'aiScene.h' for details. + See 'scene.h' for details. """ @@ -296,7 +296,7 @@ Node._fields_ = [ class Light(Structure): """ - See 'aiLight.h' for details. + See 'light.h' for details. """ @@ -322,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 @@ -393,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. """ @@ -414,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 @@ -434,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_ = [ @@ -448,7 +471,7 @@ class Ray(Structure): class UVTransform(Structure): """ - See 'aiMaterial.h' for details. + See 'material.h' for details. """ _fields_ = [ @@ -469,7 +492,7 @@ class UVTransform(Structure): class MaterialProperty(Structure): """ - See 'aiMaterial.h' for details. + See 'material.h' for details. """ _fields_ = [ @@ -505,7 +528,7 @@ class MaterialProperty(Structure): class Material(Structure): """ - See 'aiMaterial.h' for details. + See 'material.h' for details. """ _fields_ = [ @@ -521,7 +544,7 @@ class Material(Structure): class Bone(Structure): """ - See 'aiMesh.h' for details. + See 'mesh.h' for details. """ _fields_ = [ @@ -540,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 @@ -676,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. """ @@ -746,7 +821,7 @@ class Camera(Structure): class VectorKey(Structure): """ - See 'aiAnim.h' for details. + See 'anim.h' for details. """ _fields_ = [ @@ -759,7 +834,7 @@ class VectorKey(Structure): class QuatKey(Structure): """ - See 'aiAnim.h' for details. + See 'anim.h' for details. """ _fields_ = [ @@ -770,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_ = [ @@ -821,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_ = [ @@ -852,6 +984,16 @@ 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 Scene(Structure): @@ -859,11 +1001,12 @@ 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 @@ -940,6 +1083,9 @@ class Scene(Structure): # 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, From 6ee9b07c494c1eb1d51d3ab0d3ecbe1a69d9ab13 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sun, 16 Sep 2018 17:13:34 +0200 Subject: [PATCH 20/47] closes https://github.com/assimp/assimp/issues/212: introduce unittest for line-splitter, will validate that the current behaviour is correct. --- code/AssbinExporter.cpp | 3 +- code/AssbinLoader.cpp | 1 - include/assimp/DefaultIOSystem.h | 3 +- include/assimp/LineSplitter.h | 287 ++++++++++++++++------------ include/assimp/StreamReader.h | 12 +- test/CMakeLists.txt | 6 +- test/unit/Common/utLineSplitter.cpp | 73 +++++++ 7 files changed, 246 insertions(+), 139 deletions(-) create mode 100644 test/unit/Common/utLineSplitter.cpp diff --git a/code/AssbinExporter.cpp b/code/AssbinExporter.cpp index a662e011e..d64b5c1de 100644 --- a/code/AssbinExporter.cpp +++ b/code/AssbinExporter.cpp @@ -824,8 +824,7 @@ public: } }; -void ExportSceneAssbin(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* /*pProperties*/) -{ +void ExportSceneAssbin(const char* pFile, IOSystem* pIOSystem, const aiScene* pScene, const ExportProperties* /*pProperties*/) { AssbinExport exporter; exporter.WriteBinaryDump( pFile, pIOSystem, pScene ); } diff --git a/code/AssbinLoader.cpp b/code/AssbinLoader.cpp index 191dc2137..81c77f3fa 100644 --- a/code/AssbinLoader.cpp +++ b/code/AssbinLoader.cpp @@ -547,7 +547,6 @@ void AssbinImporter::ReadBinaryTexture(IOStream * stream, aiTexture* tex) { stream->Read(tex->pcData,1,tex->mWidth*tex->mHeight*4); } } - } // ----------------------------------------------------------------------------------- diff --git a/include/assimp/DefaultIOSystem.h b/include/assimp/DefaultIOSystem.h index 23471d25a..a5d45c692 100644 --- a/include/assimp/DefaultIOSystem.h +++ b/include/assimp/DefaultIOSystem.h @@ -50,8 +50,7 @@ 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: // ------------------------------------------------------------------- /** Tests for the existence of a file at the given path. */ diff --git a/include/assimp/LineSplitter.h b/include/assimp/LineSplitter.h index e5ac98d85..eb6b6e46c 100644 --- a/include/assimp/LineSplitter.h +++ b/include/assimp/LineSplitter.h @@ -44,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 - #include "StreamReader.h" #include "ParsingUtils.h" @@ -81,164 +81,205 @@ 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++(); + LineSplitter(StreamReaderLE& stream, bool skip_empty_lines = true, bool trim = true); - idx = 0; - } - - ~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 - 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(); + + LineSplitter( const LineSplitter & ) = delete; + LineSplitter(LineSplitter &&) = delete; + LineSplitter &operator = ( const LineSplitter & ) = delete; private: - LineSplitter( const LineSplitter & ); - LineSplitter &operator = ( const LineSplitter & ); - -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 +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/include/assimp/StreamReader.h b/include/assimp/StreamReader.h index 3fab00ad2..b01ee4b66 100644 --- a/include/assimp/StreamReader.h +++ b/include/assimp/StreamReader.h @@ -67,16 +67,13 @@ namespace Assimp { * XXX switch from unsigned int for size types to size_t? or ptrdiff_t?*/ // -------------------------------------------------------------------------------------------- template -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. * @@ -111,8 +108,6 @@ public: delete[] buffer; } -public: - // deprecated, use overloaded operator>> instead // --------------------------------------------------------------------- @@ -176,7 +171,6 @@ public: return Get(); } -public: // --------------------------------------------------------------------- /** Get the remaining stream size (to the end of the stream) */ unsigned int GetRemainingSize() const { diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 675812a52..30e87161d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -40,8 +40,9 @@ cmake_minimum_required( VERSION 2.6 ) 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 ) @@ -74,6 +75,7 @@ SET( COMMON unit/utProfiler.cpp unit/utSharedPPData.cpp unit/utStringUtils.cpp + unit/Common/utLineSplitter.cpp ) SET( IMPORTERS diff --git a/test/unit/Common/utLineSplitter.cpp b/test/unit/Common/utLineSplitter.cpp new file mode 100644 index 000000000..558301a49 --- /dev/null +++ b/test/unit/Common/utLineSplitter.cpp @@ -0,0 +1,73 @@ +/* +--------------------------------------------------------------------------- +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 "UnitTestPCH.h" + +#include +#include +#include + +using namespace Assimp; + +class utLineSplitter : public ::testing::Test { + // empty +}; + + + +TEST_F(utLineSplitter, tokenizetest) { + DefaultIOSystem fs; + IOStream* file = fs.Open(ASSIMP_TEST_MODELS_DIR"/ParsingFiles/linesplitter_tokenizetest.txt", "rb"); + + StreamReaderLE stream(file); + LineSplitter myLineSplitter(stream); +} + +TEST_F( utLineSplitter, issue212Test) { + DefaultIOSystem fs; + IOStream* file = fs.Open(ASSIMP_TEST_MODELS_DIR"/ParsingFiles/linesplitter_emptyline_test.txt", "rb"); + + StreamReaderLE stream(file); + LineSplitter myLineSplitter(stream); + myLineSplitter++; + EXPECT_THROW( myLineSplitter++, std::logic_error ); +} From 7150024b27a9bc6edf60cfaed53f4a861e9810cd Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Mon, 17 Sep 2018 18:48:14 +0200 Subject: [PATCH 21/47] Add missing test-files. --- .../ParsingFiles/linesplitter_emptyline_test.txt | 3 +++ .../ParsingFiles/linesplitter_tokenizetest.txt | 12 ++++++++++++ test/unit/Common/utLineSplitter.cpp | 2 -- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 test/models/ParsingFiles/linesplitter_emptyline_test.txt create mode 100644 test/models/ParsingFiles/linesplitter_tokenizetest.txt diff --git a/test/models/ParsingFiles/linesplitter_emptyline_test.txt b/test/models/ParsingFiles/linesplitter_emptyline_test.txt new file mode 100644 index 000000000..907178e5d --- /dev/null +++ b/test/models/ParsingFiles/linesplitter_emptyline_test.txt @@ -0,0 +1,3 @@ +TEST + +the rest diff --git a/test/models/ParsingFiles/linesplitter_tokenizetest.txt b/test/models/ParsingFiles/linesplitter_tokenizetest.txt new file mode 100644 index 000000000..fc6d204af --- /dev/null +++ b/test/models/ParsingFiles/linesplitter_tokenizetest.txt @@ -0,0 +1,12 @@ +#1= IFCORGANIZATION('GS','Graphisoft','Graphisoft',$,$); +#5= IFCAPPLICATION(#1,'14.0','ArchiCAD 14.0','ArchiCAD'); +#6= IFCPERSON('','Haefele','Karl-Heinz',$,$,$,$,$); +#8= IFCORGANIZATION('','KIT / IAI','',$,$); +#12= IFCPERSONANDORGANIZATION(#6,#8,$); +#13= IFCOWNERHISTORY(#12,#5,$,.ADDED.,$,$,$,1286451639); +#14= IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.); +#15= IFCSIUNIT(*,.AREAUNIT.,$,.SQUARE_METRE.); +#16= IFCSIUNIT(*,.VOLUMEUNIT.,$,.CUBIC_METRE.); +#17= IFCSIUNIT(*,.PLANEANGLEUNIT.,$,.RADIAN.); +#18= IFCMEASUREWITHUNIT(IFCPLANEANGLEMEASURE(0.017453293),#17); + diff --git a/test/unit/Common/utLineSplitter.cpp b/test/unit/Common/utLineSplitter.cpp index 558301a49..ad050ea73 100644 --- a/test/unit/Common/utLineSplitter.cpp +++ b/test/unit/Common/utLineSplitter.cpp @@ -52,8 +52,6 @@ class utLineSplitter : public ::testing::Test { // empty }; - - TEST_F(utLineSplitter, tokenizetest) { DefaultIOSystem fs; IOStream* file = fs.Open(ASSIMP_TEST_MODELS_DIR"/ParsingFiles/linesplitter_tokenizetest.txt", "rb"); From 6488bc6387f0ba920d7355353afdef5e680c2051 Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Mon, 17 Sep 2018 13:36:34 +0300 Subject: [PATCH 22/47] Disable strict aliasing optimizations The code is not clean w.r.t the strict aliasing rules. In particular LWS importer breaks with GCC >= 6.0 if this is enabled. --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d6037259..34b7d1321 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -210,8 +210,8 @@ 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 "${CMAKE_CXX_FLAGS} -g -fvisibility=hidden -fPIC -fno-strict-aliasing -Wall -std=c++0x") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -fno-strict-aliasing") SET(LIBSTDC++_LIBRARIES -lstdc++) ELSEIF(MSVC) # enable multi-core compilation with MSVC @@ -224,11 +224,11 @@ ELSEIF(MSVC) 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 -std=c++11" ) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fvisibility=hidden -fPIC -fno-strict-aliasing -Wall -Wno-long-long -std=c++11" ) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -fno-strict-aliasing") ELSEIF( CMAKE_COMPILER_IS_MINGW ) - SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -Wall -Wno-long-long -std=c++11 -Wa,-mbig-obj" ) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC ") + SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fno-strict-aliasing -Wall -Wno-long-long -std=c++11 -Wa,-mbig-obj" ) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -fno-strict-aliasing") ADD_DEFINITIONS( -U__STRICT_ANSI__ ) ENDIF() From 78fe96f8c4e6b7e4bcfc618fad06e31a17eae2c4 Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Mon, 17 Sep 2018 13:54:03 +0300 Subject: [PATCH 23/47] Prepend our compiler flags instead of appending so overriding them works better --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 34b7d1321..f1482fdfa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -210,8 +210,8 @@ 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 -fno-strict-aliasing -Wall -std=c++0x") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -fno-strict-aliasing") + 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 @@ -224,11 +224,11 @@ ELSEIF(MSVC) ADD_COMPILE_OPTIONS(/wd4351) ENDIF() ELSEIF ( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" ) - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fvisibility=hidden -fPIC -fno-strict-aliasing -Wall -Wno-long-long -std=c++11" ) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -fno-strict-aliasing") + 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 -fno-strict-aliasing -Wall -Wno-long-long -std=c++11 -Wa,-mbig-obj" ) - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -fno-strict-aliasing") + 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() From 3402cd81c7c95f3c96db6b037023b94bd4c9ebc2 Mon Sep 17 00:00:00 2001 From: Vincent Fazio Date: Fri, 21 Sep 2018 10:31:21 +1000 Subject: [PATCH 24/47] Added interface to 'aiExportSceneToBlob()' for pyassimp --- port/PyAssimp/pyassimp/core.py | 29 ++++++++++++++++++++++++++++- port/PyAssimp/pyassimp/helper.py | 7 +++++-- port/PyAssimp/pyassimp/structs.py | 31 +++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 3 deletions(-) diff --git a/port/PyAssimp/pyassimp/core.py b/port/PyAssimp/pyassimp/core.py index 50d2f9a1a..4668eeda2 100644 --- a/port/PyAssimp/pyassimp/core.py +++ b/port/PyAssimp/pyassimp/core.py @@ -35,7 +35,7 @@ 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): @@ -352,6 +352,33 @@ def export(scene, 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 + --------- + ExportBlob + ''' + 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)) diff --git a/port/PyAssimp/pyassimp/helper.py b/port/PyAssimp/pyassimp/helper.py index f9163de2a..55e8a9d2b 100644 --- a/port/PyAssimp/pyassimp/helper.py +++ b/port/PyAssimp/pyassimp/helper.py @@ -176,6 +176,7 @@ def try_load_functions(library_path, dll): load from filename function, load from memory function, export to filename function, + export to blob function, release function, ctypes handle to assimp library) ''' @@ -185,15 +186,17 @@ def try_load_functions(library_path, dll): 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(): ''' diff --git a/port/PyAssimp/pyassimp/structs.py b/port/PyAssimp/pyassimp/structs.py index 15e50b14b..8a75c1e46 100644 --- a/port/PyAssimp/pyassimp/structs.py +++ b/port/PyAssimp/pyassimp/structs.py @@ -996,6 +996,37 @@ class Animation(Structure): ] +class ExportDataBlob(Structure): + """ + See 'cexport.h' for details. + """ + 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. From ef4e317625e8473077535055621b9779bb2109a4 Mon Sep 17 00:00:00 2001 From: Vincent Fazio Date: Fri, 21 Sep 2018 10:51:38 +1000 Subject: [PATCH 25/47] Improved some comments --- port/PyAssimp/pyassimp/core.py | 2 +- port/PyAssimp/pyassimp/structs.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/port/PyAssimp/pyassimp/core.py b/port/PyAssimp/pyassimp/core.py index 4668eeda2..64dd351a7 100644 --- a/port/PyAssimp/pyassimp/core.py +++ b/port/PyAssimp/pyassimp/core.py @@ -370,7 +370,7 @@ def export_blob(scene, pyassimp.postprocess.aiProcess_OptimizeMeshes) Returns --------- - ExportBlob + Pointer to structs.ExportDataBlob ''' from ctypes import pointer exportBlobPtr = _assimp_lib.export_blob(pointer(scene), file_type.encode("ascii"), processing) diff --git a/port/PyAssimp/pyassimp/structs.py b/port/PyAssimp/pyassimp/structs.py index 8a75c1e46..ddfd87f8a 100644 --- a/port/PyAssimp/pyassimp/structs.py +++ b/port/PyAssimp/pyassimp/structs.py @@ -999,6 +999,8 @@ class Animation(Structure): 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 From 8cb0b4ce2b5827fb0b847d749147c5b238e85f1f Mon Sep 17 00:00:00 2001 From: Vincent Fazio Date: Fri, 21 Sep 2018 11:02:14 +1000 Subject: [PATCH 26/47] Updated pyassimp function description --- port/PyAssimp/pyassimp/helper.py | 1 + 1 file changed, 1 insertion(+) diff --git a/port/PyAssimp/pyassimp/helper.py b/port/PyAssimp/pyassimp/helper.py index 55e8a9d2b..4e9f10e94 100644 --- a/port/PyAssimp/pyassimp/helper.py +++ b/port/PyAssimp/pyassimp/helper.py @@ -206,6 +206,7 @@ def search_library(): Returns: tuple, (load from filename function, load from memory function, export to filename function, + export to blob function, release function, dll) ''' From f818a909e5643a487aec4312f3e4fa9a3654752c Mon Sep 17 00:00:00 2001 From: kimkulling Date: Fri, 21 Sep 2018 16:07:09 +0200 Subject: [PATCH 27/47] Fix static-code-analysis findings. --- code/3DSHelper.h | 30 +- code/AMFImporter.hpp | 238 +- code/AMFImporter_Material.cpp | 98 +- code/AMFImporter_Node.hpp | 84 +- code/ASEParser.h | 77 +- code/BaseImporter.cpp | 2 +- code/BaseProcess.cpp | 2 +- code/BaseProcess.h | 8 +- code/COBLoader.cpp | 4 +- code/EmbedTexturesProcess.cpp | 2 +- code/Importer.h | 4 +- code/LWOAnimation.h | 39 +- code/LWOFileData.h | 14 +- code/LimitBoneWeightsProcess.h | 2 +- code/MD3Loader.h | 4 +- code/MD5Parser.h | 14 +- code/MDCFileData.h | 34 +- code/MDLFileData.h | 39 +- code/OptimizeMeshes.h | 18 +- code/PlyParser.h | 32 +- code/SMDLoader.h | 41 +- code/ScenePrivate.h | 4 +- code/TextureTransform.h | 33 +- code/XFileHelper.h | 118 +- contrib/irrXML/irrArray.h | 3 +- include/assimp/BaseImporter.h | 6 +- include/assimp/ByteSwapper.h | 5 +- include/assimp/DefaultIOStream.h | 24 +- include/assimp/IOStream.hpp | 4 +- include/assimp/IOSystem.hpp | 7 +- include/assimp/LogStream.hpp | 6 +- include/assimp/Logger.hpp | 12 +- include/assimp/ProgressHandler.hpp | 2 +- include/assimp/SGSpatialSort.h | 32 +- include/assimp/SmoothingGroups.h | 10 +- include/assimp/SpatialSort.h | 2 +- include/assimp/anim.h | 32 +- include/assimp/camera.h | 2 +- include/assimp/color4.h | 2 +- include/assimp/fast_atof.h | 2 +- include/assimp/light.h | 2 +- include/assimp/material.h | 4 +- include/assimp/matrix3x3.h | 2 +- include/assimp/matrix4x4.h | 2 +- include/assimp/matrix4x4.inl | 4 +- include/assimp/mesh.h | 190 +- include/assimp/metadata.h | 6 +- include/assimp/quaternion.h | 2 +- include/assimp/texture.h | 24 +- include/assimp/types.h | 19 +- include/assimp/vector3.h | 2 +- scripts/StepImporter/CppGenerator.py | 7 +- scripts/StepImporter/schema_ifc4.exp | 12401 ------------------------- test/CMakeLists.txt | 1 + test/unit/utAMFImportExport.cpp | 10 +- 55 files changed, 646 insertions(+), 13122 deletions(-) delete mode 100644 scripts/StepImporter/schema_ifc4.exp diff --git a/code/3DSHelper.h b/code/3DSHelper.h index 7476438bd..aee4aac8c 100644 --- a/code/3DSHelper.h +++ b/code/3DSHelper.h @@ -66,7 +66,7 @@ namespace D3DS { */ class Discreet3DS { private: - Discreet3DS() { + Discreet3DS() noexcept { // empty } @@ -328,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() noexcept + : mOffsetU (0.0) + , mOffsetV (0.0) + , mScaleU (1.0) + , mScaleV (1.0) + , mRotation (0.0) + , mMapMode (aiTextureMapMode_Wrap) + , bPrivate() + , iUVSrc (0) { mTextureBlend = get_qnan(); } @@ -394,7 +392,7 @@ struct Material //! Move constructor. This is explicitly written because MSVC doesn't support defaulting it - Material(Material &&other) + Material(Material &&other) noexcept : mName(std::move(other.mName)) , mDiffuse(std::move(other.mDiffuse)) , mSpecularExponent(std::move(other.mSpecularExponent)) @@ -418,7 +416,7 @@ struct Material } - Material &operator=(Material &&other) { + Material &operator=(Material &&other) noexcept { if (this == &other) { return *this; } @@ -447,7 +445,7 @@ struct Material } - ~Material() {} + virtual ~Material() {} //! Name of the material diff --git a/code/AMFImporter.hpp b/code/AMFImporter.hpp index 3c60caeab..3b2bcd23b 100644 --- a/code/AMFImporter.hpp +++ b/code/AMFImporter.hpp @@ -63,8 +63,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Header files, stdlib. #include -namespace Assimp -{ +namespace Assimp { + /// \class AMFImporter /// Class that holding scene graph which include: geometry, metadata, materials etc. /// @@ -99,100 +99,49 @@ namespace Assimp /// new - and children , , , , , /// old - and children , , , , , /// -class AMFImporter : public BaseImporter -{ - /***********************************************/ - /******************** Types ********************/ - /***********************************************/ - +class AMFImporter : public BaseImporter { private: + struct SPP_Material;// forward declaration - 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_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 post-processing step. More suitable container for material. + struct SPP_Material { + std::string ID;///< Material ID. + std::list Metadata;///< Metadata of material. + CAMFImporter_NodeElement_Color* Color;///< Color of material. + std::list Composition;///< List of child materials if current material is composition of few another. - /// \struct SPP_Material - /// Data type for postprocessing step. More suitable container for material. - struct SPP_Material - { - std::string ID;///< Material ID. - std::list Metadata;///< Metadata of material. - CAMFImporter_NodeElement_Color* Color;///< Color of material. - std::list 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; + }; - /// \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; - }; + /// 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 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; - }; + /// 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. + }; - /// \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 ******************/ - /***********************************************/ - -private: - - static const aiImporterDesc Description; - - /***********************************************/ - /****************** Variables ******************/ - /***********************************************/ - -private: - - CAMFImporter_NodeElement* mNodeElement_Cur;///< Current element. - std::list mNodeElement_List;///< All elements of scene graph. - irr::io::IrrXMLReader* mReader;///< Pointer to XML-reader object - std::string mUnit; - std::list mMaterial_Converted;///< List of converted materials for postprocessing step. - std::list 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(); @@ -200,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. @@ -208,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& 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. @@ -216,15 +163,13 @@ private: /// \return true - if the node is found, else - false. bool Find_ConvertedNode(const std::string& pID, std::list& 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. @@ -235,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& pVertexCoordinateArray, std::vector& pVertexColorArray) const /// Get data stored in and place it to arrays. /// \param [in] pNodeElement - reference to node element which kept data. /// \param [in] pVertexCoordinateArray - reference to vertices coordinates kept in . @@ -248,7 +189,6 @@ private: void PostprocessHelper_CreateMeshDataArray(const CAMFImporter_NodeElement_Mesh& pNodeElement, std::vector& pVertexCoordinateArray, std::vector& 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. Conversion: set of textures from \ref CAMFImporter_NodeElement_Texture to one \ref SPP_Texture and place it /// to converted textures list. @@ -260,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& pInputList, std::list > 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& pInputList, std::list >& pOutputList_Separated); - /// \fn void Postprocess_AddMetadata(const std::list& 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& pMetadataList, aiNode& pSceneNode) const; - /// \fn void Postprocess_BuildNodeAndObject(const CAMFImporter_NodeElement_Object& pNodeElement, std::list& pMeshList, aiNode** pSceneNode) /// To create aiMesh and aiNode for it from . /// \param [in] pNodeElement - reference to node element which kept 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& pMeshList, aiNode** pSceneNode); - /// \fn void Postprocess_BuildMeshSet(const CAMFImporter_NodeElement_Mesh& pNodeElement, const std::vector& pVertexCoordinateArray, const std::vector& pVertexColorArray, const CAMFImporter_NodeElement_Color* pObjectColor, std::list& pMeshList, aiNode& pSceneNode) /// Create mesh for every in . /// \param [in] pNodeElement - reference to node element which kept data. /// \param [in] pVertexCoordinateArray - reference to vertices coordinates for all 's. @@ -294,27 +230,20 @@ private: const std::vector& pVertexColorArray, const CAMFImporter_NodeElement_Color* pObjectColor, std::list& 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& pNodeList) const /// Create and add to aiNode's list new part of scene graph defined by . /// \param [in] pConstellation - reference to node. /// \param [out] pNodeList - reference to aiNode's list. void Postprocess_BuildConstellation(CAMFImporter_NodeElement_Constellation& pConstellation, std::list& 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.: /// @@ -324,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.: /// @@ -348,204 +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 *************/ - /***********************************************/ - - /***********************************************/ - /************** Functions: XML set *************/ - /***********************************************/ - - /// \fn void XML_CheckNode_MustHaveChildren() /// Check if current node have children: .... If not then exception will throwed. void XML_CheckNode_MustHaveChildren(); - /// \fn bool XML_CheckNode_NameEqual(const std::string& 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& 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& pOutputData) const; - /// \fn void ParseNode_Root() /// Parse node of the file. void ParseNode_Root(); - /******** Functions: top nodes *********/ - - /// \fn void ParseNode_Constellation() /// Parse node of the file. void ParseNode_Constellation(); - /// \fn void ParseNode_Constellation() /// Parse node of the file. void ParseNode_Instance(); - /// \fn void ParseNode_Material() /// Parse node of the file. void ParseNode_Material(); - /// \fn void ParseNode_Metadata() /// Parse node. void ParseNode_Metadata(); - /// \fn void ParseNode_Object() /// Parse node of the file. void ParseNode_Object(); - /// \fn void ParseNode_Texture() /// Parse node of the file. void ParseNode_Texture(); - /******** Functions: geometry nodes *********/ - - /// \fn void ParseNode_Coordinates() /// Parse node of the file. void ParseNode_Coordinates(); - /// \fn void ParseNode_Edge() /// Parse node of the file. void ParseNode_Edge(); - /// \fn void ParseNode_Mesh() /// Parse node of the file. void ParseNode_Mesh(); - /// \fn void ParseNode_Triangle() /// Parse node of the file. void ParseNode_Triangle(); - /// \fn void ParseNode_Vertex() /// Parse node of the file. void ParseNode_Vertex(); - /// \fn void ParseNode_Vertices() /// Parse node of the file. void ParseNode_Vertices(); - /// \fn void ParseNode_Volume() /// Parse node of the file. void ParseNode_Volume(); - /******** Functions: material nodes *********/ - - /// \fn void ParseNode_Color() /// Parse node of the file. void ParseNode_Color(); - /// \fn void ParseNode_TexMap(const bool pUseOldName = false) /// Parse of node of the file. /// \param [in] pUseOldName - if true then use old name of node(and children) - , instead of new name - . void ParseNode_TexMap(const bool pUseOldName = false); public: - - /// \fn AMFImporter() /// Default constructor. - AMFImporter() - : mNodeElement_Cur(nullptr), mReader(nullptr) - {} + AMFImporter() noexcept + : 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& 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 mNodeElement_List;///< All elements of scene graph. + irr::io::IrrXMLReader* mReader;///< Pointer to XML-reader object + std::string mUnit; + std::list mMaterial_Converted;///< List of converted materials for postprocessing step. + std::list mTexture_Converted;///< List of converted textures for postprocessing step. + +}; }// namespace Assimp diff --git a/code/AMFImporter_Material.cpp b/code/AMFImporter_Material.cpp index 2f65ad833..c9190bb92 100644 --- a/code/AMFImporter_Material.cpp +++ b/code/AMFImporter_Material.cpp @@ -68,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 . MACRO_ATTRREAD_LOOPBEG; @@ -98,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 is absent. Then manually add "a == 1". - if(!read_flag[3]) als.Color.a = 1; + if (!(read_flag[0] && read_flag[1] && read_flag[2])) { + throw DeadlyImportError("Not all color components are defined."); + } - }// if(!mReader->isEmptyElement()) + // check if 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. @@ -119,10 +122,9 @@ CAMFImporter_NodeElement* ne; // An available material. // Multi elements - Yes. // Parent element - . -void AMFImporter::ParseNode_Material() -{ -std::string id; -CAMFImporter_NodeElement* ne; +void AMFImporter::ParseNode_Material() { + std::string id; + CAMFImporter_NodeElement* ne; // Read attributes for node . MACRO_ATTRREAD_LOOPBEG; @@ -131,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; @@ -154,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. } @@ -181,14 +185,13 @@ CAMFImporter_NodeElement* ne; // Parent element - . 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 . MACRO_ATTRREAD_LOOPBEG; @@ -201,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; @@ -222,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. @@ -243,10 +263,8 @@ CAMFImporter_NodeElement* ne; // , , , , , . Old name: , , , , , . // 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 . MACRO_ATTRREAD_LOOPBEG; @@ -257,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 cdbedf2c7..c35f6d652 100644 --- a/code/AMFImporter_Node.hpp +++ b/code/AMFImporter_Node.hpp @@ -62,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 { @@ -96,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. @@ -200,30 +195,27 @@ struct CAMFImporter_NodeElement_Root : public CAMFImporter_NodeElement /// \struct CAMFImporter_NodeElement_Color /// Structure that define object node. -struct CAMFImporter_NodeElement_Color : public CAMFImporter_NodeElement -{ - /****************** Variables ******************/ +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.. - 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 , and .. - - /****************** Functions ******************/ - - /// \fn CAMFImporter_NodeElement_Color(CAMFImporter_NodeElement* pParent) - /// Constructor. - /// \param [in] pParent - pointer to parent node. + /// @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_Composed{""} + , Color() + , Profile() { + // empty + } +}; /// \struct CAMFImporter_NodeElement_Material /// Structure that define material node. -struct CAMFImporter_NodeElement_Material : public CAMFImporter_NodeElement -{ +struct CAMFImporter_NodeElement_Material : public CAMFImporter_NodeElement { /// \fn CAMFImporter_NodeElement_Material(CAMFImporter_NodeElement* pParent) /// Constructor. /// \param [in] pParent - pointer to parent node. @@ -339,43 +331,39 @@ struct CAMFImporter_NodeElement_Coordinates : public CAMFImporter_NodeElement /// \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) - {} + : CAMFImporter_NodeElement(ENET_Triangle, pParent) + , V{}{ + // empty + } };// struct CAMFImporter_NodeElement_Triangle diff --git a/code/ASEParser.h b/code/ASEParser.h index 70eb3de66..ad0e42e74 100644 --- a/code/ASEParser.h +++ b/code/ASEParser.h @@ -85,7 +85,7 @@ struct Material : public D3DS::Material //! Move constructor. This is explicitly written because MSVC doesn't support defaulting it - Material(Material &&other) + Material(Material &&other) noexcept : D3DS::Material(std::move(other)) , avSubMaterials(std::move(other.avSubMaterials)) , pcInstance(std::move(other.pcInstance)) @@ -95,7 +95,7 @@ struct Material : public D3DS::Material } - Material &operator=(Material &&other) { + Material &operator=(Material &&other) noexcept { if (this == &other) { return *this; } @@ -127,19 +127,14 @@ 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() noexcept + : amUVIndices{0} + , mColorIndices{0} + , iMaterial(DEFAULT_MATINDEX) + , iFace(0) { + // empty } //! special value to indicate that no material index has @@ -147,8 +142,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]; @@ -204,7 +197,7 @@ struct Animation TCB = 0x2 } mRotationType, mScalingType, mPositionType; - Animation() + Animation() noexcept : mRotationType (TRACK) , mScalingType (TRACK) , mPositionType (TRACK) @@ -223,14 +216,13 @@ struct Animation // --------------------------------------------------------------------------- /** 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) - abInheritPosition[i] = abInheritRotation[i] = abInheritScaling[i] = true; + InheritanceInfo() noexcept + : abInheritPosition{true} + , abInheritRotation{true} + , abInheritScaling{true} { + // empty } //! Inherit the parent's position?, axis order is x,y,z @@ -291,24 +283,23 @@ struct BaseNode // --------------------------------------------------------------------------- /** Helper structure to represent an ASE file mesh */ -struct Mesh : public MeshWithSmoothingGroups, public BaseNode -{ +struct Mesh : public MeshWithSmoothingGroups, public BaseNode { //! Default constructor has been deleted Mesh() = delete; - //! Construction from an existing name explicit Mesh(const std::string &name) - : BaseNode (BaseNode::Mesh, name) + : BaseNode( BaseNode::Mesh, name ) + , amTexCoords{ } + , mVertexColors() + , mBoneVertices() + , mBones() , iMaterialIndex(Face::DEFAULT_MATINDEX) - , 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; + , mNumUVComponents{ 2 } + , bSkip (false) { + // empty } - //! List of all texture coordinate sets std::vector amTexCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS]; @@ -396,12 +387,11 @@ struct Camera : public BaseNode // --------------------------------------------------------------------------- /** Helper structure to represent an ASE helper object (dummy) */ -struct Dummy : public BaseNode -{ +struct Dummy : public BaseNode { //! Constructor - Dummy() - : BaseNode (BaseNode::Dummy, "DUMMY") - { + Dummy() noexcept + : BaseNode (BaseNode::Dummy, "DUMMY") { + // empty } }; @@ -416,12 +406,11 @@ struct Dummy : public BaseNode // ------------------------------------------------------------------------------- /** \brief Class to parse ASE files */ -class Parser -{ - +class Parser { private: - - Parser() {} + Parser() noexcept { + // empty + } public: diff --git a/code/BaseImporter.cpp b/code/BaseImporter.cpp index 26c5ca14f..950fd4d02 100644 --- a/code/BaseImporter.cpp +++ b/code/BaseImporter.cpp @@ -65,7 +65,7 @@ using namespace Assimp; // ------------------------------------------------------------------------------------------------ // Constructor to be privately used by Importer -BaseImporter::BaseImporter() +BaseImporter::BaseImporter() noexcept : m_progress() { // nothing to do here } diff --git a/code/BaseProcess.cpp b/code/BaseProcess.cpp index ba968a819..e7ddce2b0 100644 --- a/code/BaseProcess.cpp +++ b/code/BaseProcess.cpp @@ -53,7 +53,7 @@ using namespace Assimp; // ------------------------------------------------------------------------------------------------ // Constructor to be privately used by Importer -BaseProcess::BaseProcess() +BaseProcess::BaseProcess() noexcept : shared() , progress() { diff --git a/code/BaseProcess.h b/code/BaseProcess.h index d9323fbef..0fb348fa5 100644 --- a/code/BaseProcess.h +++ b/code/BaseProcess.h @@ -211,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() noexcept; /** 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/COBLoader.cpp b/code/COBLoader.cpp index a9784fbec..a8e41dbbc 100644 --- a/code/COBLoader.cpp +++ b/code/COBLoader.cpp @@ -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 stream(new StreamReaderLE( pIOHandler->Open(pFile,"rb")) ); diff --git a/code/EmbedTexturesProcess.cpp b/code/EmbedTexturesProcess.cpp index 2fafc2de7..ebe7a0897 100644 --- a/code/EmbedTexturesProcess.cpp +++ b/code/EmbedTexturesProcess.cpp @@ -119,7 +119,7 @@ bool EmbedTexturesProcess::addTexture(aiScene* pScene, std::string path) const { } } - aiTexel* imageContent = new aiTexel[1u + imageSize / sizeof(aiTexel)]; + aiTexel* imageContent = new aiTexel[ 1ul + static_cast( imageSize ) / sizeof(aiTexel)]; file.seekg(0, std::ios::beg); file.read(reinterpret_cast(imageContent), imageSize); diff --git a/code/Importer.h b/code/Importer.h index 870638631..c85913f2e 100644 --- a/code/Importer.h +++ b/code/Importer.h @@ -120,11 +120,11 @@ public: SharedPostProcessInfo* mPPShared; /// The default class constructor. - ImporterPimpl(); + ImporterPimpl() noexcept; }; inline -ImporterPimpl::ImporterPimpl() +ImporterPimpl::ImporterPimpl() noexcept : mIOHandler( nullptr ) , mIsDefaultHandler( false ) , mProgressHandler( nullptr ) diff --git a/code/LWOAnimation.h b/code/LWOAnimation.h index 7d7c6d699..7edda5cc6 100644 --- a/code/LWOAnimation.h +++ b/code/LWOAnimation.h @@ -113,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() noexcept + : time() + , value() + , inter(IT_LINE) + , params() { + // empty + } //! Current time double time; @@ -144,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() noexcept + : index() + , type(EnvelopeType_Unknown) + , pre(PrePostBehaviour_Constant) + , post(PrePostBehaviour_Constant) + , old_first(0) + , old_last(0) { + // empty + } //! Index of this envelope unsigned int index; @@ -162,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/LWOFileData.h b/code/LWOFileData.h index 6e3c476c3..ec16f4b2d 100644 --- a/code/LWOFileData.h +++ b/code/LWOFileData.h @@ -261,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() noexcept + : surfaceIndex( 0 ) + , smoothGroup( 0 ) + , type( AI_LWO_FACE ) { + // empty + } //! Construction from given type explicit Face(uint32_t _type) diff --git a/code/LimitBoneWeightsProcess.h b/code/LimitBoneWeightsProcess.h index 090181982..6d31b1688 100644 --- a/code/LimitBoneWeightsProcess.h +++ b/code/LimitBoneWeightsProcess.h @@ -120,7 +120,7 @@ public: { unsigned int mBone; ///< Index of the bone float mWeight; ///< Weight of that bone on this vertex - Weight() + Weight() noexcept : mBone(0) , mWeight(0.0f) { } diff --git a/code/MD3Loader.h b/code/MD3Loader.h index e2a89afcd..d1ea4bef0 100644 --- a/code/MD3Loader.h +++ b/code/MD3Loader.h @@ -125,7 +125,7 @@ enum AlphaTestFunc */ struct ShaderMapBlock { - ShaderMapBlock() + ShaderMapBlock() noexcept : blend_src (BLEND_NONE) , blend_dest (BLEND_NONE) , alpha_test (AT_NONE) @@ -150,7 +150,7 @@ struct ShaderMapBlock */ struct ShaderDataBlock { - ShaderDataBlock() + ShaderDataBlock() noexcept : cull (CULL_CW) {} diff --git a/code/MD5Parser.h b/code/MD5Parser.h index b62df996f..60f3326df 100644 --- a/code/MD5Parser.h +++ b/code/MD5Parser.h @@ -192,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() noexcept + : 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 e89433ed7..3d93390f0 100644 --- a/code/MDCFileData.h +++ b/code/MDCFileData.h @@ -118,23 +118,23 @@ 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() noexcept + : ulIdent() + , ucName{ 0 } + , ulFlags() + , ulNumCompFrames() + , ulNumBaseFrames() + , ulNumShaders() + , ulNumVertices() + , ulNumTriangles() + , ulOffsetTriangles() + , ulOffsetShaders() + , ulOffsetTexCoords() + , ulOffsetBaseVerts() + , ulOffsetCompVerts() + , ulOffsetFrameBaseFrames() + , ulOffsetFrameCompFrames() + , ulOffsetEnd() { ucName[AI_MDC_MAXQPATH-1] = '\0'; } } PACK_STRUCT; diff --git a/code/MDLFileData.h b/code/MDLFileData.h index ba732add0..0446685cc 100644 --- a/code/MDLFileData.h +++ b/code/MDLFileData.h @@ -717,11 +717,10 @@ 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() noexcept + : mIndices { 0 } + , iMatIndex{ 0 } { + // empty } //! Vertex indices @@ -737,13 +736,12 @@ 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() noexcept + : pcMat( nullptr ) + , iOldMatIndices{ 0 } { + // empty } //! Material instance @@ -761,7 +759,7 @@ struct IntMaterial_MDL7 struct IntBone_MDL7 : aiBone { //! Default constructor - IntBone_MDL7() : iParent (0xffff) + IntBone_MDL7() noexcept : iParent (0xffff) { pkeyPositions.reserve(30); pkeyScalings.reserve(30); @@ -806,12 +804,12 @@ struct IntFrameInfo_MDL7 struct IntGroupInfo_MDL7 { //! Default constructor - IntGroupInfo_MDL7() + IntGroupInfo_MDL7() noexcept : iIndex(0) - , pcGroup(NULL) - , pcGroupUVs(NULL) - , pcGroupTris(NULL) - , pcGroupVerts(NULL) + , pcGroup(nullptr) + , pcGroupUVs(nullptr) + , pcGroupTris(nullptr) + , pcGroupVerts(nullptr) {} //! Construction from an existing group header @@ -843,7 +841,7 @@ struct IntGroupInfo_MDL7 //! Holds the data that belongs to a MDL7 mesh group struct IntGroupData_MDL7 { - IntGroupData_MDL7() + IntGroupData_MDL7() noexcept : bNeed2UV(false) {} @@ -872,10 +870,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() noexcept : apcOutBones(), iNum() { diff --git a/code/OptimizeMeshes.h b/code/OptimizeMeshes.h index f57447ccd..bb36c03f4 100644 --- a/code/OptimizeMeshes.h +++ b/code/OptimizeMeshes.h @@ -67,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() noexcept + : 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/PlyParser.h b/code/PlyParser.h index 261ac7b82..265fe81b3 100644 --- a/code/PlyParser.h +++ b/code/PlyParser.h @@ -209,7 +209,7 @@ enum EElementSemantic { class Property { public: //! Default constructor - Property() + Property() noexcept : eType (EDT_Int) , Semantic() , bIsList(false) @@ -257,7 +257,7 @@ public: class Element { public: //! Default constructor - Element() + Element() noexcept : eSemantic (EEST_INVALID) , NumOccur(0) { // empty @@ -297,8 +297,9 @@ class PropertyInstance public: //! Default constructor - PropertyInstance () - {} + PropertyInstance() noexcept { + // empty + } union ValueUnion { @@ -356,13 +357,13 @@ public: // --------------------------------------------------------------------------------- /** \brief Class for an element instance in a PLY file */ -class ElementInstance -{ +class ElementInstance { public: - //! Default constructor - ElementInstance () - {} + ElementInstance() noexcept + : alProperties() { + // empty + } //! List of all parsed properties std::vector< PropertyInstance > alProperties; @@ -386,8 +387,10 @@ class ElementInstanceList public: //! Default constructor - ElementInstanceList () - {} + ElementInstanceList() noexcept + : alInstances() { + // empty + } //! List of all element instances std::vector< ElementInstance > alInstances; @@ -411,8 +414,11 @@ class DOM public: //! Default constructor - DOM() - {} + DOM() noexcept + : alElements() + , alElementData() { + + } //! Contains all elements of the file format diff --git a/code/SMDLoader.h b/code/SMDLoader.h index adc596a63..09cfef77f 100644 --- a/code/SMDLoader.h +++ b/code/SMDLoader.h @@ -62,17 +62,17 @@ struct aiNode; // STL headers #include -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() noexcept + : iParentNode(UINT_MAX) { + // empty + } //! Vertex position, normal and texture coordinate aiVector3D pos,nor,uv; @@ -90,10 +90,12 @@ struct Vertex // --------------------------------------------------------------------------- /** Data structure for a face in a SMD file */ -struct Face -{ - Face() : iTexture(0x0) - {} +struct Face { + Face() noexcept + : iTexture(0x0) + , avVertices{} { + // empty + } //! Texture index for the face unsigned int iTexture; @@ -105,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() noexcept + : iParent(UINT_MAX) + , bIsUsed(false) { + // empty } //! Destructor @@ -124,12 +127,10 @@ struct Bone uint32_t iParent; //! Animation of the bone - struct Animation - { + struct Animation { //! Public default constructor - Animation() - : iFirstTimeKey() - { + Animation() noexcept + : iFirstTimeKey() { asKeys.reserve(20); } diff --git a/code/ScenePrivate.h b/code/ScenePrivate.h index 751b007d8..dc6e07d70 100644 --- a/code/ScenePrivate.h +++ b/code/ScenePrivate.h @@ -56,7 +56,7 @@ class Importer; struct ScenePrivateData { // The struct constructor. - ScenePrivateData(); + ScenePrivateData() noexcept; // Importer that originally loaded the scene though the C-API // If set, this object is owned by this private data instance. @@ -74,7 +74,7 @@ struct ScenePrivateData { }; inline -ScenePrivateData::ScenePrivateData() +ScenePrivateData::ScenePrivateData() noexcept : mOrigImporter( nullptr ) , mPPStepsApplied( 0 ) , mIsCopy( false ) { diff --git a/code/TextureTransform.h b/code/TextureTransform.h index fafa48178..241c52030 100644 --- a/code/TextureTransform.h +++ b/code/TextureTransform.h @@ -65,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() noexcept + : directShortcut(nullptr) + , mat(nullptr) + , semantic(0) + , index(0) { + // empty + } //! Direct shortcut, if available unsigned int* directShortcut; @@ -88,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() noexcept + : 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/XFileHelper.h b/code/XFileHelper.h index 582466689..0435c91df 100644 --- a/code/XFileHelper.h +++ b/code/XFileHelper.h @@ -55,32 +55,33 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -namespace Assimp -{ -namespace XFile -{ +namespace Assimp { +namespace XFile { /** Helper structure representing a XFile mesh face */ -struct Face -{ +struct Face { std::vector 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() noexcept + : 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; @@ -88,19 +89,18 @@ struct Material aiColor3D mSpecular; aiColor3D mEmissive; std::vector 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() noexcept + : mIsReference(false) + , mSpecularExponent() + , sceneIndex(SIZE_MAX) { + // empty + } }; /** Helper structure to represent a bone weight */ -struct BoneWeight -{ +struct BoneWeight { unsigned int mVertex; ai_real mWeight; }; @@ -114,8 +114,7 @@ struct Bone }; /** Helper structure to represent an XFile mesh */ -struct Mesh -{ +struct Mesh { std::string mName; std::vector mPositions; std::vector mPosFaces; @@ -131,38 +130,65 @@ struct Mesh std::vector mBones; - explicit Mesh(const std::string &pName = "") { mName = pName; mNumTextures = 0; mNumColorSets = 0; } + explicit Mesh(const std::string &pName = "") noexcept + : 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 mChildren; std::vector mMeshes; - Node() { mParent = NULL; } - explicit Node( Node* pParent) { mParent = pParent; } - ~Node() - { - for( unsigned int a = 0; a < mChildren.size(); a++) + Node() noexcept + : 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 mPosKeys; // either three separate key sequences for position, rotation, scaling std::vector mRotKeys; @@ -194,14 +220,22 @@ struct Scene std::vector mAnims; unsigned int mAnimTicksPerSecond; - Scene() { mRootNode = NULL; mAnimTicksPerSecond = 0; } - ~Scene() - { + Scene() noexcept + : 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/contrib/irrXML/irrArray.h b/contrib/irrXML/irrArray.h index 40c822590..ec1021d17 100644 --- a/contrib/irrXML/irrArray.h +++ b/contrib/irrXML/irrArray.h @@ -21,8 +21,7 @@ class array { public: - - array() + array() noexcept : data(0), allocated(0), used(0), free_when_destroyed(true), is_sorted(true) { diff --git a/include/assimp/BaseImporter.h b/include/assimp/BaseImporter.h index 7546f9912..e4e0412cf 100644 --- a/include/assimp/BaseImporter.h +++ b/include/assimp/BaseImporter.h @@ -77,19 +77,17 @@ class IOStream; * 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() noexcept; /** Destructor, private as well */ virtual ~BaseImporter(); -public: // ------------------------------------------------------------------- /** Returns whether the class can handle the format of the given file. * diff --git a/include/assimp/ByteSwapper.h b/include/assimp/ByteSwapper.h index 136944f24..9db172426 100644 --- a/include/assimp/ByteSwapper.h +++ b/include/assimp/ByteSwapper.h @@ -60,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() noexcept {} public: diff --git a/include/assimp/DefaultIOStream.h b/include/assimp/DefaultIOStream.h index fcd6061b3..9633ed002 100644 --- a/include/assimp/DefaultIOStream.h +++ b/include/assimp/DefaultIOStream.h @@ -69,7 +69,7 @@ class ASSIMP_API DefaultIOStream : public IOStream #endif // __ANDROID__ protected: - DefaultIOStream(); + DefaultIOStream() noexcept; DefaultIOStream(FILE* pFile, const std::string &strFilename); public: @@ -111,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() noexcept +: 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/IOStream.hpp b/include/assimp/IOStream.hpp index eb2a0f21c..30132cdbb 100644 --- a/include/assimp/IOStream.hpp +++ b/include/assimp/IOStream.hpp @@ -71,7 +71,7 @@ class ASSIMP_API IOStream { protected: /** Constructor protected, use IOSystem::Open() to create an instance. */ - IOStream(); + IOStream() noexcept; public: // ------------------------------------------------------------------- @@ -126,7 +126,7 @@ public: // ---------------------------------------------------------------------------------- inline -IOStream::IOStream() { +IOStream::IOStream() noexcept { // empty } diff --git a/include/assimp/IOSystem.hpp b/include/assimp/IOSystem.hpp index 1530492c0..5434fd36a 100644 --- a/include/assimp/IOSystem.hpp +++ b/include/assimp/IOSystem.hpp @@ -95,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() noexcept; // ------------------------------------------------------------------- /** @brief Virtual destructor. @@ -105,9 +105,6 @@ public: */ virtual ~IOSystem(); - -public: - // ------------------------------------------------------------------- /** @brief For backward compatibility * @see Exists(const char*) @@ -233,7 +230,7 @@ private: // ---------------------------------------------------------------------------- AI_FORCE_INLINE -IOSystem::IOSystem() +IOSystem::IOSystem() noexcept : m_pathStack() { // empty } diff --git a/include/assimp/LogStream.hpp b/include/assimp/LogStream.hpp index 00a979da3..84bffdaa5 100644 --- a/include/assimp/LogStream.hpp +++ b/include/assimp/LogStream.hpp @@ -65,7 +65,7 @@ class ASSIMP_API LogStream { protected: /** @brief Default constructor */ - LogStream(); + LogStream() noexcept; public: /** @brief Virtual destructor */ @@ -91,12 +91,12 @@ 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() { +LogStream::LogStream() noexcept { // empty } diff --git a/include/assimp/Logger.hpp b/include/assimp/Logger.hpp index 303f841ce..b59817e47 100644 --- a/include/assimp/Logger.hpp +++ b/include/assimp/Logger.hpp @@ -161,7 +161,7 @@ protected: /** * Default constructor */ - Logger(); + Logger() noexcept; /** * Construction with a given log severity @@ -215,8 +215,9 @@ protected: // ---------------------------------------------------------------------------------- // Default constructor inline -Logger::Logger() { - setLogSeverity(NORMAL); +Logger::Logger() noexcept +: m_Severity(NORMAL) { + // empty } // ---------------------------------------------------------------------------------- @@ -229,8 +230,9 @@ Logger::~Logger() { // ---------------------------------------------------------------------------------- // Construction with given logging severity inline -Logger::Logger(LogSeverity severity) { - setLogSeverity(severity); +Logger::Logger(LogSeverity severity) +: m_Severity(severity) { + // empty } // ---------------------------------------------------------------------------------- diff --git a/include/assimp/ProgressHandler.hpp b/include/assimp/ProgressHandler.hpp index b1d095b7f..020d190fa 100644 --- a/include/assimp/ProgressHandler.hpp +++ b/include/assimp/ProgressHandler.hpp @@ -63,7 +63,7 @@ class ASSIMP_API ProgressHandler { protected: /** @brief Default constructor */ - ProgressHandler () { + ProgressHandler () noexcept { } public: /** @brief Virtual destructor */ diff --git a/include/assimp/SGSpatialSort.h b/include/assimp/SGSpatialSort.h index 203e32512..a03701932 100644 --- a/include/assimp/SGSpatialSort.h +++ b/include/assimp/SGSpatialSort.h @@ -111,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( unsigned int pIndex, const aiVector3D& pPosition, float pDistance,uint32_t pSG) - : - mIndex( pIndex), - mPosition( pPosition), - mSmoothGroups (pSG), - mDistance( pDistance) - { } + Entry() noexcept + : mIndex(0) + , mPosition() + , mSmoothGroups(0) + , mDistance(0.0f) { + // empty + } - bool operator < (const Entry& e) const { return mDistance < e.mDistance; } + Entry( unsigned int pIndex, const aiVector3D& pPosition, float pDistance,uint32_t pSG) + : 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/SmoothingGroups.h b/include/assimp/SmoothingGroups.h index cdae578df..2ca81d756 100644 --- a/include/assimp/SmoothingGroups.h +++ b/include/assimp/SmoothingGroups.h @@ -52,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() noexcept + : 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/include/assimp/SpatialSort.h b/include/assimp/SpatialSort.h index 4c45e95ad..16022b5dd 100644 --- a/include/assimp/SpatialSort.h +++ b/include/assimp/SpatialSort.h @@ -153,7 +153,7 @@ protected: aiVector3D mPosition; ///< Position ai_real mDistance; ///< Distance of this vertex to the sorting plane - Entry() + Entry() noexcept : mIndex( 999999999 ), mPosition(), mDistance( 99999. ) { // empty } diff --git a/include/assimp/anim.h b/include/assimp/anim.h index 5ed51af0c..4b4c4370c 100644 --- a/include/assimp/anim.h +++ b/include/assimp/anim.h @@ -70,7 +70,7 @@ struct aiVectorKey #ifdef __cplusplus /// @brief The default constructor. - aiVectorKey() + aiVectorKey() noexcept : mTime( 0.0 ) , mValue() { // empty @@ -116,7 +116,7 @@ struct aiQuatKey C_STRUCT aiQuaternion mValue; #ifdef __cplusplus - aiQuatKey() + aiQuatKey() noexcept : mTime( 0.0 ) , mValue() { // empty @@ -163,7 +163,7 @@ struct aiMeshKey #ifdef __cplusplus - aiMeshKey() + aiMeshKey() noexcept : mTime(0.0) , mValue(0) { @@ -210,10 +210,10 @@ struct aiMeshMorphKey /** The number of values and weights */ unsigned int mNumValuesAndWeights; #ifdef __cplusplus - aiMeshMorphKey() + aiMeshMorphKey() noexcept : mTime(0.0) - , mValues(NULL) - , mWeights(NULL) + , mValues(nullptr) + , mWeights(nullptr) , mNumValuesAndWeights(0) { @@ -324,13 +324,13 @@ struct aiNodeAnim { C_ENUM aiAnimBehaviour mPostState; #ifdef __cplusplus - aiNodeAnim() + aiNodeAnim() noexcept : 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 @@ -366,7 +366,7 @@ struct aiMeshAnim #ifdef __cplusplus - aiMeshAnim() + aiMeshAnim() noexcept : mNumKeys() , mKeys() {} @@ -397,7 +397,7 @@ struct aiMeshMorphAnim #ifdef __cplusplus - aiMeshMorphAnim() + aiMeshMorphAnim() noexcept : mNumKeys() , mKeys() {} @@ -451,15 +451,15 @@ struct aiAnimation { C_STRUCT aiMeshMorphAnim **mMorphMeshChannels; #ifdef __cplusplus - aiAnimation() + aiAnimation() noexcept : 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 8073d84ae..6cd244c41 100644 --- a/include/assimp/camera.h +++ b/include/assimp/camera.h @@ -174,7 +174,7 @@ struct aiCamera #ifdef __cplusplus - aiCamera() + aiCamera() noexcept : 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/color4.h b/include/assimp/color4.h index ced470b28..bc934731b 100644 --- a/include/assimp/color4.h +++ b/include/assimp/color4.h @@ -59,7 +59,7 @@ template class aiColor4t { public: - aiColor4t () : r(), g(), b(), a() {} + aiColor4t() noexcept : 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) {} diff --git a/include/assimp/fast_atof.h b/include/assimp/fast_atof.h index 735cfe2da..62ea969e9 100644 --- a/include/assimp/fast_atof.h +++ b/include/assimp/fast_atof.h @@ -195,7 +195,7 @@ uint64_t strtoul10_64( const char* in, const char** out=0, unsigned int* max_ino 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 ) { diff --git a/include/assimp/light.h b/include/assimp/light.h index 8a306009f..457b55950 100644 --- a/include/assimp/light.h +++ b/include/assimp/light.h @@ -237,7 +237,7 @@ struct aiLight #ifdef __cplusplus - aiLight() + aiLight() noexcept : mType (aiLightSource_UNDEFINED) , mAttenuationConstant (0.f) , mAttenuationLinear (1.f) diff --git a/include/assimp/material.h b/include/assimp/material.h index 911853b4b..d88d11b65 100644 --- a/include/assimp/material.h +++ b/include/assimp/material.h @@ -483,7 +483,7 @@ struct aiUVTransform #ifdef __cplusplus - aiUVTransform() + aiUVTransform() noexcept : mTranslation (0.0,0.0) , mScaling (1.0,1.0) , mRotation (0.0) @@ -607,7 +607,7 @@ struct aiMaterialProperty #ifdef __cplusplus - aiMaterialProperty() + aiMaterialProperty() noexcept : mSemantic( 0 ) , mIndex( 0 ) , mDataLength( 0 ) diff --git a/include/assimp/matrix3x3.h b/include/assimp/matrix3x3.h index 3f50a0bc2..bbb6cb104 100644 --- a/include/assimp/matrix3x3.h +++ b/include/assimp/matrix3x3.h @@ -69,7 +69,7 @@ class aiMatrix3x3t { public: - aiMatrix3x3t () : + aiMatrix3x3t() noexcept : a1(static_cast(1.0f)), a2(), a3(), b1(), b2(static_cast(1.0f)), b3(), c1(), c2(), c3(static_cast(1.0f)) {} diff --git a/include/assimp/matrix4x4.h b/include/assimp/matrix4x4.h index 851050316..b545b73f8 100644 --- a/include/assimp/matrix4x4.h +++ b/include/assimp/matrix4x4.h @@ -71,7 +71,7 @@ class aiMatrix4x4t public: /** set to identity */ - aiMatrix4x4t (); + aiMatrix4x4t() noexcept; /** 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 6f96d5a6b..a5a41ec25 100644 --- a/include/assimp/matrix4x4.inl +++ b/include/assimp/matrix4x4.inl @@ -60,7 +60,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // ---------------------------------------------------------------------------------------- template -aiMatrix4x4t ::aiMatrix4x4t () : +aiMatrix4x4t::aiMatrix4x4t() noexcept : a1(1.0f), a2(), a3(), a4(), b1(), b2(1.0f), b3(), b4(), c1(), c2(), c3(1.0f), c4(), @@ -71,7 +71,7 @@ aiMatrix4x4t ::aiMatrix4x4t () : // ---------------------------------------------------------------------------------------- template -aiMatrix4x4t ::aiMatrix4x4t (TReal _a1, TReal _a2, TReal _a3, TReal _a4, +aiMatrix4x4t::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) : diff --git a/include/assimp/mesh.h b/include/assimp/mesh.h index 731053614..5b4f30a23 100644 --- a/include/assimp/mesh.h +++ b/include/assimp/mesh.h @@ -136,10 +136,10 @@ struct aiFace #ifdef __cplusplus //! Default constructor - aiFace() - : mNumIndices( 0 ) - , mIndices( NULL ) - { + aiFace() noexcept + : mNumIndices( 0 ) + , mIndices( nullptr ) { + // empty } //! Default destructor. Delete the index array @@ -150,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 @@ -211,13 +220,13 @@ struct aiVertexWeight { #ifdef __cplusplus //! Default constructor - aiVertexWeight() + aiVertexWeight() noexcept : 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 ) @@ -273,21 +282,21 @@ struct aiBone { #ifdef __cplusplus //! Default constructor - aiBone() + aiBone() noexcept : mName() , mNumWeights( 0 ) - , mWeights( nullptr ) { + , mWeights( nullptr ) + , mOffsetMatrix() { // empty } //! Copy constructor aiBone(const aiBone& other) - : mName( other.mName ) - , mNumWeights( other.mNumWeights ) - , mOffsetMatrix( other.mOffsetMatrix ) - { - if (other.mWeights && other.mNumWeights) - { + : 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)); } @@ -295,8 +304,7 @@ struct aiBone { //! Assignment operator - aiBone &operator=(const aiBone& other) - { + aiBone &operator=(const aiBone& other) { if (this == &other) { return *this; } @@ -332,8 +340,7 @@ struct aiBone { return true; } //! Destructor - deletes the array of vertex weights - ~aiBone() - { + ~aiBone() { delete [] mWeights; } #endif // __cplusplus @@ -447,11 +454,13 @@ struct aiAnimMesh #ifdef __cplusplus - aiAnimMesh() - : mVertices( NULL ) - , mNormals( NULL ) - , mTangents( NULL ) - , mBitangents( NULL ) + aiAnimMesh() noexcept + : mVertices( nullptr ) + , mNormals(nullptr) + , mTangents(nullptr) + , mBitangents(nullptr) + , mColors() + , mTextureCoords() , mNumVertices( 0 ) , mWeight( 0.0f ) { @@ -706,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() noexcept + : 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; @@ -767,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 8ac8e250a..cee03fcec 100644 --- a/include/assimp/metadata.h +++ b/include/assimp/metadata.h @@ -129,7 +129,7 @@ struct aiMetadata { /** * @brief The default constructor, set all members to zero by default. */ - aiMetadata() + aiMetadata() noexcept : mNumProperties(0) , mKeys(nullptr) , mValues(nullptr) { @@ -141,11 +141,11 @@ struct aiMetadata { , mKeys( nullptr ) , mValues( nullptr ) { mKeys = new aiString[ mNumProperties ]; - for ( unsigned int i = 0; i < mNumProperties; ++i ) { + for ( size_t i = 0; i < static_cast( mNumProperties ); ++i ) { mKeys[ i ] = rhs.mKeys[ i ]; } mValues = new aiMetadataEntry[ mNumProperties ]; - for ( unsigned int i = 0; i < mNumProperties; ++i ) { + for ( size_t i = 0; i < static_cast(mNumProperties); ++i ) { mValues[ i ].mType = rhs.mValues[ i ].mType; switch ( rhs.mValues[ i ].mType ) { case AI_BOOL: diff --git a/include/assimp/quaternion.h b/include/assimp/quaternion.h index 3c8ab50af..355167efc 100644 --- a/include/assimp/quaternion.h +++ b/include/assimp/quaternion.h @@ -60,7 +60,7 @@ template class aiQuaterniont { public: - aiQuaterniont() : w(1.0), x(), y(), z() {} + aiQuaterniont() noexcept : 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/texture.h b/include/assimp/texture.h index e55c8bc41..5c0670792 100644 --- a/include/assimp/texture.h +++ b/include/assimp/texture.h @@ -131,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 @@ -193,24 +192,27 @@ 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() noexcept + : mWidth(0) + , mHeight(0) + , achFormatHint{ 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 9868f657c..593ba8e46 100644 --- a/include/assimp/types.h +++ b/include/assimp/types.h @@ -122,7 +122,8 @@ extern "C" { struct aiPlane { #ifdef __cplusplus - aiPlane () : a(0.f), b(0.f), c(0.f), d(0.f) {} + aiPlane () noexcept : 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) {} @@ -140,7 +141,7 @@ struct aiPlane struct aiRay { #ifdef __cplusplus - aiRay () {} + aiRay () noexcept {} aiRay (const aiVector3D& _pos, const aiVector3D& _dir) : pos(_pos), dir(_dir) {} @@ -158,7 +159,7 @@ struct aiRay struct aiColor3D { #ifdef __cplusplus - aiColor3D () : r(0.0f), g(0.0f), b(0.0f) {} + aiColor3D () noexcept : 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 +254,9 @@ struct aiString { #ifdef __cplusplus /** Default constructor, the string is set to have zero length */ - aiString() : - length(0) - { + aiString() noexcept + : length( 0 ) + , data {0} { data[0] = '\0'; #ifdef ASSIMP_BUILD_DEBUG @@ -305,7 +306,7 @@ struct aiString } - /** Assigment operator */ + /** Assignment operator */ aiString& operator = (const aiString &rOther) { if (this == &rOther) { return *this; @@ -373,7 +374,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; @@ -479,7 +480,7 @@ struct aiMemoryInfo #ifdef __cplusplus /** Default constructor */ - aiMemoryInfo() + aiMemoryInfo() noexcept : textures (0) , materials (0) , meshes (0) diff --git a/include/assimp/vector3.h b/include/assimp/vector3.h index 292da8248..2f59438d3 100644 --- a/include/assimp/vector3.h +++ b/include/assimp/vector3.h @@ -66,7 +66,7 @@ template class aiVector3t { public: - aiVector3t() : x(), y(), z() {} + aiVector3t() noexcept : 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) {} diff --git a/scripts/StepImporter/CppGenerator.py b/scripts/StepImporter/CppGenerator.py index a05716619..b6b692db7 100644 --- a/scripts/StepImporter/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. # @@ -280,8 +280,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/StepImporter/schema_ifc4.exp b/scripts/StepImporter/schema_ifc4.exp deleted file mode 100644 index cf1fe155e..000000000 --- a/scripts/StepImporter/schema_ifc4.exp +++ /dev/null @@ -1,12401 +0,0 @@ -(* -Copyright by: -buildingSMART International Limited, 1996-2016 - -Any technical documentation made available by buildingSMART International Limited -is the copyrighted work of buildingSMART International Limited and is owned by the -buildingSMART International Limited. It may be photocopied, used in software development, -or translated into another computer language without prior written consent from -buildingSMART International Limited provided that full attribution is given. -Prior written consent is required if changes are made to the technical specification. - -This material is delivered to you as is and buildingSMART International Limited makes -no warranty of any kind with regard to it, including, but not limited to, the implied -warranties as to its accuracy or fitness for a particular purpose. Any use of the -technical documentation or the information contained therein is at the risk of the user. -Documentation may include technical or other inaccuracies or typographical errors. -buildingSMART International Limited shall not be liable for errors contained therein or -for incidental consequential damages in connection with the furnishing, performance or use -of the material. The information contained in this document is subject to change without notice. - -Issue date: -Montag, 11. Juli 2016 - -*) - -SCHEMA IFC4; - -TYPE IfcStrippedOptional = BOOLEAN; -END_TYPE; - -TYPE IfcAbsorbedDoseMeasure = REAL; -END_TYPE; - -TYPE IfcAccelerationMeasure = REAL; -END_TYPE; - -TYPE IfcAmountOfSubstanceMeasure = REAL; -END_TYPE; - -TYPE IfcAngularVelocityMeasure = REAL; -END_TYPE; - -TYPE IfcArcIndex = LIST [3:3] OF IfcPositiveInteger; -END_TYPE; - -TYPE IfcAreaDensityMeasure = REAL; -END_TYPE; - -TYPE IfcAreaMeasure = REAL; -END_TYPE; - -TYPE IfcBinary = BINARY; -END_TYPE; - -TYPE IfcBoolean = BOOLEAN; -END_TYPE; - -TYPE IfcBoxAlignment = IfcLabel; - WHERE - WR1 : SELF IN ['top-left', 'top-middle', 'top-right', 'middle-left', 'center', 'middle-right', 'bottom-left', 'bottom-middle', 'bottom-right']; -END_TYPE; - -TYPE IfcCardinalPointReference = INTEGER; - WHERE - GreaterThanZero : SELF > 0; -END_TYPE; - -TYPE IfcComplexNumber = ARRAY [1:2] OF REAL; -END_TYPE; - -TYPE IfcCompoundPlaneAngleMeasure = LIST [3:4] OF INTEGER; - WHERE - MinutesInRange : ABS(SELF[2]) < 60; - SecondsInRange : ABS(SELF[3]) < 60; - MicrosecondsInRange : (SIZEOF(SELF) = 3) OR (ABS(SELF[4]) < 1000000); - ConsistentSign : ((SELF[1] >= 0) AND (SELF[2] >= 0) AND (SELF[3] >= 0) AND ((SIZEOF(SELF) = 3) OR (SELF[4] >= 0))) -OR -((SELF[1] <= 0) AND (SELF[2] <= 0) AND (SELF[3] <= 0) AND ((SIZEOF(SELF) = 3) OR (SELF[4] <= 0))); -END_TYPE; - -TYPE IfcContextDependentMeasure = REAL; -END_TYPE; - -TYPE IfcCountMeasure = NUMBER; -END_TYPE; - -TYPE IfcCurvatureMeasure = REAL; -END_TYPE; - -TYPE IfcDate = STRING; -END_TYPE; - -TYPE IfcDateTime = STRING; -END_TYPE; - -TYPE IfcDayInMonthNumber = INTEGER; - WHERE - ValidRange : {1 <= SELF <= 31}; -END_TYPE; - -TYPE IfcDayInWeekNumber = INTEGER; - WHERE - ValidRange : {1 <= SELF <= 7}; -END_TYPE; - -TYPE IfcDescriptiveMeasure = STRING; -END_TYPE; - -TYPE IfcDimensionCount = INTEGER; - WHERE - WR1 : { 0 < SELF <= 3 }; -END_TYPE; - -TYPE IfcDoseEquivalentMeasure = REAL; -END_TYPE; - -TYPE IfcDuration = STRING; -END_TYPE; - -TYPE IfcDynamicViscosityMeasure = REAL; -END_TYPE; - -TYPE IfcElectricCapacitanceMeasure = REAL; -END_TYPE; - -TYPE IfcElectricChargeMeasure = REAL; -END_TYPE; - -TYPE IfcElectricConductanceMeasure = REAL; -END_TYPE; - -TYPE IfcElectricCurrentMeasure = REAL; -END_TYPE; - -TYPE IfcElectricResistanceMeasure = REAL; -END_TYPE; - -TYPE IfcElectricVoltageMeasure = REAL; -END_TYPE; - -TYPE IfcEnergyMeasure = REAL; -END_TYPE; - -TYPE IfcFontStyle = STRING; - WHERE - WR1 : SELF IN ['normal','italic','oblique']; -END_TYPE; - -TYPE IfcFontVariant = STRING; - WHERE - WR1 : SELF IN ['normal','small-caps']; -END_TYPE; - -TYPE IfcFontWeight = STRING; - WHERE - WR1 : SELF IN ['normal','small-caps','100','200','300','400','500','600','700','800','900']; -END_TYPE; - -TYPE IfcForceMeasure = REAL; -END_TYPE; - -TYPE IfcFrequencyMeasure = REAL; -END_TYPE; - -TYPE IfcGloballyUniqueId = STRING(22) FIXED; -END_TYPE; - -TYPE IfcHeatFluxDensityMeasure = REAL; -END_TYPE; - -TYPE IfcHeatingValueMeasure = REAL; - WHERE - WR1 : SELF > 0.; -END_TYPE; - -TYPE IfcIdentifier = STRING(255); -END_TYPE; - -TYPE IfcIlluminanceMeasure = REAL; -END_TYPE; - -TYPE IfcInductanceMeasure = REAL; -END_TYPE; - -TYPE IfcInteger = INTEGER; -END_TYPE; - -TYPE IfcIntegerCountRateMeasure = INTEGER; -END_TYPE; - -TYPE IfcIonConcentrationMeasure = REAL; -END_TYPE; - -TYPE IfcIsothermalMoistureCapacityMeasure = REAL; -END_TYPE; - -TYPE IfcKinematicViscosityMeasure = REAL; -END_TYPE; - -TYPE IfcLabel = STRING(255); -END_TYPE; - -TYPE IfcLanguageId = IfcIdentifier; -END_TYPE; - -TYPE IfcLengthMeasure = REAL; -END_TYPE; - -TYPE IfcLineIndex = LIST [2:?] OF IfcPositiveInteger; -END_TYPE; - -TYPE IfcLinearForceMeasure = REAL; -END_TYPE; - -TYPE IfcLinearMomentMeasure = REAL; -END_TYPE; - -TYPE IfcLinearStiffnessMeasure = REAL; -END_TYPE; - -TYPE IfcLinearVelocityMeasure = REAL; -END_TYPE; - -TYPE IfcLogical = LOGICAL; -END_TYPE; - -TYPE IfcLuminousFluxMeasure = REAL; -END_TYPE; - -TYPE IfcLuminousIntensityDistributionMeasure = REAL; -END_TYPE; - -TYPE IfcLuminousIntensityMeasure = REAL; -END_TYPE; - -TYPE IfcMagneticFluxDensityMeasure = REAL; -END_TYPE; - -TYPE IfcMagneticFluxMeasure = REAL; -END_TYPE; - -TYPE IfcMassDensityMeasure = REAL; -END_TYPE; - -TYPE IfcMassFlowRateMeasure = REAL; -END_TYPE; - -TYPE IfcMassMeasure = REAL; -END_TYPE; - -TYPE IfcMassPerLengthMeasure = REAL; -END_TYPE; - -TYPE IfcModulusOfElasticityMeasure = REAL; -END_TYPE; - -TYPE IfcModulusOfLinearSubgradeReactionMeasure = REAL; -END_TYPE; - -TYPE IfcModulusOfRotationalSubgradeReactionMeasure = REAL; -END_TYPE; - -TYPE IfcModulusOfSubgradeReactionMeasure = REAL; -END_TYPE; - -TYPE IfcMoistureDiffusivityMeasure = REAL; -END_TYPE; - -TYPE IfcMolecularWeightMeasure = REAL; -END_TYPE; - -TYPE IfcMomentOfInertiaMeasure = REAL; -END_TYPE; - -TYPE IfcMonetaryMeasure = REAL; -END_TYPE; - -TYPE IfcMonthInYearNumber = INTEGER; - WHERE - ValidRange : {1 <= SELF <= 12}; -END_TYPE; - -TYPE IfcNonNegativeLengthMeasure = IfcLengthMeasure; - WHERE - NotNegative : SELF >= 0.; -END_TYPE; - -TYPE IfcNormalisedRatioMeasure = IfcRatioMeasure; - WHERE - WR1 : {0.0 <= SELF <= 1.0}; -END_TYPE; - -TYPE IfcNumericMeasure = NUMBER; -END_TYPE; - -TYPE IfcPHMeasure = REAL; - WHERE - WR21 : {0.0 <= SELF <= 14.0}; -END_TYPE; - -TYPE IfcParameterValue = REAL; -END_TYPE; - -TYPE IfcPlanarForceMeasure = REAL; -END_TYPE; - -TYPE IfcPlaneAngleMeasure = REAL; -END_TYPE; - -TYPE IfcPositiveInteger = IfcInteger; - WHERE - WR1 : SELF > 0; -END_TYPE; - -TYPE IfcPositiveLengthMeasure = IfcLengthMeasure; - WHERE - WR1 : SELF > 0.; -END_TYPE; - -TYPE IfcPositivePlaneAngleMeasure = IfcPlaneAngleMeasure; - WHERE - WR1 : SELF > 0.; -END_TYPE; - -TYPE IfcPositiveRatioMeasure = IfcRatioMeasure; - WHERE - WR1 : SELF > 0.; -END_TYPE; - -TYPE IfcPowerMeasure = REAL; -END_TYPE; - -TYPE IfcPresentableText = STRING; -END_TYPE; - -TYPE IfcPressureMeasure = REAL; -END_TYPE; - -TYPE IfcPropertySetDefinitionSet = SET [1:?] OF IfcPropertySetDefinition; -END_TYPE; - -TYPE IfcRadioActivityMeasure = REAL; -END_TYPE; - -TYPE IfcRatioMeasure = REAL; -END_TYPE; - -TYPE IfcReal = REAL; -END_TYPE; - -TYPE IfcRotationalFrequencyMeasure = REAL; -END_TYPE; - -TYPE IfcRotationalMassMeasure = REAL; -END_TYPE; - -TYPE IfcRotationalStiffnessMeasure = REAL; -END_TYPE; - -TYPE IfcSectionModulusMeasure = REAL; -END_TYPE; - -TYPE IfcSectionalAreaIntegralMeasure = REAL; -END_TYPE; - -TYPE IfcShearModulusMeasure = REAL; -END_TYPE; - -TYPE IfcSolidAngleMeasure = REAL; -END_TYPE; - -TYPE IfcSoundPowerLevelMeasure = REAL; -END_TYPE; - -TYPE IfcSoundPowerMeasure = REAL; -END_TYPE; - -TYPE IfcSoundPressureLevelMeasure = REAL; -END_TYPE; - -TYPE IfcSoundPressureMeasure = REAL; -END_TYPE; - -TYPE IfcSpecificHeatCapacityMeasure = REAL; -END_TYPE; - -TYPE IfcSpecularExponent = REAL; -END_TYPE; - -TYPE IfcSpecularRoughness = REAL; - WHERE - WR1 : {0.0 <= SELF <= 1.0}; -END_TYPE; - -TYPE IfcTemperatureGradientMeasure = REAL; -END_TYPE; - -TYPE IfcTemperatureRateOfChangeMeasure = REAL; -END_TYPE; - -TYPE IfcText = STRING; -END_TYPE; - -TYPE IfcTextAlignment = STRING; - WHERE - WR1 : SELF IN ['left', 'right', 'center', 'justify']; -END_TYPE; - -TYPE IfcTextDecoration = STRING; - WHERE - WR1 : SELF IN ['none', 'underline', 'overline', 'line-through', 'blink']; -END_TYPE; - -TYPE IfcTextFontName = STRING; -END_TYPE; - -TYPE IfcTextTransformation = STRING; - WHERE - WR1 : SELF IN ['capitalize', 'uppercase', 'lowercase', 'none']; -END_TYPE; - -TYPE IfcThermalAdmittanceMeasure = REAL; -END_TYPE; - -TYPE IfcThermalConductivityMeasure = REAL; -END_TYPE; - -TYPE IfcThermalExpansionCoefficientMeasure = REAL; -END_TYPE; - -TYPE IfcThermalResistanceMeasure = REAL; -END_TYPE; - -TYPE IfcThermalTransmittanceMeasure = REAL; -END_TYPE; - -TYPE IfcThermodynamicTemperatureMeasure = REAL; -END_TYPE; - -TYPE IfcTime = STRING; -END_TYPE; - -TYPE IfcTimeMeasure = REAL; -END_TYPE; - -TYPE IfcTimeStamp = INTEGER; -END_TYPE; - -TYPE IfcTorqueMeasure = REAL; -END_TYPE; - -TYPE IfcURIReference = STRING; -END_TYPE; - -TYPE IfcVaporPermeabilityMeasure = REAL; -END_TYPE; - -TYPE IfcVolumeMeasure = REAL; -END_TYPE; - -TYPE IfcVolumetricFlowRateMeasure = REAL; -END_TYPE; - -TYPE IfcWarpingConstantMeasure = REAL; -END_TYPE; - -TYPE IfcWarpingMomentMeasure = REAL; -END_TYPE; - -TYPE IfcActionRequestTypeEnum = ENUMERATION OF - (EMAIL - ,FAX - ,PHONE - ,POST - ,VERBAL - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcActionSourceTypeEnum = ENUMERATION OF - (DEAD_LOAD_G - ,COMPLETION_G1 - ,LIVE_LOAD_Q - ,SNOW_S - ,WIND_W - ,PRESTRESSING_P - ,SETTLEMENT_U - ,TEMPERATURE_T - ,EARTHQUAKE_E - ,FIRE - ,IMPULSE - ,IMPACT - ,TRANSPORT - ,ERECTION - ,PROPPING - ,SYSTEM_IMPERFECTION - ,SHRINKAGE - ,CREEP - ,LACK_OF_FIT - ,BUOYANCY - ,ICE - ,CURRENT - ,WAVE - ,RAIN - ,BRAKES - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcActionTypeEnum = ENUMERATION OF - (PERMANENT_G - ,VARIABLE_Q - ,EXTRAORDINARY_A - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcActuatorTypeEnum = ENUMERATION OF - (ELECTRICACTUATOR - ,HANDOPERATEDACTUATOR - ,HYDRAULICACTUATOR - ,PNEUMATICACTUATOR - ,THERMOSTATICACTUATOR - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcAddressTypeEnum = ENUMERATION OF - (OFFICE - ,SITE - ,HOME - ,DISTRIBUTIONPOINT - ,USERDEFINED); -END_TYPE; - -TYPE IfcAirTerminalBoxTypeEnum = ENUMERATION OF - (CONSTANTFLOW - ,VARIABLEFLOWPRESSUREDEPENDANT - ,VARIABLEFLOWPRESSUREINDEPENDANT - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcAirTerminalTypeEnum = ENUMERATION OF - (DIFFUSER - ,GRILLE - ,LOUVRE - ,REGISTER - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcAirToAirHeatRecoveryTypeEnum = ENUMERATION OF - (FIXEDPLATECOUNTERFLOWEXCHANGER - ,FIXEDPLATECROSSFLOWEXCHANGER - ,FIXEDPLATEPARALLELFLOWEXCHANGER - ,ROTARYWHEEL - ,RUNAROUNDCOILLOOP - ,HEATPIPE - ,TWINTOWERENTHALPYRECOVERYLOOPS - ,THERMOSIPHONSEALEDTUBEHEATEXCHANGERS - ,THERMOSIPHONCOILTYPEHEATEXCHANGERS - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcAlarmTypeEnum = ENUMERATION OF - (BELL - ,BREAKGLASSBUTTON - ,LIGHT - ,MANUALPULLBOX - ,SIREN - ,WHISTLE - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcAnalysisModelTypeEnum = ENUMERATION OF - (IN_PLANE_LOADING_2D - ,OUT_PLANE_LOADING_2D - ,LOADING_3D - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcAnalysisTheoryTypeEnum = ENUMERATION OF - (FIRST_ORDER_THEORY - ,SECOND_ORDER_THEORY - ,THIRD_ORDER_THEORY - ,FULL_NONLINEAR_THEORY - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcArithmeticOperatorEnum = ENUMERATION OF - (ADD - ,DIVIDE - ,MULTIPLY - ,SUBTRACT); -END_TYPE; - -TYPE IfcAssemblyPlaceEnum = ENUMERATION OF - (SITE - ,FACTORY - ,NOTDEFINED); -END_TYPE; - -TYPE IfcAudioVisualApplianceTypeEnum = ENUMERATION OF - (AMPLIFIER - ,CAMERA - ,DISPLAY - ,MICROPHONE - ,PLAYER - ,PROJECTOR - ,RECEIVER - ,SPEAKER - ,SWITCHER - ,TELEPHONE - ,TUNER - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcBSplineCurveForm = ENUMERATION OF - (POLYLINE_FORM - ,CIRCULAR_ARC - ,ELLIPTIC_ARC - ,PARABOLIC_ARC - ,HYPERBOLIC_ARC - ,UNSPECIFIED); -END_TYPE; - -TYPE IfcBSplineSurfaceForm = 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 IfcBeamTypeEnum = ENUMERATION OF - (BEAM - ,JOIST - ,HOLLOWCORE - ,LINTEL - ,SPANDREL - ,T_BEAM - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcBenchmarkEnum = ENUMERATION OF - (GREATERTHAN - ,GREATERTHANOREQUALTO - ,LESSTHAN - ,LESSTHANOREQUALTO - ,EQUALTO - ,NOTEQUALTO - ,INCLUDES - ,NOTINCLUDES - ,INCLUDEDIN - ,NOTINCLUDEDIN); -END_TYPE; - -TYPE IfcBoilerTypeEnum = ENUMERATION OF - (WATER - ,STEAM - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcBooleanOperator = ENUMERATION OF - (UNION - ,INTERSECTION - ,DIFFERENCE); -END_TYPE; - -TYPE IfcBuildingElementPartTypeEnum = ENUMERATION OF - (INSULATION - ,PRECASTPANEL - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcBuildingElementProxyTypeEnum = ENUMERATION OF - (COMPLEX - ,ELEMENT - ,PARTIAL - ,PROVISIONFORVOID - ,PROVISIONFORSPACE - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcBuildingSystemTypeEnum = ENUMERATION OF - (FENESTRATION - ,FOUNDATION - ,LOADBEARING - ,OUTERSHELL - ,SHADING - ,TRANSPORT - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcBurnerTypeEnum = ENUMERATION OF - (USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcCableCarrierFittingTypeEnum = ENUMERATION OF - (BEND - ,CROSS - ,REDUCER - ,TEE - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcCableCarrierSegmentTypeEnum = ENUMERATION OF - (CABLELADDERSEGMENT - ,CABLETRAYSEGMENT - ,CABLETRUNKINGSEGMENT - ,CONDUITSEGMENT - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcCableFittingTypeEnum = ENUMERATION OF - (CONNECTOR - ,ENTRY - ,EXIT - ,JUNCTION - ,TRANSITION - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcCableSegmentTypeEnum = ENUMERATION OF - (BUSBARSEGMENT - ,CABLESEGMENT - ,CONDUCTORSEGMENT - ,CORESEGMENT - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcChangeActionEnum = ENUMERATION OF - (NOCHANGE - ,MODIFIED - ,ADDED - ,DELETED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcChillerTypeEnum = ENUMERATION OF - (AIRCOOLED - ,WATERCOOLED - ,HEATRECOVERY - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcChimneyTypeEnum = ENUMERATION OF - (USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcCoilTypeEnum = ENUMERATION OF - (DXCOOLINGCOIL - ,ELECTRICHEATINGCOIL - ,GASHEATINGCOIL - ,HYDRONICCOIL - ,STEAMHEATINGCOIL - ,WATERCOOLINGCOIL - ,WATERHEATINGCOIL - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcColumnTypeEnum = ENUMERATION OF - (COLUMN - ,PILASTER - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcCommunicationsApplianceTypeEnum = ENUMERATION OF - (ANTENNA - ,COMPUTER - ,FAX - ,GATEWAY - ,MODEM - ,NETWORKAPPLIANCE - ,NETWORKBRIDGE - ,NETWORKHUB - ,PRINTER - ,REPEATER - ,ROUTER - ,SCANNER - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcComplexPropertyTemplateTypeEnum = ENUMERATION OF - (P_COMPLEX - ,Q_COMPLEX); -END_TYPE; - -TYPE IfcCompressorTypeEnum = ENUMERATION OF - (DYNAMIC - ,RECIPROCATING - ,ROTARY - ,SCROLL - ,TROCHOIDAL - ,SINGLESTAGE - ,BOOSTER - ,OPENTYPE - ,HERMETIC - ,SEMIHERMETIC - ,WELDEDSHELLHERMETIC - ,ROLLINGPISTON - ,ROTARYVANE - ,SINGLESCREW - ,TWINSCREW - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcCondenserTypeEnum = ENUMERATION OF - (AIRCOOLED - ,EVAPORATIVECOOLED - ,WATERCOOLED - ,WATERCOOLEDBRAZEDPLATE - ,WATERCOOLEDSHELLCOIL - ,WATERCOOLEDSHELLTUBE - ,WATERCOOLEDTUBEINTUBE - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcConnectionTypeEnum = ENUMERATION OF - (ATPATH - ,ATSTART - ,ATEND - ,NOTDEFINED); -END_TYPE; - -TYPE IfcConstraintEnum = ENUMERATION OF - (HARD - ,SOFT - ,ADVISORY - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcConstructionEquipmentResourceTypeEnum = ENUMERATION OF - (DEMOLISHING - ,EARTHMOVING - ,ERECTING - ,HEATING - ,LIGHTING - ,PAVING - ,PUMPING - ,TRANSPORTING - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcConstructionMaterialResourceTypeEnum = ENUMERATION OF - (AGGREGATES - ,CONCRETE - ,DRYWALL - ,FUEL - ,GYPSUM - ,MASONRY - ,METAL - ,PLASTIC - ,WOOD - ,NOTDEFINED - ,USERDEFINED); -END_TYPE; - -TYPE IfcConstructionProductResourceTypeEnum = ENUMERATION OF - (ASSEMBLY - ,FORMWORK - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcControllerTypeEnum = ENUMERATION OF - (FLOATING - ,PROGRAMMABLE - ,PROPORTIONAL - ,MULTIPOSITION - ,TWOPOSITION - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcCooledBeamTypeEnum = ENUMERATION OF - (ACTIVE - ,PASSIVE - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcCoolingTowerTypeEnum = ENUMERATION OF - (NATURALDRAFT - ,MECHANICALINDUCEDDRAFT - ,MECHANICALFORCEDDRAFT - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcCostItemTypeEnum = ENUMERATION OF - (USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcCostScheduleTypeEnum = ENUMERATION OF - (BUDGET - ,COSTPLAN - ,ESTIMATE - ,TENDER - ,PRICEDBILLOFQUANTITIES - ,UNPRICEDBILLOFQUANTITIES - ,SCHEDULEOFRATES - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcCoveringTypeEnum = ENUMERATION OF - (CEILING - ,FLOORING - ,CLADDING - ,ROOFING - ,MOLDING - ,SKIRTINGBOARD - ,INSULATION - ,MEMBRANE - ,SLEEVING - ,WRAPPING - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcCrewResourceTypeEnum = ENUMERATION OF - (OFFICE - ,SITE - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcCurtainWallTypeEnum = ENUMERATION OF - (USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcCurveInterpolationEnum = ENUMERATION OF - (LINEAR - ,LOG_LINEAR - ,LOG_LOG - ,NOTDEFINED); -END_TYPE; - -TYPE IfcDamperTypeEnum = ENUMERATION OF - (BACKDRAFTDAMPER - ,BALANCINGDAMPER - ,BLASTDAMPER - ,CONTROLDAMPER - ,FIREDAMPER - ,FIRESMOKEDAMPER - ,FUMEHOODEXHAUST - ,GRAVITYDAMPER - ,GRAVITYRELIEFDAMPER - ,RELIEFDAMPER - ,SMOKEDAMPER - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcDataOriginEnum = ENUMERATION OF - (MEASURED - ,PREDICTED - ,SIMULATED - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcDerivedUnitEnum = ENUMERATION OF - (ANGULARVELOCITYUNIT - ,AREADENSITYUNIT - ,COMPOUNDPLANEANGLEUNIT - ,DYNAMICVISCOSITYUNIT - ,HEATFLUXDENSITYUNIT - ,INTEGERCOUNTRATEUNIT - ,ISOTHERMALMOISTURECAPACITYUNIT - ,KINEMATICVISCOSITYUNIT - ,LINEARVELOCITYUNIT - ,MASSDENSITYUNIT - ,MASSFLOWRATEUNIT - ,MOISTUREDIFFUSIVITYUNIT - ,MOLECULARWEIGHTUNIT - ,SPECIFICHEATCAPACITYUNIT - ,THERMALADMITTANCEUNIT - ,THERMALCONDUCTANCEUNIT - ,THERMALRESISTANCEUNIT - ,THERMALTRANSMITTANCEUNIT - ,VAPORPERMEABILITYUNIT - ,VOLUMETRICFLOWRATEUNIT - ,ROTATIONALFREQUENCYUNIT - ,TORQUEUNIT - ,MOMENTOFINERTIAUNIT - ,LINEARMOMENTUNIT - ,LINEARFORCEUNIT - ,PLANARFORCEUNIT - ,MODULUSOFELASTICITYUNIT - ,SHEARMODULUSUNIT - ,LINEARSTIFFNESSUNIT - ,ROTATIONALSTIFFNESSUNIT - ,MODULUSOFSUBGRADEREACTIONUNIT - ,ACCELERATIONUNIT - ,CURVATUREUNIT - ,HEATINGVALUEUNIT - ,IONCONCENTRATIONUNIT - ,LUMINOUSINTENSITYDISTRIBUTIONUNIT - ,MASSPERLENGTHUNIT - ,MODULUSOFLINEARSUBGRADEREACTIONUNIT - ,MODULUSOFROTATIONALSUBGRADEREACTIONUNIT - ,PHUNIT - ,ROTATIONALMASSUNIT - ,SECTIONAREAINTEGRALUNIT - ,SECTIONMODULUSUNIT - ,SOUNDPOWERLEVELUNIT - ,SOUNDPOWERUNIT - ,SOUNDPRESSURELEVELUNIT - ,SOUNDPRESSUREUNIT - ,TEMPERATUREGRADIENTUNIT - ,TEMPERATURERATEOFCHANGEUNIT - ,THERMALEXPANSIONCOEFFICIENTUNIT - ,WARPINGCONSTANTUNIT - ,WARPINGMOMENTUNIT - ,USERDEFINED); -END_TYPE; - -TYPE IfcDirectionSenseEnum = ENUMERATION OF - (POSITIVE - ,NEGATIVE); -END_TYPE; - -TYPE IfcDiscreteAccessoryTypeEnum = ENUMERATION OF - (ANCHORPLATE - ,BRACKET - ,SHOE - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcDistributionChamberElementTypeEnum = ENUMERATION OF - (FORMEDDUCT - ,INSPECTIONCHAMBER - ,INSPECTIONPIT - ,MANHOLE - ,METERCHAMBER - ,SUMP - ,TRENCH - ,VALVECHAMBER - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcDistributionPortTypeEnum = ENUMERATION OF - (CABLE - ,CABLECARRIER - ,DUCT - ,PIPE - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcDistributionSystemEnum = ENUMERATION OF - (AIRCONDITIONING - ,AUDIOVISUAL - ,CHEMICAL - ,CHILLEDWATER - ,COMMUNICATION - ,COMPRESSEDAIR - ,CONDENSERWATER - ,CONTROL - ,CONVEYING - ,DATA - ,DISPOSAL - ,DOMESTICCOLDWATER - ,DOMESTICHOTWATER - ,DRAINAGE - ,EARTHING - ,ELECTRICAL - ,ELECTROACOUSTIC - ,EXHAUST - ,FIREPROTECTION - ,FUEL - ,GAS - ,HAZARDOUS - ,HEATING - ,LIGHTING - ,LIGHTNINGPROTECTION - ,MUNICIPALSOLIDWASTE - ,OIL - ,OPERATIONAL - ,POWERGENERATION - ,RAINWATER - ,REFRIGERATION - ,SECURITY - ,SEWAGE - ,SIGNAL - ,STORMWATER - ,TELEPHONE - ,TV - ,VACUUM - ,VENT - ,VENTILATION - ,WASTEWATER - ,WATERSUPPLY - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcDocumentConfidentialityEnum = ENUMERATION OF - (PUBLIC - ,RESTRICTED - ,CONFIDENTIAL - ,PERSONAL - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcDocumentStatusEnum = ENUMERATION OF - (DRAFT - ,FINALDRAFT - ,FINAL - ,REVISION - ,NOTDEFINED); -END_TYPE; - -TYPE IfcDoorPanelOperationEnum = ENUMERATION OF - (SWINGING - ,DOUBLE_ACTING - ,SLIDING - ,FOLDING - ,REVOLVING - ,ROLLINGUP - ,FIXEDPANEL - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcDoorPanelPositionEnum = ENUMERATION OF - (LEFT - ,MIDDLE - ,RIGHT - ,NOTDEFINED); -END_TYPE; - -TYPE IfcDoorStyleConstructionEnum = ENUMERATION OF - (ALUMINIUM - ,HIGH_GRADE_STEEL - ,STEEL - ,WOOD - ,ALUMINIUM_WOOD - ,ALUMINIUM_PLASTIC - ,PLASTIC - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcDoorStyleOperationEnum = ENUMERATION OF - (SINGLE_SWING_LEFT - ,SINGLE_SWING_RIGHT - ,DOUBLE_DOOR_SINGLE_SWING - ,DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT - ,DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT - ,DOUBLE_SWING_LEFT - ,DOUBLE_SWING_RIGHT - ,DOUBLE_DOOR_DOUBLE_SWING - ,SLIDING_TO_LEFT - ,SLIDING_TO_RIGHT - ,DOUBLE_DOOR_SLIDING - ,FOLDING_TO_LEFT - ,FOLDING_TO_RIGHT - ,DOUBLE_DOOR_FOLDING - ,REVOLVING - ,ROLLINGUP - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcDoorTypeEnum = ENUMERATION OF - (DOOR - ,GATE - ,TRAPDOOR - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcDoorTypeOperationEnum = ENUMERATION OF - (SINGLE_SWING_LEFT - ,SINGLE_SWING_RIGHT - ,DOUBLE_DOOR_SINGLE_SWING - ,DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT - ,DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT - ,DOUBLE_SWING_LEFT - ,DOUBLE_SWING_RIGHT - ,DOUBLE_DOOR_DOUBLE_SWING - ,SLIDING_TO_LEFT - ,SLIDING_TO_RIGHT - ,DOUBLE_DOOR_SLIDING - ,FOLDING_TO_LEFT - ,FOLDING_TO_RIGHT - ,DOUBLE_DOOR_FOLDING - ,REVOLVING - ,ROLLINGUP - ,SWING_FIXED_LEFT - ,SWING_FIXED_RIGHT - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcDuctFittingTypeEnum = ENUMERATION OF - (BEND - ,CONNECTOR - ,ENTRY - ,EXIT - ,JUNCTION - ,OBSTRUCTION - ,TRANSITION - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcDuctSegmentTypeEnum = ENUMERATION OF - (RIGIDSEGMENT - ,FLEXIBLESEGMENT - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcDuctSilencerTypeEnum = ENUMERATION OF - (FLATOVAL - ,RECTANGULAR - ,ROUND - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcElectricApplianceTypeEnum = ENUMERATION OF - (DISHWASHER - ,ELECTRICCOOKER - ,FREESTANDINGELECTRICHEATER - ,FREESTANDINGFAN - ,FREESTANDINGWATERHEATER - ,FREESTANDINGWATERCOOLER - ,FREEZER - ,FRIDGE_FREEZER - ,HANDDRYER - ,KITCHENMACHINE - ,MICROWAVE - ,PHOTOCOPIER - ,REFRIGERATOR - ,TUMBLEDRYER - ,VENDINGMACHINE - ,WASHINGMACHINE - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcElectricDistributionBoardTypeEnum = ENUMERATION OF - (CONSUMERUNIT - ,DISTRIBUTIONBOARD - ,MOTORCONTROLCENTRE - ,SWITCHBOARD - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcElectricFlowStorageDeviceTypeEnum = ENUMERATION OF - (BATTERY - ,CAPACITORBANK - ,HARMONICFILTER - ,INDUCTORBANK - ,UPS - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcElectricGeneratorTypeEnum = ENUMERATION OF - (CHP - ,ENGINEGENERATOR - ,STANDALONE - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcElectricMotorTypeEnum = ENUMERATION OF - (DC - ,INDUCTION - ,POLYPHASE - ,RELUCTANCESYNCHRONOUS - ,SYNCHRONOUS - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcElectricTimeControlTypeEnum = ENUMERATION OF - (TIMECLOCK - ,TIMEDELAY - ,RELAY - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcElementAssemblyTypeEnum = ENUMERATION OF - (ACCESSORY_ASSEMBLY - ,ARCH - ,BEAM_GRID - ,BRACED_FRAME - ,GIRDER - ,REINFORCEMENT_UNIT - ,RIGID_FRAME - ,SLAB_FIELD - ,TRUSS - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcElementCompositionEnum = ENUMERATION OF - (COMPLEX - ,ELEMENT - ,PARTIAL); -END_TYPE; - -TYPE IfcEngineTypeEnum = ENUMERATION OF - (EXTERNALCOMBUSTION - ,INTERNALCOMBUSTION - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcEvaporativeCoolerTypeEnum = ENUMERATION OF - (DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER - ,DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER - ,DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER - ,DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER - ,DIRECTEVAPORATIVEAIRWASHER - ,INDIRECTEVAPORATIVEPACKAGEAIRCOOLER - ,INDIRECTEVAPORATIVEWETCOIL - ,INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER - ,INDIRECTDIRECTCOMBINATION - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcEvaporatorTypeEnum = ENUMERATION OF - (DIRECTEXPANSION - ,DIRECTEXPANSIONSHELLANDTUBE - ,DIRECTEXPANSIONTUBEINTUBE - ,DIRECTEXPANSIONBRAZEDPLATE - ,FLOODEDSHELLANDTUBE - ,SHELLANDCOIL - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcEventTriggerTypeEnum = ENUMERATION OF - (EVENTRULE - ,EVENTMESSAGE - ,EVENTTIME - ,EVENTCOMPLEX - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcEventTypeEnum = ENUMERATION OF - (STARTEVENT - ,ENDEVENT - ,INTERMEDIATEEVENT - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcExternalSpatialElementTypeEnum = ENUMERATION OF - (EXTERNAL - ,EXTERNAL_EARTH - ,EXTERNAL_WATER - ,EXTERNAL_FIRE - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcFanTypeEnum = ENUMERATION OF - (CENTRIFUGALFORWARDCURVED - ,CENTRIFUGALRADIAL - ,CENTRIFUGALBACKWARDINCLINEDCURVED - ,CENTRIFUGALAIRFOIL - ,TUBEAXIAL - ,VANEAXIAL - ,PROPELLORAXIAL - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcFastenerTypeEnum = ENUMERATION OF - (GLUE - ,MORTAR - ,WELD - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcFilterTypeEnum = ENUMERATION OF - (AIRPARTICLEFILTER - ,COMPRESSEDAIRFILTER - ,ODORFILTER - ,OILFILTER - ,STRAINER - ,WATERFILTER - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcFireSuppressionTerminalTypeEnum = ENUMERATION OF - (BREECHINGINLET - ,FIREHYDRANT - ,HOSEREEL - ,SPRINKLER - ,SPRINKLERDEFLECTOR - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcFlowDirectionEnum = ENUMERATION OF - (SOURCE - ,SINK - ,SOURCEANDSINK - ,NOTDEFINED); -END_TYPE; - -TYPE IfcFlowInstrumentTypeEnum = ENUMERATION OF - (PRESSUREGAUGE - ,THERMOMETER - ,AMMETER - ,FREQUENCYMETER - ,POWERFACTORMETER - ,PHASEANGLEMETER - ,VOLTMETER_PEAK - ,VOLTMETER_RMS - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcFlowMeterTypeEnum = ENUMERATION OF - (ENERGYMETER - ,GASMETER - ,OILMETER - ,WATERMETER - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcFootingTypeEnum = ENUMERATION OF - (CAISSON_FOUNDATION - ,FOOTING_BEAM - ,PAD_FOOTING - ,PILE_CAP - ,STRIP_FOOTING - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcFurnitureTypeEnum = ENUMERATION OF - (CHAIR - ,TABLE - ,DESK - ,BED - ,FILECABINET - ,SHELF - ,SOFA - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcGeographicElementTypeEnum = ENUMERATION OF - (TERRAIN - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcGeometricProjectionEnum = ENUMERATION OF - (GRAPH_VIEW - ,SKETCH_VIEW - ,MODEL_VIEW - ,PLAN_VIEW - ,REFLECTED_PLAN_VIEW - ,SECTION_VIEW - ,ELEVATION_VIEW - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcGlobalOrLocalEnum = ENUMERATION OF - (GLOBAL_COORDS - ,LOCAL_COORDS); -END_TYPE; - -TYPE IfcGridTypeEnum = ENUMERATION OF - (RECTANGULAR - ,RADIAL - ,TRIANGULAR - ,IRREGULAR - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcHeatExchangerTypeEnum = ENUMERATION OF - (PLATE - ,SHELLANDTUBE - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcHumidifierTypeEnum = ENUMERATION OF - (STEAMINJECTION - ,ADIABATICAIRWASHER - ,ADIABATICPAN - ,ADIABATICWETTEDELEMENT - ,ADIABATICATOMIZING - ,ADIABATICULTRASONIC - ,ADIABATICRIGIDMEDIA - ,ADIABATICCOMPRESSEDAIRNOZZLE - ,ASSISTEDELECTRIC - ,ASSISTEDNATURALGAS - ,ASSISTEDPROPANE - ,ASSISTEDBUTANE - ,ASSISTEDSTEAM - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcInterceptorTypeEnum = ENUMERATION OF - (CYCLONIC - ,GREASE - ,OIL - ,PETROL - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcInternalOrExternalEnum = ENUMERATION OF - (INTERNAL - ,EXTERNAL - ,EXTERNAL_EARTH - ,EXTERNAL_WATER - ,EXTERNAL_FIRE - ,NOTDEFINED); -END_TYPE; - -TYPE IfcInventoryTypeEnum = ENUMERATION OF - (ASSETINVENTORY - ,SPACEINVENTORY - ,FURNITUREINVENTORY - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcJunctionBoxTypeEnum = ENUMERATION OF - (DATA - ,POWER - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcKnotType = ENUMERATION OF - (UNIFORM_KNOTS - ,QUASI_UNIFORM_KNOTS - ,PIECEWISE_BEZIER_KNOTS - ,UNSPECIFIED); -END_TYPE; - -TYPE IfcLaborResourceTypeEnum = ENUMERATION OF - (ADMINISTRATION - ,CARPENTRY - ,CLEANING - ,CONCRETE - ,DRYWALL - ,ELECTRIC - ,FINISHING - ,FLOORING - ,GENERAL - ,HVAC - ,LANDSCAPING - ,MASONRY - ,PAINTING - ,PAVING - ,PLUMBING - ,ROOFING - ,SITEGRADING - ,STEELWORK - ,SURVEYING - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcLampTypeEnum = ENUMERATION OF - (COMPACTFLUORESCENT - ,FLUORESCENT - ,HALOGEN - ,HIGHPRESSUREMERCURY - ,HIGHPRESSURESODIUM - ,LED - ,METALHALIDE - ,OLED - ,TUNGSTENFILAMENT - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcLayerSetDirectionEnum = ENUMERATION OF - (AXIS1 - ,AXIS2 - ,AXIS3); -END_TYPE; - -TYPE IfcLightDistributionCurveEnum = ENUMERATION OF - (TYPE_A - ,TYPE_B - ,TYPE_C - ,NOTDEFINED); -END_TYPE; - -TYPE IfcLightEmissionSourceEnum = ENUMERATION OF - (COMPACTFLUORESCENT - ,FLUORESCENT - ,HIGHPRESSUREMERCURY - ,HIGHPRESSURESODIUM - ,LIGHTEMITTINGDIODE - ,LOWPRESSURESODIUM - ,LOWVOLTAGEHALOGEN - ,MAINVOLTAGEHALOGEN - ,METALHALIDE - ,TUNGSTENFILAMENT - ,NOTDEFINED); -END_TYPE; - -TYPE IfcLightFixtureTypeEnum = ENUMERATION OF - (POINTSOURCE - ,DIRECTIONSOURCE - ,SECURITYLIGHTING - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcLoadGroupTypeEnum = ENUMERATION OF - (LOAD_GROUP - ,LOAD_CASE - ,LOAD_COMBINATION - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcLogicalOperatorEnum = ENUMERATION OF - (LOGICALAND - ,LOGICALOR - ,LOGICALXOR - ,LOGICALNOTAND - ,LOGICALNOTOR); -END_TYPE; - -TYPE IfcMechanicalFastenerTypeEnum = ENUMERATION OF - (ANCHORBOLT - ,BOLT - ,DOWEL - ,NAIL - ,NAILPLATE - ,RIVET - ,SCREW - ,SHEARCONNECTOR - ,STAPLE - ,STUDSHEARCONNECTOR - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcMedicalDeviceTypeEnum = ENUMERATION OF - (AIRSTATION - ,FEEDAIRUNIT - ,OXYGENGENERATOR - ,OXYGENPLANT - ,VACUUMSTATION - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcMemberTypeEnum = ENUMERATION OF - (BRACE - ,CHORD - ,COLLAR - ,MEMBER - ,MULLION - ,PLATE - ,POST - ,PURLIN - ,RAFTER - ,STRINGER - ,STRUT - ,STUD - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcMotorConnectionTypeEnum = ENUMERATION OF - (BELTDRIVE - ,COUPLING - ,DIRECTDRIVE - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcNullStyle = ENUMERATION OF - (NULL); -END_TYPE; - -TYPE IfcObjectTypeEnum = ENUMERATION OF - (PRODUCT - ,PROCESS - ,CONTROL - ,RESOURCE - ,ACTOR - ,GROUP - ,PROJECT - ,NOTDEFINED); -END_TYPE; - -TYPE IfcObjectiveEnum = ENUMERATION OF - (CODECOMPLIANCE - ,CODEWAIVER - ,DESIGNINTENT - ,EXTERNAL - ,HEALTHANDSAFETY - ,MERGECONFLICT - ,MODELVIEW - ,PARAMETER - ,REQUIREMENT - ,SPECIFICATION - ,TRIGGERCONDITION - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcOccupantTypeEnum = ENUMERATION OF - (ASSIGNEE - ,ASSIGNOR - ,LESSEE - ,LESSOR - ,LETTINGAGENT - ,OWNER - ,TENANT - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcOpeningElementTypeEnum = ENUMERATION OF - (OPENING - ,RECESS - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcOutletTypeEnum = ENUMERATION OF - (AUDIOVISUALOUTLET - ,COMMUNICATIONSOUTLET - ,POWEROUTLET - ,DATAOUTLET - ,TELEPHONEOUTLET - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcPerformanceHistoryTypeEnum = ENUMERATION OF - (USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcPermeableCoveringOperationEnum = ENUMERATION OF - (GRILL - ,LOUVER - ,SCREEN - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcPermitTypeEnum = ENUMERATION OF - (ACCESS - ,BUILDING - ,WORK - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcPhysicalOrVirtualEnum = ENUMERATION OF - (PHYSICAL - ,VIRTUAL - ,NOTDEFINED); -END_TYPE; - -TYPE IfcPileConstructionEnum = ENUMERATION OF - (CAST_IN_PLACE - ,COMPOSITE - ,PRECAST_CONCRETE - ,PREFAB_STEEL - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcPileTypeEnum = ENUMERATION OF - (BORED - ,DRIVEN - ,JETGROUTING - ,COHESION - ,FRICTION - ,SUPPORT - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcPipeFittingTypeEnum = ENUMERATION OF - (BEND - ,CONNECTOR - ,ENTRY - ,EXIT - ,JUNCTION - ,OBSTRUCTION - ,TRANSITION - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcPipeSegmentTypeEnum = ENUMERATION OF - (CULVERT - ,FLEXIBLESEGMENT - ,RIGIDSEGMENT - ,GUTTER - ,SPOOL - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcPlateTypeEnum = ENUMERATION OF - (CURTAIN_PANEL - ,SHEET - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcPreferredSurfaceCurveRepresentation = ENUMERATION OF - (CURVE3D - ,PCURVE_S1 - ,PCURVE_S2); -END_TYPE; - -TYPE IfcProcedureTypeEnum = ENUMERATION OF - (ADVICE_CAUTION - ,ADVICE_NOTE - ,ADVICE_WARNING - ,CALIBRATION - ,DIAGNOSTIC - ,SHUTDOWN - ,STARTUP - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcProfileTypeEnum = ENUMERATION OF - (CURVE - ,AREA); -END_TYPE; - -TYPE IfcProjectOrderTypeEnum = ENUMERATION OF - (CHANGEORDER - ,MAINTENANCEWORKORDER - ,MOVEORDER - ,PURCHASEORDER - ,WORKORDER - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcProjectedOrTrueLengthEnum = ENUMERATION OF - (PROJECTED_LENGTH - ,TRUE_LENGTH); -END_TYPE; - -TYPE IfcProjectionElementTypeEnum = ENUMERATION OF - (USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcPropertySetTemplateTypeEnum = ENUMERATION OF - (PSET_TYPEDRIVENONLY - ,PSET_TYPEDRIVENOVERRIDE - ,PSET_OCCURRENCEDRIVEN - ,PSET_PERFORMANCEDRIVEN - ,QTO_TYPEDRIVENONLY - ,QTO_TYPEDRIVENOVERRIDE - ,QTO_OCCURRENCEDRIVEN - ,NOTDEFINED); -END_TYPE; - -TYPE IfcProtectiveDeviceTrippingUnitTypeEnum = ENUMERATION OF - (ELECTRONIC - ,ELECTROMAGNETIC - ,RESIDUALCURRENT - ,THERMAL - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcProtectiveDeviceTypeEnum = ENUMERATION OF - (CIRCUITBREAKER - ,EARTHLEAKAGECIRCUITBREAKER - ,EARTHINGSWITCH - ,FUSEDISCONNECTOR - ,RESIDUALCURRENTCIRCUITBREAKER - ,RESIDUALCURRENTSWITCH - ,VARISTOR - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcPumpTypeEnum = ENUMERATION OF - (CIRCULATOR - ,ENDSUCTION - ,SPLITCASE - ,SUBMERSIBLEPUMP - ,SUMPPUMP - ,VERTICALINLINE - ,VERTICALTURBINE - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcRailingTypeEnum = ENUMERATION OF - (HANDRAIL - ,GUARDRAIL - ,BALUSTRADE - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcRampFlightTypeEnum = ENUMERATION OF - (STRAIGHT - ,SPIRAL - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcRampTypeEnum = ENUMERATION OF - (STRAIGHT_RUN_RAMP - ,TWO_STRAIGHT_RUN_RAMP - ,QUARTER_TURN_RAMP - ,TWO_QUARTER_TURN_RAMP - ,HALF_TURN_RAMP - ,SPIRAL_RAMP - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcRecurrenceTypeEnum = ENUMERATION OF - (DAILY - ,WEEKLY - ,MONTHLY_BY_DAY_OF_MONTH - ,MONTHLY_BY_POSITION - ,BY_DAY_COUNT - ,BY_WEEKDAY_COUNT - ,YEARLY_BY_DAY_OF_MONTH - ,YEARLY_BY_POSITION); -END_TYPE; - -TYPE IfcReflectanceMethodEnum = ENUMERATION OF - (BLINN - ,FLAT - ,GLASS - ,MATT - ,METAL - ,MIRROR - ,PHONG - ,PLASTIC - ,STRAUSS - ,NOTDEFINED); -END_TYPE; - -TYPE IfcReinforcingBarRoleEnum = ENUMERATION OF - (MAIN - ,SHEAR - ,LIGATURE - ,STUD - ,PUNCHING - ,EDGE - ,RING - ,ANCHORING - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcReinforcingBarSurfaceEnum = ENUMERATION OF - (PLAIN - ,TEXTURED); -END_TYPE; - -TYPE IfcReinforcingBarTypeEnum = ENUMERATION OF - (ANCHORING - ,EDGE - ,LIGATURE - ,MAIN - ,PUNCHING - ,RING - ,SHEAR - ,STUD - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcReinforcingMeshTypeEnum = ENUMERATION OF - (USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcRoleEnum = ENUMERATION OF - (SUPPLIER - ,MANUFACTURER - ,CONTRACTOR - ,SUBCONTRACTOR - ,ARCHITECT - ,STRUCTURALENGINEER - ,COSTENGINEER - ,CLIENT - ,BUILDINGOWNER - ,BUILDINGOPERATOR - ,MECHANICALENGINEER - ,ELECTRICALENGINEER - ,PROJECTMANAGER - ,FACILITIESMANAGER - ,CIVILENGINEER - ,COMMISSIONINGENGINEER - ,ENGINEER - ,OWNER - ,CONSULTANT - ,CONSTRUCTIONMANAGER - ,FIELDCONSTRUCTIONMANAGER - ,RESELLER - ,USERDEFINED); -END_TYPE; - -TYPE IfcRoofTypeEnum = ENUMERATION OF - (FLAT_ROOF - ,SHED_ROOF - ,GABLE_ROOF - ,HIP_ROOF - ,HIPPED_GABLE_ROOF - ,GAMBREL_ROOF - ,MANSARD_ROOF - ,BARREL_ROOF - ,RAINBOW_ROOF - ,BUTTERFLY_ROOF - ,PAVILION_ROOF - ,DOME_ROOF - ,FREEFORM - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcSIPrefix = ENUMERATION OF - (EXA - ,PETA - ,TERA - ,GIGA - ,MEGA - ,KILO - ,HECTO - ,DECA - ,DECI - ,CENTI - ,MILLI - ,MICRO - ,NANO - ,PICO - ,FEMTO - ,ATTO); -END_TYPE; - -TYPE IfcSIUnitName = ENUMERATION OF - (AMPERE - ,BECQUEREL - ,CANDELA - ,COULOMB - ,CUBIC_METRE - ,DEGREE_CELSIUS - ,FARAD - ,GRAM - ,GRAY - ,HENRY - ,HERTZ - ,JOULE - ,KELVIN - ,LUMEN - ,LUX - ,METRE - ,MOLE - ,NEWTON - ,OHM - ,PASCAL - ,RADIAN - ,SECOND - ,SIEMENS - ,SIEVERT - ,SQUARE_METRE - ,STERADIAN - ,TESLA - ,VOLT - ,WATT - ,WEBER); -END_TYPE; - -TYPE IfcSanitaryTerminalTypeEnum = ENUMERATION OF - (BATH - ,BIDET - ,CISTERN - ,SHOWER - ,SINK - ,SANITARYFOUNTAIN - ,TOILETPAN - ,URINAL - ,WASHHANDBASIN - ,WCSEAT - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcSectionTypeEnum = ENUMERATION OF - (UNIFORM - ,TAPERED); -END_TYPE; - -TYPE IfcSensorTypeEnum = ENUMERATION OF - (COSENSOR - ,CO2SENSOR - ,CONDUCTANCESENSOR - ,CONTACTSENSOR - ,FIRESENSOR - ,FLOWSENSOR - ,FROSTSENSOR - ,GASSENSOR - ,HEATSENSOR - ,HUMIDITYSENSOR - ,IDENTIFIERSENSOR - ,IONCONCENTRATIONSENSOR - ,LEVELSENSOR - ,LIGHTSENSOR - ,MOISTURESENSOR - ,MOVEMENTSENSOR - ,PHSENSOR - ,PRESSURESENSOR - ,RADIATIONSENSOR - ,RADIOACTIVITYSENSOR - ,SMOKESENSOR - ,SOUNDSENSOR - ,TEMPERATURESENSOR - ,WINDSENSOR - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcSequenceEnum = ENUMERATION OF - (START_START - ,START_FINISH - ,FINISH_START - ,FINISH_FINISH - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcShadingDeviceTypeEnum = ENUMERATION OF - (JALOUSIE - ,SHUTTER - ,AWNING - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcSimplePropertyTemplateTypeEnum = ENUMERATION OF - (P_SINGLEVALUE - ,P_ENUMERATEDVALUE - ,P_BOUNDEDVALUE - ,P_LISTVALUE - ,P_TABLEVALUE - ,P_REFERENCEVALUE - ,Q_LENGTH - ,Q_AREA - ,Q_VOLUME - ,Q_COUNT - ,Q_WEIGHT - ,Q_TIME); -END_TYPE; - -TYPE IfcSlabTypeEnum = ENUMERATION OF - (FLOOR - ,ROOF - ,LANDING - ,BASESLAB - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcSolarDeviceTypeEnum = ENUMERATION OF - (SOLARCOLLECTOR - ,SOLARPANEL - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcSpaceHeaterTypeEnum = ENUMERATION OF - (CONVECTOR - ,RADIATOR - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcSpaceTypeEnum = ENUMERATION OF - (SPACE - ,PARKING - ,GFA - ,INTERNAL - ,EXTERNAL - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcSpatialZoneTypeEnum = ENUMERATION OF - (CONSTRUCTION - ,FIRESAFETY - ,LIGHTING - ,OCCUPANCY - ,SECURITY - ,THERMAL - ,TRANSPORT - ,VENTILATION - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcStackTerminalTypeEnum = ENUMERATION OF - (BIRDCAGE - ,COWL - ,RAINWATERHOPPER - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcStairFlightTypeEnum = ENUMERATION OF - (STRAIGHT - ,WINDER - ,SPIRAL - ,CURVED - ,FREEFORM - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcStairTypeEnum = ENUMERATION OF - (STRAIGHT_RUN_STAIR - ,TWO_STRAIGHT_RUN_STAIR - ,QUARTER_WINDING_STAIR - ,QUARTER_TURN_STAIR - ,HALF_WINDING_STAIR - ,HALF_TURN_STAIR - ,TWO_QUARTER_WINDING_STAIR - ,TWO_QUARTER_TURN_STAIR - ,THREE_QUARTER_WINDING_STAIR - ,THREE_QUARTER_TURN_STAIR - ,SPIRAL_STAIR - ,DOUBLE_RETURN_STAIR - ,CURVED_RUN_STAIR - ,TWO_CURVED_RUN_STAIR - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcStateEnum = ENUMERATION OF - (READWRITE - ,READONLY - ,LOCKED - ,READWRITELOCKED - ,READONLYLOCKED); -END_TYPE; - -TYPE IfcStructuralCurveActivityTypeEnum = ENUMERATION OF - (CONST - ,LINEAR - ,POLYGONAL - ,EQUIDISTANT - ,SINUS - ,PARABOLA - ,DISCRETE - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcStructuralCurveMemberTypeEnum = ENUMERATION OF - (RIGID_JOINED_MEMBER - ,PIN_JOINED_MEMBER - ,CABLE - ,TENSION_MEMBER - ,COMPRESSION_MEMBER - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcStructuralSurfaceActivityTypeEnum = ENUMERATION OF - (CONST - ,BILINEAR - ,DISCRETE - ,ISOCONTOUR - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcStructuralSurfaceMemberTypeEnum = ENUMERATION OF - (BENDING_ELEMENT - ,MEMBRANE_ELEMENT - ,SHELL - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcSubContractResourceTypeEnum = ENUMERATION OF - (PURCHASE - ,WORK - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcSurfaceFeatureTypeEnum = ENUMERATION OF - (MARK - ,TAG - ,TREATMENT - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcSurfaceSide = ENUMERATION OF - (POSITIVE - ,NEGATIVE - ,BOTH); -END_TYPE; - -TYPE IfcSwitchingDeviceTypeEnum = ENUMERATION OF - (CONTACTOR - ,DIMMERSWITCH - ,EMERGENCYSTOP - ,KEYPAD - ,MOMENTARYSWITCH - ,SELECTORSWITCH - ,STARTER - ,SWITCHDISCONNECTOR - ,TOGGLESWITCH - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcSystemFurnitureElementTypeEnum = ENUMERATION OF - (PANEL - ,WORKSURFACE - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcTankTypeEnum = ENUMERATION OF - (BASIN - ,BREAKPRESSURE - ,EXPANSION - ,FEEDANDEXPANSION - ,PRESSUREVESSEL - ,STORAGE - ,VESSEL - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcTaskDurationEnum = ENUMERATION OF - (ELAPSEDTIME - ,WORKTIME - ,NOTDEFINED); -END_TYPE; - -TYPE IfcTaskTypeEnum = ENUMERATION OF - (ATTENDANCE - ,CONSTRUCTION - ,DEMOLITION - ,DISMANTLE - ,DISPOSAL - ,INSTALLATION - ,LOGISTIC - ,MAINTENANCE - ,MOVE - ,OPERATION - ,REMOVAL - ,RENOVATION - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcTendonAnchorTypeEnum = ENUMERATION OF - (COUPLER - ,FIXED_END - ,TENSIONING_END - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcTendonTypeEnum = ENUMERATION OF - (BAR - ,COATED - ,STRAND - ,WIRE - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcTextPath = ENUMERATION OF - (LEFT - ,RIGHT - ,UP - ,DOWN); -END_TYPE; - -TYPE IfcTimeSeriesDataTypeEnum = ENUMERATION OF - (CONTINUOUS - ,DISCRETE - ,DISCRETEBINARY - ,PIECEWISEBINARY - ,PIECEWISECONSTANT - ,PIECEWISECONTINUOUS - ,NOTDEFINED); -END_TYPE; - -TYPE IfcTransformerTypeEnum = ENUMERATION OF - (CURRENT - ,FREQUENCY - ,INVERTER - ,RECTIFIER - ,VOLTAGE - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcTransitionCode = ENUMERATION OF - (DISCONTINUOUS - ,CONTINUOUS - ,CONTSAMEGRADIENT - ,CONTSAMEGRADIENTSAMECURVATURE); -END_TYPE; - -TYPE IfcTransportElementTypeEnum = ENUMERATION OF - (ELEVATOR - ,ESCALATOR - ,MOVINGWALKWAY - ,CRANEWAY - ,LIFTINGGEAR - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcTrimmingPreference = ENUMERATION OF - (CARTESIAN - ,PARAMETER - ,UNSPECIFIED); -END_TYPE; - -TYPE IfcTubeBundleTypeEnum = ENUMERATION OF - (FINNED - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcUnitEnum = ENUMERATION OF - (ABSORBEDDOSEUNIT - ,AMOUNTOFSUBSTANCEUNIT - ,AREAUNIT - ,DOSEEQUIVALENTUNIT - ,ELECTRICCAPACITANCEUNIT - ,ELECTRICCHARGEUNIT - ,ELECTRICCONDUCTANCEUNIT - ,ELECTRICCURRENTUNIT - ,ELECTRICRESISTANCEUNIT - ,ELECTRICVOLTAGEUNIT - ,ENERGYUNIT - ,FORCEUNIT - ,FREQUENCYUNIT - ,ILLUMINANCEUNIT - ,INDUCTANCEUNIT - ,LENGTHUNIT - ,LUMINOUSFLUXUNIT - ,LUMINOUSINTENSITYUNIT - ,MAGNETICFLUXDENSITYUNIT - ,MAGNETICFLUXUNIT - ,MASSUNIT - ,PLANEANGLEUNIT - ,POWERUNIT - ,PRESSUREUNIT - ,RADIOACTIVITYUNIT - ,SOLIDANGLEUNIT - ,THERMODYNAMICTEMPERATUREUNIT - ,TIMEUNIT - ,VOLUMEUNIT - ,USERDEFINED); -END_TYPE; - -TYPE IfcUnitaryControlElementTypeEnum = ENUMERATION OF - (ALARMPANEL - ,CONTROLPANEL - ,GASDETECTIONPANEL - ,INDICATORPANEL - ,MIMICPANEL - ,HUMIDISTAT - ,THERMOSTAT - ,WEATHERSTATION - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcUnitaryEquipmentTypeEnum = ENUMERATION OF - (AIRHANDLER - ,AIRCONDITIONINGUNIT - ,DEHUMIDIFIER - ,SPLITSYSTEM - ,ROOFTOPUNIT - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcValveTypeEnum = ENUMERATION OF - (AIRRELEASE - ,ANTIVACUUM - ,CHANGEOVER - ,CHECK - ,COMMISSIONING - ,DIVERTING - ,DRAWOFFCOCK - ,DOUBLECHECK - ,DOUBLEREGULATING - ,FAUCET - ,FLUSHING - ,GASCOCK - ,GASTAP - ,ISOLATING - ,MIXING - ,PRESSUREREDUCING - ,PRESSURERELIEF - ,REGULATING - ,SAFETYCUTOFF - ,STEAMTRAP - ,STOPCOCK - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcVibrationIsolatorTypeEnum = ENUMERATION OF - (COMPRESSION - ,SPRING - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcVoidingFeatureTypeEnum = ENUMERATION OF - (CUTOUT - ,NOTCH - ,HOLE - ,MITER - ,CHAMFER - ,EDGE - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcWallTypeEnum = ENUMERATION OF - (MOVABLE - ,PARAPET - ,PARTITIONING - ,PLUMBINGWALL - ,SHEAR - ,SOLIDWALL - ,STANDARD - ,POLYGONAL - ,ELEMENTEDWALL - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcWasteTerminalTypeEnum = ENUMERATION OF - (FLOORTRAP - ,FLOORWASTE - ,GULLYSUMP - ,GULLYTRAP - ,ROOFDRAIN - ,WASTEDISPOSALUNIT - ,WASTETRAP - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcWindowPanelOperationEnum = ENUMERATION OF - (SIDEHUNGRIGHTHAND - ,SIDEHUNGLEFTHAND - ,TILTANDTURNRIGHTHAND - ,TILTANDTURNLEFTHAND - ,TOPHUNG - ,BOTTOMHUNG - ,PIVOTHORIZONTAL - ,PIVOTVERTICAL - ,SLIDINGHORIZONTAL - ,SLIDINGVERTICAL - ,REMOVABLECASEMENT - ,FIXEDCASEMENT - ,OTHEROPERATION - ,NOTDEFINED); -END_TYPE; - -TYPE IfcWindowPanelPositionEnum = ENUMERATION OF - (LEFT - ,MIDDLE - ,RIGHT - ,BOTTOM - ,TOP - ,NOTDEFINED); -END_TYPE; - -TYPE IfcWindowStyleConstructionEnum = ENUMERATION OF - (ALUMINIUM - ,HIGH_GRADE_STEEL - ,STEEL - ,WOOD - ,ALUMINIUM_WOOD - ,PLASTIC - ,OTHER_CONSTRUCTION - ,NOTDEFINED); -END_TYPE; - -TYPE IfcWindowStyleOperationEnum = ENUMERATION OF - (SINGLE_PANEL - ,DOUBLE_PANEL_VERTICAL - ,DOUBLE_PANEL_HORIZONTAL - ,TRIPLE_PANEL_VERTICAL - ,TRIPLE_PANEL_BOTTOM - ,TRIPLE_PANEL_TOP - ,TRIPLE_PANEL_LEFT - ,TRIPLE_PANEL_RIGHT - ,TRIPLE_PANEL_HORIZONTAL - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcWindowTypeEnum = ENUMERATION OF - (WINDOW - ,SKYLIGHT - ,LIGHTDOME - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcWindowTypePartitioningEnum = ENUMERATION OF - (SINGLE_PANEL - ,DOUBLE_PANEL_VERTICAL - ,DOUBLE_PANEL_HORIZONTAL - ,TRIPLE_PANEL_VERTICAL - ,TRIPLE_PANEL_BOTTOM - ,TRIPLE_PANEL_TOP - ,TRIPLE_PANEL_LEFT - ,TRIPLE_PANEL_RIGHT - ,TRIPLE_PANEL_HORIZONTAL - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcWorkCalendarTypeEnum = ENUMERATION OF - (FIRSTSHIFT - ,SECONDSHIFT - ,THIRDSHIFT - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcWorkPlanTypeEnum = ENUMERATION OF - (ACTUAL - ,BASELINE - ,PLANNED - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcWorkScheduleTypeEnum = ENUMERATION OF - (ACTUAL - ,BASELINE - ,PLANNED - ,USERDEFINED - ,NOTDEFINED); -END_TYPE; - -TYPE IfcActorSelect = SELECT - (IfcOrganization - ,IfcPerson - ,IfcPersonAndOrganization); -END_TYPE; - -TYPE IfcAppliedValueSelect = SELECT - (IfcMeasureWithUnit - ,IfcReference - ,IfcValue); -END_TYPE; - -TYPE IfcAxis2Placement = SELECT - (IfcAxis2Placement2D - ,IfcAxis2Placement3D); -END_TYPE; - -TYPE IfcBendingParameterSelect = SELECT - (IfcLengthMeasure - ,IfcPlaneAngleMeasure); -END_TYPE; - -TYPE IfcBooleanOperand = SELECT - (IfcBooleanResult - ,IfcCsgPrimitive3D - ,IfcHalfSpaceSolid - ,IfcSolidModel - ,IfcTessellatedFaceSet); -END_TYPE; - -TYPE IfcClassificationReferenceSelect = SELECT - (IfcClassification - ,IfcClassificationReference); -END_TYPE; - -TYPE IfcClassificationSelect = SELECT - (IfcClassification - ,IfcClassificationReference); -END_TYPE; - -TYPE IfcColour = SELECT - (IfcColourSpecification - ,IfcPreDefinedColour); -END_TYPE; - -TYPE IfcColourOrFactor = SELECT - (IfcColourRgb - ,IfcNormalisedRatioMeasure); -END_TYPE; - -TYPE IfcCoordinateReferenceSystemSelect = SELECT - (IfcCoordinateReferenceSystem - ,IfcGeometricRepresentationContext); -END_TYPE; - -TYPE IfcCsgSelect = SELECT - (IfcBooleanResult - ,IfcCsgPrimitive3D); -END_TYPE; - -TYPE IfcCurveFontOrScaledCurveFontSelect = SELECT - (IfcCurveStyleFontAndScaling - ,IfcCurveStyleFontSelect); -END_TYPE; - -TYPE IfcCurveOnSurface = SELECT - (IfcCompositeCurveOnSurface - ,IfcPcurve - ,IfcSurfaceCurve); -END_TYPE; - -TYPE IfcCurveOrEdgeCurve = SELECT - (IfcBoundedCurve - ,IfcEdgeCurve); -END_TYPE; - -TYPE IfcCurveStyleFontSelect = SELECT - (IfcCurveStyleFont - ,IfcPreDefinedCurveFont); -END_TYPE; - -TYPE IfcDefinitionSelect = SELECT - (IfcObjectDefinition - ,IfcPropertyDefinition); -END_TYPE; - -TYPE IfcDerivedMeasureValue = SELECT - (IfcAbsorbedDoseMeasure - ,IfcAccelerationMeasure - ,IfcAngularVelocityMeasure - ,IfcAreaDensityMeasure - ,IfcCompoundPlaneAngleMeasure - ,IfcCurvatureMeasure - ,IfcDoseEquivalentMeasure - ,IfcDynamicViscosityMeasure - ,IfcElectricCapacitanceMeasure - ,IfcElectricChargeMeasure - ,IfcElectricConductanceMeasure - ,IfcElectricResistanceMeasure - ,IfcElectricVoltageMeasure - ,IfcEnergyMeasure - ,IfcForceMeasure - ,IfcFrequencyMeasure - ,IfcHeatFluxDensityMeasure - ,IfcHeatingValueMeasure - ,IfcIlluminanceMeasure - ,IfcInductanceMeasure - ,IfcIntegerCountRateMeasure - ,IfcIonConcentrationMeasure - ,IfcIsothermalMoistureCapacityMeasure - ,IfcKinematicViscosityMeasure - ,IfcLinearForceMeasure - ,IfcLinearMomentMeasure - ,IfcLinearStiffnessMeasure - ,IfcLinearVelocityMeasure - ,IfcLuminousFluxMeasure - ,IfcLuminousIntensityDistributionMeasure - ,IfcMagneticFluxDensityMeasure - ,IfcMagneticFluxMeasure - ,IfcMassDensityMeasure - ,IfcMassFlowRateMeasure - ,IfcMassPerLengthMeasure - ,IfcModulusOfElasticityMeasure - ,IfcModulusOfLinearSubgradeReactionMeasure - ,IfcModulusOfRotationalSubgradeReactionMeasure - ,IfcModulusOfSubgradeReactionMeasure - ,IfcMoistureDiffusivityMeasure - ,IfcMolecularWeightMeasure - ,IfcMomentOfInertiaMeasure - ,IfcMonetaryMeasure - ,IfcPHMeasure - ,IfcPlanarForceMeasure - ,IfcPowerMeasure - ,IfcPressureMeasure - ,IfcRadioActivityMeasure - ,IfcRotationalFrequencyMeasure - ,IfcRotationalMassMeasure - ,IfcRotationalStiffnessMeasure - ,IfcSectionModulusMeasure - ,IfcSectionalAreaIntegralMeasure - ,IfcShearModulusMeasure - ,IfcSoundPowerLevelMeasure - ,IfcSoundPowerMeasure - ,IfcSoundPressureLevelMeasure - ,IfcSoundPressureMeasure - ,IfcSpecificHeatCapacityMeasure - ,IfcTemperatureGradientMeasure - ,IfcTemperatureRateOfChangeMeasure - ,IfcThermalAdmittanceMeasure - ,IfcThermalConductivityMeasure - ,IfcThermalExpansionCoefficientMeasure - ,IfcThermalResistanceMeasure - ,IfcThermalTransmittanceMeasure - ,IfcTorqueMeasure - ,IfcVaporPermeabilityMeasure - ,IfcVolumetricFlowRateMeasure - ,IfcWarpingConstantMeasure - ,IfcWarpingMomentMeasure); -END_TYPE; - -TYPE IfcDocumentSelect = SELECT - (IfcDocumentInformation - ,IfcDocumentReference); -END_TYPE; - -TYPE IfcFillStyleSelect = SELECT - (IfcColour - ,IfcExternallyDefinedHatchStyle - ,IfcFillAreaStyleHatching - ,IfcFillAreaStyleTiles); -END_TYPE; - -TYPE IfcGeometricSetSelect = SELECT - (IfcCurve - ,IfcPoint - ,IfcSurface); -END_TYPE; - -TYPE IfcGridPlacementDirectionSelect = SELECT - (IfcDirection - ,IfcVirtualGridIntersection); -END_TYPE; - -TYPE IfcHatchLineDistanceSelect = SELECT - (IfcPositiveLengthMeasure - ,IfcVector); -END_TYPE; - -TYPE IfcLayeredItem = SELECT - (IfcRepresentation - ,IfcRepresentationItem); -END_TYPE; - -TYPE IfcLibrarySelect = SELECT - (IfcLibraryInformation - ,IfcLibraryReference); -END_TYPE; - -TYPE IfcLightDistributionDataSourceSelect = SELECT - (IfcExternalReference - ,IfcLightIntensityDistribution); -END_TYPE; - -TYPE IfcMaterialSelect = SELECT - (IfcMaterialDefinition - ,IfcMaterialList - ,IfcMaterialUsageDefinition); -END_TYPE; - -TYPE IfcMeasureValue = SELECT - (IfcAmountOfSubstanceMeasure - ,IfcAreaMeasure - ,IfcComplexNumber - ,IfcContextDependentMeasure - ,IfcCountMeasure - ,IfcDescriptiveMeasure - ,IfcElectricCurrentMeasure - ,IfcLengthMeasure - ,IfcLuminousIntensityMeasure - ,IfcMassMeasure - ,IfcNonNegativeLengthMeasure - ,IfcNormalisedRatioMeasure - ,IfcNumericMeasure - ,IfcParameterValue - ,IfcPlaneAngleMeasure - ,IfcPositiveLengthMeasure - ,IfcPositivePlaneAngleMeasure - ,IfcPositiveRatioMeasure - ,IfcRatioMeasure - ,IfcSolidAngleMeasure - ,IfcThermodynamicTemperatureMeasure - ,IfcTimeMeasure - ,IfcVolumeMeasure); -END_TYPE; - -TYPE IfcMetricValueSelect = SELECT - (IfcAppliedValue - ,IfcMeasureWithUnit - ,IfcReference - ,IfcTable - ,IfcTimeSeries - ,IfcValue); -END_TYPE; - -TYPE IfcModulusOfRotationalSubgradeReactionSelect = SELECT - (IfcBoolean - ,IfcModulusOfRotationalSubgradeReactionMeasure); -END_TYPE; - -TYPE IfcModulusOfSubgradeReactionSelect = SELECT - (IfcBoolean - ,IfcModulusOfSubgradeReactionMeasure); -END_TYPE; - -TYPE IfcModulusOfTranslationalSubgradeReactionSelect = SELECT - (IfcBoolean - ,IfcModulusOfLinearSubgradeReactionMeasure); -END_TYPE; - -TYPE IfcObjectReferenceSelect = SELECT - (IfcAddress - ,IfcAppliedValue - ,IfcExternalReference - ,IfcMaterialDefinition - ,IfcOrganization - ,IfcPerson - ,IfcPersonAndOrganization - ,IfcTable - ,IfcTimeSeries); -END_TYPE; - -TYPE IfcPointOrVertexPoint = SELECT - (IfcPoint - ,IfcVertexPoint); -END_TYPE; - -TYPE IfcPresentationStyleSelect = SELECT - (IfcCurveStyle - ,IfcFillAreaStyle - ,IfcNullStyle - ,IfcSurfaceStyle - ,IfcTextStyle); -END_TYPE; - -TYPE IfcProcessSelect = SELECT - (IfcProcess - ,IfcTypeProcess); -END_TYPE; - -TYPE IfcProductRepresentationSelect = SELECT - (IfcProductDefinitionShape - ,IfcRepresentationMap); -END_TYPE; - -TYPE IfcProductSelect = SELECT - (IfcProduct - ,IfcTypeProduct); -END_TYPE; - -TYPE IfcPropertySetDefinitionSelect = SELECT - (IfcPropertySetDefinition - ,IfcPropertySetDefinitionSet); -END_TYPE; - -TYPE IfcResourceObjectSelect = SELECT - (IfcActorRole - ,IfcAppliedValue - ,IfcApproval - ,IfcConstraint - ,IfcContextDependentUnit - ,IfcConversionBasedUnit - ,IfcExternalInformation - ,IfcExternalReference - ,IfcMaterialDefinition - ,IfcOrganization - ,IfcPerson - ,IfcPersonAndOrganization - ,IfcPhysicalQuantity - ,IfcProfileDef - ,IfcPropertyAbstraction - ,IfcTimeSeries); -END_TYPE; - -TYPE IfcResourceSelect = SELECT - (IfcResource - ,IfcTypeResource); -END_TYPE; - -TYPE IfcRotationalStiffnessSelect = SELECT - (IfcBoolean - ,IfcRotationalStiffnessMeasure); -END_TYPE; - -TYPE IfcSegmentIndexSelect = SELECT - (IfcArcIndex - ,IfcLineIndex); -END_TYPE; - -TYPE IfcShell = SELECT - (IfcClosedShell - ,IfcOpenShell); -END_TYPE; - -TYPE IfcSimpleValue = SELECT - (IfcBinary - ,IfcBoolean - ,IfcDate - ,IfcDateTime - ,IfcDuration - ,IfcIdentifier - ,IfcInteger - ,IfcLabel - ,IfcLogical - ,IfcPositiveInteger - ,IfcReal - ,IfcText - ,IfcTime - ,IfcTimeStamp); -END_TYPE; - -TYPE IfcSizeSelect = SELECT - (IfcDescriptiveMeasure - ,IfcLengthMeasure - ,IfcNormalisedRatioMeasure - ,IfcPositiveLengthMeasure - ,IfcPositiveRatioMeasure - ,IfcRatioMeasure); -END_TYPE; - -TYPE IfcSolidOrShell = SELECT - (IfcClosedShell - ,IfcSolidModel); -END_TYPE; - -TYPE IfcSpaceBoundarySelect = SELECT - (IfcExternalSpatialElement - ,IfcSpace); -END_TYPE; - -TYPE IfcSpecularHighlightSelect = SELECT - (IfcSpecularExponent - ,IfcSpecularRoughness); -END_TYPE; - -TYPE IfcStructuralActivityAssignmentSelect = SELECT - (IfcElement - ,IfcStructuralItem); -END_TYPE; - -TYPE IfcStyleAssignmentSelect = SELECT - (IfcPresentationStyle - ,IfcPresentationStyleAssignment); -END_TYPE; - -TYPE IfcSurfaceOrFaceSurface = SELECT - (IfcFaceBasedSurfaceModel - ,IfcFaceSurface - ,IfcSurface); -END_TYPE; - -TYPE IfcSurfaceStyleElementSelect = SELECT - (IfcExternallyDefinedSurfaceStyle - ,IfcSurfaceStyleLighting - ,IfcSurfaceStyleRefraction - ,IfcSurfaceStyleShading - ,IfcSurfaceStyleWithTextures); -END_TYPE; - -TYPE IfcTextFontSelect = SELECT - (IfcExternallyDefinedTextFont - ,IfcPreDefinedTextFont); -END_TYPE; - -TYPE IfcTimeOrRatioSelect = SELECT - (IfcDuration - ,IfcRatioMeasure); -END_TYPE; - -TYPE IfcTranslationalStiffnessSelect = SELECT - (IfcBoolean - ,IfcLinearStiffnessMeasure); -END_TYPE; - -TYPE IfcTrimmingSelect = SELECT - (IfcCartesianPoint - ,IfcParameterValue); -END_TYPE; - -TYPE IfcUnit = SELECT - (IfcDerivedUnit - ,IfcMonetaryUnit - ,IfcNamedUnit); -END_TYPE; - -TYPE IfcValue = SELECT - (IfcDerivedMeasureValue - ,IfcMeasureValue - ,IfcSimpleValue); -END_TYPE; - -TYPE IfcVectorOrDirection = SELECT - (IfcDirection - ,IfcVector); -END_TYPE; - -TYPE IfcWarpingStiffnessSelect = SELECT - (IfcBoolean - ,IfcWarpingMomentMeasure); -END_TYPE; - -ENTITY IfcActionRequest - SUBTYPE OF (IfcControl); - PredefinedType : OPTIONAL IfcActionRequestTypeEnum; - Status : OPTIONAL IfcLabel; - LongDescription : OPTIONAL IfcText; -END_ENTITY; - -ENTITY IfcActor - SUPERTYPE OF (ONEOF - (IfcOccupant)) - SUBTYPE OF (IfcObject); - TheActor : IfcActorSelect; - INVERSE - IsActingUpon : SET [0:?] OF IfcRelAssignsToActor FOR RelatingActor; -END_ENTITY; - -ENTITY IfcActorRole; - Role : IfcRoleEnum; - UserDefinedRole : OPTIONAL IfcLabel; - Description : OPTIONAL IfcText; - INVERSE - HasExternalReference : SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects; - WHERE - WR1 : (Role <> IfcRoleEnum.USERDEFINED) OR -((Role = IfcRoleEnum.USERDEFINED) AND - EXISTS(SELF.UserDefinedRole)); -END_ENTITY; - -ENTITY IfcActuator - SUBTYPE OF (IfcDistributionControlElement); - PredefinedType : OPTIONAL IfcActuatorTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcActuatorTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcActuatorTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR -('IFC4.IFCACTUATORTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcActuatorType - SUBTYPE OF (IfcDistributionControlElementType); - PredefinedType : IfcActuatorTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcActuatorTypeEnum.USERDEFINED) OR -((PredefinedType = IfcActuatorTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcAddress - ABSTRACT SUPERTYPE OF (ONEOF - (IfcPostalAddress - ,IfcTelecomAddress)); - Purpose : OPTIONAL IfcAddressTypeEnum; - Description : OPTIONAL IfcText; - UserDefinedPurpose : OPTIONAL IfcLabel; - INVERSE - OfPerson : SET [0:?] OF IfcPerson FOR Addresses; - OfOrganization : SET [0:?] OF IfcOrganization FOR Addresses; - WHERE - WR1 : (NOT(EXISTS(Purpose))) OR -((Purpose <> IfcAddressTypeEnum.USERDEFINED) OR -((Purpose = IfcAddressTypeEnum.USERDEFINED) AND - EXISTS(SELF.UserDefinedPurpose))); -END_ENTITY; - -ENTITY IfcAdvancedBrep - SUPERTYPE OF (ONEOF - (IfcAdvancedBrepWithVoids)) - SUBTYPE OF (IfcManifoldSolidBrep); - WHERE - HasAdvancedFaces : SIZEOF(QUERY(Afs <* SELF\IfcManifoldSolidBrep.Outer.CfsFaces | - (NOT ('IFC4.IFCADVANCEDFACE' IN TYPEOF(Afs))) -)) = 0; -END_ENTITY; - -ENTITY IfcAdvancedBrepWithVoids - SUBTYPE OF (IfcAdvancedBrep); - Voids : SET [1:?] OF IfcClosedShell; - WHERE - VoidsHaveAdvancedFaces : SIZEOF (QUERY (Vsh <* Voids | - SIZEOF (QUERY (Afs <* Vsh.CfsFaces | - (NOT ('IFC4.IFCADVANCEDFACE' IN TYPEOF(Afs))) - )) = 0 -)) = 0; -END_ENTITY; - -ENTITY IfcAdvancedFace - SUBTYPE OF (IfcFaceSurface); - WHERE - ApplicableSurface : SIZEOF ( -['IFC4.IFCELEMENTARYSURFACE', - 'IFC4.IFCSWEPTSURFACE', - 'IFC4.IFCBSPLINESURFACE'] * -TYPEOF(SELF\IfcFaceSurface.FaceSurface)) = 1; - RequiresEdgeCurve : SIZEOF(QUERY (ElpFbnds <* - QUERY (Bnds <* SELF\IfcFace.Bounds | - 'IFC4.IFCEDGELOOP' IN TYPEOF(Bnds.Bound)) | - NOT (SIZEOF (QUERY (Oe <* ElpFbnds.Bound\IfcEdgeLoop.EdgeList | - NOT('IFC4.IFCEDGECURVE' IN - TYPEOF(Oe\IfcOrientedEdge.EdgeElement) - ))) = 0 -))) = 0; - ApplicableEdgeCurves : SIZEOF(QUERY (ElpFbnds <* - QUERY (Bnds <* SELF\IfcFace.Bounds | - 'IFC4.IFCEDGELOOP' IN TYPEOF(Bnds.Bound)) | - NOT (SIZEOF (QUERY (Oe <* ElpFbnds.Bound\IfcEdgeLoop.EdgeList | - NOT (SIZEOF (['IFC4.IFCLINE', - 'IFC4.IFCCONIC', - 'IFC4.IFCPOLYLINE', - 'IFC4.IFCBSPLINECURVE'] * - TYPEOF(Oe\IfcOrientedEdge.EdgeElement\IfcEdgeCurve.EdgeGeometry)) = 1 ) - )) = 0 -))) = 0; -END_ENTITY; - -ENTITY IfcAirTerminal - SUBTYPE OF (IfcFlowTerminal); - PredefinedType : OPTIONAL IfcAirTerminalTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcAirTerminalTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcAirTerminalTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCAIRTERMINALTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcAirTerminalBox - SUBTYPE OF (IfcFlowController); - PredefinedType : OPTIONAL IfcAirTerminalBoxTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcAirTerminalBoxTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcAirTerminalBoxTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCAIRTERMINALBOXTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcAirTerminalBoxType - SUBTYPE OF (IfcFlowControllerType); - PredefinedType : IfcAirTerminalBoxTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcAirTerminalBoxTypeEnum.USERDEFINED) OR -((PredefinedType = IfcAirTerminalBoxTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcAirTerminalType - SUBTYPE OF (IfcFlowTerminalType); - PredefinedType : IfcAirTerminalTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcAirTerminalTypeEnum.USERDEFINED) OR -((PredefinedType = IfcAirTerminalTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcAirToAirHeatRecovery - SUBTYPE OF (IfcEnergyConversionDevice); - PredefinedType : OPTIONAL IfcAirToAirHeatRecoveryTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcAirToAirHeatRecoveryTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcAirToAirHeatRecoveryTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCAIRTOAIRHEATRECOVERYTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcAirToAirHeatRecoveryType - SUBTYPE OF (IfcEnergyConversionDeviceType); - PredefinedType : IfcAirToAirHeatRecoveryTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcAirToAirHeatRecoveryTypeEnum.USERDEFINED) OR -((PredefinedType = IfcAirToAirHeatRecoveryTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcAlarm - SUBTYPE OF (IfcDistributionControlElement); - PredefinedType : OPTIONAL IfcAlarmTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcAlarmTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcAlarmTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR -('IFC4.IFCALARMTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcAlarmType - SUBTYPE OF (IfcDistributionControlElementType); - PredefinedType : IfcAlarmTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcAlarmTypeEnum.USERDEFINED) OR -((PredefinedType = IfcAlarmTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcAnnotation - SUBTYPE OF (IfcProduct); - INVERSE - ContainedInStructure : SET [0:1] OF IfcRelContainedInSpatialStructure FOR RelatedElements; -END_ENTITY; - -ENTITY IfcAnnotationFillArea - SUBTYPE OF (IfcGeometricRepresentationItem); - OuterBoundary : IfcCurve; - InnerBoundaries : OPTIONAL SET [1:?] OF IfcCurve; -END_ENTITY; - -ENTITY IfcApplication; - ApplicationDeveloper : IfcOrganization; - Version : IfcLabel; - ApplicationFullName : IfcLabel; - ApplicationIdentifier : IfcIdentifier; - UNIQUE - UR1 : ApplicationIdentifier; - UR2 : ApplicationFullName, Version; -END_ENTITY; - -ENTITY IfcAppliedValue - SUPERTYPE OF (ONEOF - (IfcCostValue)); - Name : OPTIONAL IfcLabel; - Description : OPTIONAL IfcText; - AppliedValue : OPTIONAL IfcAppliedValueSelect; - UnitBasis : OPTIONAL IfcMeasureWithUnit; - ApplicableDate : OPTIONAL IfcDate; - FixedUntilDate : OPTIONAL IfcDate; - Category : OPTIONAL IfcLabel; - Condition : OPTIONAL IfcLabel; - ArithmeticOperator : OPTIONAL IfcArithmeticOperatorEnum; - Components : OPTIONAL LIST [1:?] OF IfcAppliedValue; - INVERSE - HasExternalReference : SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects; -END_ENTITY; - -ENTITY IfcApproval; - Identifier : OPTIONAL IfcIdentifier; - Name : OPTIONAL IfcLabel; - Description : OPTIONAL IfcText; - TimeOfApproval : OPTIONAL IfcDateTime; - Status : OPTIONAL IfcLabel; - Level : OPTIONAL IfcLabel; - Qualifier : OPTIONAL IfcText; - RequestingApproval : OPTIONAL IfcActorSelect; - GivingApproval : OPTIONAL IfcActorSelect; - INVERSE - HasExternalReferences : SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects; - ApprovedObjects : SET [0:?] OF IfcRelAssociatesApproval FOR RelatingApproval; - ApprovedResources : SET [0:?] OF IfcResourceApprovalRelationship FOR RelatingApproval; - IsRelatedWith : SET [0:?] OF IfcApprovalRelationship FOR RelatedApprovals; - Relates : SET [0:?] OF IfcApprovalRelationship FOR RelatingApproval; - WHERE - HasIdentifierOrName : EXISTS (Identifier) OR EXISTS (Name); -END_ENTITY; - -ENTITY IfcApprovalRelationship - SUBTYPE OF (IfcResourceLevelRelationship); - RelatingApproval : IfcApproval; - RelatedApprovals : SET [1:?] OF IfcApproval; -END_ENTITY; - -ENTITY IfcArbitraryClosedProfileDef - SUPERTYPE OF (ONEOF - (IfcArbitraryProfileDefWithVoids)) - SUBTYPE OF (IfcProfileDef); - OuterCurve : IfcCurve; - WHERE - WR1 : OuterCurve.Dim = 2; - WR2 : NOT('IFC4.IFCLINE' IN TYPEOF(OuterCurve)); - WR3 : NOT('IFC4.IFCOFFSETCURVE2D' IN TYPEOF(OuterCurve)); -END_ENTITY; - -ENTITY IfcArbitraryOpenProfileDef - SUPERTYPE OF (ONEOF - (IfcCenterLineProfileDef)) - SUBTYPE OF (IfcProfileDef); - Curve : IfcBoundedCurve; - WHERE - WR11 : ('IFC4.IFCCENTERLINEPROFILEDEF' IN TYPEOF(SELF)) OR - (SELF\IfcProfileDef.ProfileType = IfcProfileTypeEnum.CURVE); - WR12 : Curve.Dim = 2; -END_ENTITY; - -ENTITY IfcArbitraryProfileDefWithVoids - SUBTYPE OF (IfcArbitraryClosedProfileDef); - InnerCurves : SET [1:?] OF IfcCurve; - WHERE - WR1 : SELF\IfcProfileDef.ProfileType = AREA; - WR2 : SIZEOF(QUERY(temp <* InnerCurves | temp.Dim <> 2)) = 0; - WR3 : SIZEOF(QUERY(temp <* InnerCurves | 'IFC4.IFCLINE' IN TYPEOF(temp))) = 0; -END_ENTITY; - -ENTITY IfcAsset - SUBTYPE OF (IfcGroup); - Identification : OPTIONAL IfcIdentifier; - OriginalValue : OPTIONAL IfcCostValue; - CurrentValue : OPTIONAL IfcCostValue; - TotalReplacementCost : OPTIONAL IfcCostValue; - Owner : OPTIONAL IfcActorSelect; - User : OPTIONAL IfcActorSelect; - ResponsiblePerson : OPTIONAL IfcPerson; - IncorporationDate : OPTIONAL IfcDate; - DepreciatedValue : OPTIONAL IfcCostValue; -END_ENTITY; - -ENTITY IfcAsymmetricIShapeProfileDef - SUBTYPE OF (IfcParameterizedProfileDef); - BottomFlangeWidth : IfcPositiveLengthMeasure; - OverallDepth : IfcPositiveLengthMeasure; - WebThickness : IfcPositiveLengthMeasure; - BottomFlangeThickness : IfcPositiveLengthMeasure; - BottomFlangeFilletRadius : OPTIONAL IfcNonNegativeLengthMeasure; - TopFlangeWidth : IfcPositiveLengthMeasure; - TopFlangeThickness : OPTIONAL IfcPositiveLengthMeasure; - TopFlangeFilletRadius : OPTIONAL IfcNonNegativeLengthMeasure; - BottomFlangeEdgeRadius : OPTIONAL IfcNonNegativeLengthMeasure; - BottomFlangeSlope : OPTIONAL IfcPlaneAngleMeasure; - TopFlangeEdgeRadius : OPTIONAL IfcNonNegativeLengthMeasure; - TopFlangeSlope : OPTIONAL IfcPlaneAngleMeasure; - WHERE - ValidFlangeThickness : NOT(EXISTS(TopFlangeThickness)) OR ((BottomFlangeThickness + TopFlangeThickness) < OverallDepth); - ValidWebThickness : (WebThickness < BottomFlangeWidth) AND (WebThickness < TopFlangeWidth); - ValidBottomFilletRadius : (NOT(EXISTS(BottomFlangeFilletRadius))) OR -(BottomFlangeFilletRadius <= (BottomFlangeWidth - WebThickness)/2.); - ValidTopFilletRadius : (NOT(EXISTS(TopFlangeFilletRadius))) OR -(TopFlangeFilletRadius <= (TopFlangeWidth - WebThickness)/2.); -END_ENTITY; - -ENTITY IfcAudioVisualAppliance - SUBTYPE OF (IfcFlowTerminal); - PredefinedType : OPTIONAL IfcAudioVisualApplianceTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcAudioVisualApplianceTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcAudioVisualApplianceTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCAUDIOVISUALAPPLIANCETYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcAudioVisualApplianceType - SUBTYPE OF (IfcFlowTerminalType); - PredefinedType : IfcAudioVisualApplianceTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcAudioVisualApplianceTypeEnum.USERDEFINED) OR -((PredefinedType = IfcAudioVisualApplianceTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcAxis1Placement - SUBTYPE OF (IfcPlacement); - Axis : OPTIONAL IfcDirection; - DERIVE - Z : IfcDirection := NVL (IfcNormalise(Axis), IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcDirection([0.0,0.0,1.0])); - WHERE - AxisIs3D : (NOT (EXISTS (Axis))) OR (Axis.Dim = 3); - LocationIs3D : SELF\IfcPlacement.Location.Dim = 3; -END_ENTITY; - -ENTITY IfcAxis2Placement2D - SUBTYPE OF (IfcPlacement); - RefDirection : OPTIONAL IfcDirection; - DERIVE - P : LIST [2:2] OF IfcDirection := IfcBuild2Axes(RefDirection); - WHERE - RefDirIs2D : (NOT (EXISTS (RefDirection))) OR (RefDirection.Dim = 2); - LocationIs2D : SELF\IfcPlacement.Location.Dim = 2; -END_ENTITY; - -ENTITY IfcAxis2Placement3D - SUBTYPE OF (IfcPlacement); - Axis : OPTIONAL IfcDirection; - RefDirection : OPTIONAL IfcDirection; - DERIVE - P : LIST [3:3] OF IfcDirection := IfcBuildAxes(Axis, RefDirection); - WHERE - LocationIs3D : SELF\IfcPlacement.Location.Dim = 3; - AxisIs3D : (NOT (EXISTS (Axis))) OR (Axis.Dim = 3); - RefDirIs3D : (NOT (EXISTS (RefDirection))) OR (RefDirection.Dim = 3); - AxisToRefDirPosition : (NOT (EXISTS (Axis))) OR (NOT (EXISTS (RefDirection))) OR (IfcCrossProduct(Axis,RefDirection).Magnitude > 0.0); - AxisAndRefDirProvision : NOT ((EXISTS (Axis)) XOR (EXISTS (RefDirection))); -END_ENTITY; - -ENTITY IfcBSplineCurve - ABSTRACT SUPERTYPE OF (ONEOF - (IfcBSplineCurveWithKnots)) - SUBTYPE OF (IfcBoundedCurve); - Degree : IfcInteger; - ControlPointsList : LIST [2:?] OF IfcCartesianPoint; - CurveForm : IfcBSplineCurveForm; - ClosedCurve : IfcLogical; - SelfIntersect : IfcLogical; - DERIVE - UpperIndexOnControlPoints : IfcInteger := (SIZEOF(ControlPointsList) - 1); - ControlPoints : ARRAY [0:UpperIndexOnControlPoints] OF IfcCartesianPoint := IfcListToArray(ControlPointsList,0,UpperIndexOnControlPoints); - WHERE - SameDim : SIZEOF(QUERY(Temp <* ControlPointsList | - Temp.Dim <> ControlPointsList[1].Dim)) -= 0; -END_ENTITY; - -ENTITY IfcBSplineCurveWithKnots - SUPERTYPE OF (ONEOF - (IfcRationalBSplineCurveWithKnots)) - SUBTYPE OF (IfcBSplineCurve); - KnotMultiplicities : LIST [2:?] OF IfcInteger; - Knots : LIST [2:?] OF IfcParameterValue; - KnotSpec : IfcKnotType; - DERIVE - UpperIndexOnKnots : IfcInteger := SIZEOF(Knots); - WHERE - ConsistentBSpline : IfcConstraintsParamBSpline(Degree, UpperIndexOnKnots, -UpperIndexOnControlPoints, KnotMultiplicities, Knots); - CorrespondingKnotLists : SIZEOF(KnotMultiplicities) = UpperIndexOnKnots; -END_ENTITY; - -ENTITY IfcBSplineSurface - ABSTRACT SUPERTYPE OF (ONEOF - (IfcBSplineSurfaceWithKnots)) - SUBTYPE OF (IfcBoundedSurface); - UDegree : IfcInteger; - VDegree : IfcInteger; - ControlPointsList : LIST [2:?] OF LIST [2:?] OF IfcCartesianPoint; - SurfaceForm : IfcBSplineSurfaceForm; - UClosed : IfcLogical; - VClosed : IfcLogical; - SelfIntersect : IfcLogical; - DERIVE - UUpper : IfcInteger := SIZEOF(ControlPointsList) - 1; - VUpper : IfcInteger := SIZEOF(ControlPointsList[1]) - 1; - ControlPoints : ARRAY [0:UUpper] OF ARRAY [0:VUpper] OF IfcCartesianPoint := IfcMakeArrayOfArray(ControlPointsList, -0,UUpper,0,VUpper); -END_ENTITY; - -ENTITY IfcBSplineSurfaceWithKnots - SUPERTYPE OF (ONEOF - (IfcRationalBSplineSurfaceWithKnots)) - SUBTYPE OF (IfcBSplineSurface); - UMultiplicities : LIST [2:?] OF IfcInteger; - VMultiplicities : LIST [2:?] OF IfcInteger; - UKnots : LIST [2:?] OF IfcParameterValue; - VKnots : LIST [2:?] OF IfcParameterValue; - KnotSpec : IfcKnotType; - DERIVE - KnotVUpper : IfcInteger := SIZEOF(VKnots); - KnotUUpper : IfcInteger := SIZEOF(UKnots); - WHERE - UDirectionConstraints : IfcConstraintsParamBSpline ( - SELF\IfcBSplineSurface.UDegree, KnotUUpper, - SELF\IfcBSplineSurface.UUpper, UMultiplicities, UKnots); - VDirectionConstraints : IfcConstraintsParamBSpline ( - SELF\IfcBSplineSurface.VDegree, KnotVUpper, - SELF\IfcBSplineSurface.VUpper, VMultiplicities, VKnots); - CorrespondingULists : SIZEOF(UMultiplicities) = KnotUUpper; - CorrespondingVLists : SIZEOF(VMultiplicities) = KnotVUpper; -END_ENTITY; - -ENTITY IfcBeam - SUPERTYPE OF (ONEOF - (IfcBeamStandardCase)) - SUBTYPE OF (IfcBuildingElement); - PredefinedType : OPTIONAL IfcBeamTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcBeamTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcBeamTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCBEAMTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcBeamStandardCase - SUBTYPE OF (IfcBeam); - WHERE - HasMaterialProfileSetUsage : SIZEOF (QUERY(temp <* USEDIN(SELF, 'IFC4.IFCRELASSOCIATES.RELATEDOBJECTS') | - ('IFC4.IFCRELASSOCIATESMATERIAL' IN TYPEOF(temp)) AND - ('IFC4.IFCMATERIALPROFILESETUSAGE' IN TYPEOF(temp.RelatingMaterial)) - )) = 1; -END_ENTITY; - -ENTITY IfcBeamType - SUBTYPE OF (IfcBuildingElementType); - PredefinedType : IfcBeamTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcBeamTypeEnum.USERDEFINED) OR -((PredefinedType = IfcBeamTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcBlobTexture - SUBTYPE OF (IfcSurfaceTexture); - RasterFormat : IfcIdentifier; - RasterCode : IfcBinary; - WHERE - SupportedRasterFormat : SELF.RasterFormat IN ['BMP', 'JPG', 'GIF', 'PNG']; - RasterCodeByteStream : BLENGTH(RasterCode) MOD 8 = 0; -END_ENTITY; - -ENTITY IfcBlock - SUBTYPE OF (IfcCsgPrimitive3D); - XLength : IfcPositiveLengthMeasure; - YLength : IfcPositiveLengthMeasure; - ZLength : IfcPositiveLengthMeasure; -END_ENTITY; - -ENTITY IfcBoiler - SUBTYPE OF (IfcEnergyConversionDevice); - PredefinedType : OPTIONAL IfcBoilerTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcBoilerTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcBoilerTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCBOILERTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcBoilerType - SUBTYPE OF (IfcEnergyConversionDeviceType); - PredefinedType : IfcBoilerTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcBoilerTypeEnum.USERDEFINED) OR -((PredefinedType = IfcBoilerTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcBooleanClippingResult - SUBTYPE OF (IfcBooleanResult); - WHERE - FirstOperandType : ('IFC4.IFCSWEPTAREASOLID' IN TYPEOF(FirstOperand)) OR -('IFC4.IFCSWEPTDISCSOLID' IN TYPEOF(FirstOperand)) OR -('IFC4.IFCBOOLEANCLIPPINGRESULT' IN TYPEOF(FirstOperand)); - SecondOperandType : ('IFC4.IFCHALFSPACESOLID' IN TYPEOF(SecondOperand)); - OperatorType : Operator = DIFFERENCE; -END_ENTITY; - -ENTITY IfcBooleanResult - SUPERTYPE OF (ONEOF - (IfcBooleanClippingResult)) - SUBTYPE OF (IfcGeometricRepresentationItem); - Operator : IfcBooleanOperator; - FirstOperand : IfcBooleanOperand; - SecondOperand : IfcBooleanOperand; - DERIVE - Dim : IfcDimensionCount := FirstOperand.Dim; - WHERE - SameDim : FirstOperand.Dim = SecondOperand.Dim; - FirstOperandClosed : NOT('IFC4.IFCTESSELLATEDFACESET' IN TYPEOF(FirstOperand)) OR (EXISTS(FirstOperand.Closed) AND FirstOperand.Closed); - SecondOperandClosed : NOT('IFC4.IFCTESSELLATEDFACESET' IN TYPEOF(SecondOperand)) OR (EXISTS(SecondOperand.Closed) AND SecondOperand.Closed); -END_ENTITY; - -ENTITY IfcBoundaryCondition - ABSTRACT SUPERTYPE OF (ONEOF - (IfcBoundaryEdgeCondition - ,IfcBoundaryFaceCondition - ,IfcBoundaryNodeCondition)); - Name : OPTIONAL IfcLabel; -END_ENTITY; - -ENTITY IfcBoundaryCurve - SUPERTYPE OF (ONEOF - (IfcOuterBoundaryCurve)) - SUBTYPE OF (IfcCompositeCurveOnSurface); - WHERE - IsClosed : SELF\IfcCompositeCurve.ClosedCurve; -END_ENTITY; - -ENTITY IfcBoundaryEdgeCondition - SUBTYPE OF (IfcBoundaryCondition); - TranslationalStiffnessByLengthX : OPTIONAL IfcModulusOfTranslationalSubgradeReactionSelect; - TranslationalStiffnessByLengthY : OPTIONAL IfcModulusOfTranslationalSubgradeReactionSelect; - TranslationalStiffnessByLengthZ : OPTIONAL IfcModulusOfTranslationalSubgradeReactionSelect; - RotationalStiffnessByLengthX : OPTIONAL IfcModulusOfRotationalSubgradeReactionSelect; - RotationalStiffnessByLengthY : OPTIONAL IfcModulusOfRotationalSubgradeReactionSelect; - RotationalStiffnessByLengthZ : OPTIONAL IfcModulusOfRotationalSubgradeReactionSelect; -END_ENTITY; - -ENTITY IfcBoundaryFaceCondition - SUBTYPE OF (IfcBoundaryCondition); - TranslationalStiffnessByAreaX : OPTIONAL IfcModulusOfSubgradeReactionSelect; - TranslationalStiffnessByAreaY : OPTIONAL IfcModulusOfSubgradeReactionSelect; - TranslationalStiffnessByAreaZ : OPTIONAL IfcModulusOfSubgradeReactionSelect; -END_ENTITY; - -ENTITY IfcBoundaryNodeCondition - SUPERTYPE OF (ONEOF - (IfcBoundaryNodeConditionWarping)) - SUBTYPE OF (IfcBoundaryCondition); - TranslationalStiffnessX : OPTIONAL IfcTranslationalStiffnessSelect; - TranslationalStiffnessY : OPTIONAL IfcTranslationalStiffnessSelect; - TranslationalStiffnessZ : OPTIONAL IfcTranslationalStiffnessSelect; - RotationalStiffnessX : OPTIONAL IfcRotationalStiffnessSelect; - RotationalStiffnessY : OPTIONAL IfcRotationalStiffnessSelect; - RotationalStiffnessZ : OPTIONAL IfcRotationalStiffnessSelect; -END_ENTITY; - -ENTITY IfcBoundaryNodeConditionWarping - SUBTYPE OF (IfcBoundaryNodeCondition); - WarpingStiffness : OPTIONAL IfcWarpingStiffnessSelect; -END_ENTITY; - -ENTITY IfcBoundedCurve - ABSTRACT SUPERTYPE OF (ONEOF - (IfcBSplineCurve - ,IfcCompositeCurve - ,IfcIndexedPolyCurve - ,IfcPolyline - ,IfcTrimmedCurve)) - SUBTYPE OF (IfcCurve); -END_ENTITY; - -ENTITY IfcBoundedSurface - ABSTRACT SUPERTYPE OF (ONEOF - (IfcBSplineSurface - ,IfcCurveBoundedPlane - ,IfcCurveBoundedSurface - ,IfcRectangularTrimmedSurface)) - SUBTYPE OF (IfcSurface); -END_ENTITY; - -ENTITY IfcBoundingBox - SUBTYPE OF (IfcGeometricRepresentationItem); - Corner : IfcCartesianPoint; - XDim : IfcPositiveLengthMeasure; - YDim : IfcPositiveLengthMeasure; - ZDim : IfcPositiveLengthMeasure; - DERIVE - Dim : IfcDimensionCount := 3; -END_ENTITY; - -ENTITY IfcBoxedHalfSpace - SUBTYPE OF (IfcHalfSpaceSolid); - Enclosure : IfcBoundingBox; - WHERE - UnboundedSurface : NOT ('IFC4.IFCCURVEBOUNDEDPLANE' IN TYPEOF(SELF\IfcHalfSpaceSolid.BaseSurface)); -END_ENTITY; - -ENTITY IfcBuilding - SUBTYPE OF (IfcSpatialStructureElement); - ElevationOfRefHeight : OPTIONAL IfcLengthMeasure; - ElevationOfTerrain : OPTIONAL IfcLengthMeasure; - BuildingAddress : OPTIONAL IfcPostalAddress; -END_ENTITY; - -ENTITY IfcBuildingElement - ABSTRACT SUPERTYPE OF (ONEOF - (IfcBeam - ,IfcBuildingElementProxy - ,IfcChimney - ,IfcColumn - ,IfcCovering - ,IfcCurtainWall - ,IfcDoor - ,IfcFooting - ,IfcMember - ,IfcPile - ,IfcPlate - ,IfcRailing - ,IfcRamp - ,IfcRampFlight - ,IfcRoof - ,IfcShadingDevice - ,IfcSlab - ,IfcStair - ,IfcStairFlight - ,IfcWall - ,IfcWindow)) - SUBTYPE OF (IfcElement); - WHERE - MaxOneMaterialAssociation : SIZEOF (QUERY(temp <* SELF\IfcObjectDefinition.HasAssociations | - 'IFC4.IFCRELASSOCIATESMATERIAL' IN TYPEOF(temp) - )) <= 1; -END_ENTITY; - -ENTITY IfcBuildingElementPart - SUBTYPE OF (IfcElementComponent); - PredefinedType : OPTIONAL IfcBuildingElementPartTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR -(PredefinedType <> IfcBuildingElementPartTypeEnum.USERDEFINED) OR -((PredefinedType = IfcBuildingElementPartTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR -('IFC4.IFCBUILDINGELEMENTPARTTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcBuildingElementPartType - SUBTYPE OF (IfcElementComponentType); - PredefinedType : IfcBuildingElementPartTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcBuildingElementPartTypeEnum.USERDEFINED) OR -((PredefinedType = IfcBuildingElementPartTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcBuildingElementProxy - SUBTYPE OF (IfcBuildingElement); - PredefinedType : OPTIONAL IfcBuildingElementProxyTypeEnum; - WHERE - HasObjectName : EXISTS(SELF\IfcRoot.Name); - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcBuildingElementProxyTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcBuildingElementProxyTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCBUILDINGELEMENTPROXYTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcBuildingElementProxyType - SUBTYPE OF (IfcBuildingElementType); - PredefinedType : IfcBuildingElementProxyTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcBuildingElementProxyTypeEnum.USERDEFINED) OR -((PredefinedType = IfcBuildingElementProxyTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcBuildingElementType - ABSTRACT SUPERTYPE OF (ONEOF - (IfcBeamType - ,IfcBuildingElementProxyType - ,IfcChimneyType - ,IfcColumnType - ,IfcCoveringType - ,IfcCurtainWallType - ,IfcDoorType - ,IfcFootingType - ,IfcMemberType - ,IfcPileType - ,IfcPlateType - ,IfcRailingType - ,IfcRampFlightType - ,IfcRampType - ,IfcRoofType - ,IfcShadingDeviceType - ,IfcSlabType - ,IfcStairFlightType - ,IfcStairType - ,IfcWallType - ,IfcWindowType)) - SUBTYPE OF (IfcElementType); -END_ENTITY; - -ENTITY IfcBuildingStorey - SUBTYPE OF (IfcSpatialStructureElement); - Elevation : OPTIONAL IfcLengthMeasure; -END_ENTITY; - -ENTITY IfcBuildingSystem - SUBTYPE OF (IfcSystem); - PredefinedType : OPTIONAL IfcBuildingSystemTypeEnum; - LongName : OPTIONAL IfcLabel; -END_ENTITY; - -ENTITY IfcBurner - SUBTYPE OF (IfcEnergyConversionDevice); - PredefinedType : OPTIONAL IfcBurnerTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcBurnerTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcBurnerTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCBURNERTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcBurnerType - SUBTYPE OF (IfcEnergyConversionDeviceType); - PredefinedType : IfcBurnerTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcBurnerTypeEnum.USERDEFINED) OR -((PredefinedType = IfcBurnerTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcCShapeProfileDef - SUBTYPE OF (IfcParameterizedProfileDef); - Depth : IfcPositiveLengthMeasure; - Width : IfcPositiveLengthMeasure; - WallThickness : IfcPositiveLengthMeasure; - Girth : IfcPositiveLengthMeasure; - InternalFilletRadius : OPTIONAL IfcNonNegativeLengthMeasure; - WHERE - ValidGirth : Girth < (Depth / 2.); - ValidInternalFilletRadius : NOT(EXISTS(InternalFilletRadius)) OR -((InternalFilletRadius <= Width/2. - WallThickness) AND (InternalFilletRadius <= Depth/2. - WallThickness)); - ValidWallThickness : (WallThickness < Width/2.) AND (WallThickness < Depth/2.); -END_ENTITY; - -ENTITY IfcCableCarrierFitting - SUBTYPE OF (IfcFlowFitting); - PredefinedType : OPTIONAL IfcCableCarrierFittingTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcCableCarrierFittingTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcCableCarrierFittingTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCCABLECARRIERFITTINGTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcCableCarrierFittingType - SUBTYPE OF (IfcFlowFittingType); - PredefinedType : IfcCableCarrierFittingTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcCableCarrierFittingTypeEnum.USERDEFINED) OR -((PredefinedType = IfcCableCarrierFittingTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcCableCarrierSegment - SUBTYPE OF (IfcFlowSegment); - PredefinedType : OPTIONAL IfcCableCarrierSegmentTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcCableCarrierSegmentTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcCableCarrierSegmentTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCCABLECARRIERSEGMENTTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcCableCarrierSegmentType - SUBTYPE OF (IfcFlowSegmentType); - PredefinedType : IfcCableCarrierSegmentTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcCableCarrierSegmentTypeEnum.USERDEFINED) OR -((PredefinedType = IfcCableCarrierSegmentTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcCableFitting - SUBTYPE OF (IfcFlowFitting); - PredefinedType : OPTIONAL IfcCableFittingTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcCableFittingTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcCableFittingTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCCABLEFITTINGTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcCableFittingType - SUBTYPE OF (IfcFlowFittingType); - PredefinedType : IfcCableFittingTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcCableFittingTypeEnum.USERDEFINED) OR -((PredefinedType = IfcCableFittingTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcCableSegment - SUBTYPE OF (IfcFlowSegment); - PredefinedType : OPTIONAL IfcCableSegmentTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcCableSegmentTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcCableSegmentTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCCABLESEGMENTTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcCableSegmentType - SUBTYPE OF (IfcFlowSegmentType); - PredefinedType : IfcCableSegmentTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcCableSegmentTypeEnum.USERDEFINED) OR -((PredefinedType = IfcCableSegmentTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcCartesianPoint - SUBTYPE OF (IfcPoint); - Coordinates : LIST [1:3] OF IfcLengthMeasure; - DERIVE - Dim : IfcDimensionCount := HIINDEX(Coordinates); - WHERE - CP2Dor3D : HIINDEX(Coordinates) >= 2; -END_ENTITY; - -ENTITY IfcCartesianPointList - ABSTRACT SUPERTYPE OF (ONEOF - (IfcCartesianPointList2D - ,IfcCartesianPointList3D)) - SUBTYPE OF (IfcGeometricRepresentationItem); - DERIVE - Dim : IfcDimensionCount := IfcPointListDim(SELF); -END_ENTITY; - -ENTITY IfcCartesianPointList2D - SUBTYPE OF (IfcCartesianPointList); - CoordList : LIST [1:?] OF LIST [2:2] OF IfcLengthMeasure; -END_ENTITY; - -ENTITY IfcCartesianPointList3D - SUBTYPE OF (IfcCartesianPointList); - CoordList : LIST [1:?] OF LIST [3:3] OF IfcLengthMeasure; -END_ENTITY; - -ENTITY IfcCartesianTransformationOperator - ABSTRACT SUPERTYPE OF (ONEOF - (IfcCartesianTransformationOperator2D - ,IfcCartesianTransformationOperator3D)) - SUBTYPE OF (IfcGeometricRepresentationItem); - Axis1 : OPTIONAL IfcDirection; - Axis2 : OPTIONAL IfcDirection; - LocalOrigin : IfcCartesianPoint; - Scale : OPTIONAL IfcReal; - DERIVE - Scl : IfcReal := NVL(Scale, 1.0); - Dim : IfcDimensionCount := LocalOrigin.Dim; - WHERE - ScaleGreaterZero : Scl > 0.0; -END_ENTITY; - -ENTITY IfcCartesianTransformationOperator2D - SUPERTYPE OF (ONEOF - (IfcCartesianTransformationOperator2DnonUniform)) - SUBTYPE OF (IfcCartesianTransformationOperator); - DERIVE - U : LIST [2:2] OF IfcDirection := IfcBaseAxis(2,SELF\IfcCartesianTransformationOperator.Axis1, -SELF\IfcCartesianTransformationOperator.Axis2,?); - WHERE - DimEqual2 : SELF\IfcCartesianTransformationOperator.Dim = 2; - Axis1Is2D : NOT(EXISTS(SELF\IfcCartesianTransformationOperator.Axis1)) OR -(SELF\IfcCartesianTransformationOperator.Axis1.Dim = 2); - Axis2Is2D : NOT(EXISTS(SELF\IfcCartesianTransformationOperator.Axis2)) OR -(SELF\IfcCartesianTransformationOperator.Axis2.Dim = 2); -END_ENTITY; - -ENTITY IfcCartesianTransformationOperator2DnonUniform - SUBTYPE OF (IfcCartesianTransformationOperator2D); - Scale2 : OPTIONAL IfcReal; - DERIVE - Scl2 : IfcReal := NVL(Scale2, SELF\IfcCartesianTransformationOperator.Scl); - WHERE - Scale2GreaterZero : Scl2 > 0.0; -END_ENTITY; - -ENTITY IfcCartesianTransformationOperator3D - SUPERTYPE OF (ONEOF - (IfcCartesianTransformationOperator3DnonUniform)) - SUBTYPE OF (IfcCartesianTransformationOperator); - Axis3 : OPTIONAL IfcDirection; - DERIVE - U : LIST [3:3] OF IfcDirection := IfcBaseAxis(3,SELF\IfcCartesianTransformationOperator.Axis1, -SELF\IfcCartesianTransformationOperator.Axis2,Axis3); - WHERE - DimIs3D : SELF\IfcCartesianTransformationOperator.Dim = 3; - Axis1Is3D : NOT(EXISTS(SELF\IfcCartesianTransformationOperator.Axis1)) OR -(SELF\IfcCartesianTransformationOperator.Axis1.Dim = 3); - Axis2Is3D : NOT(EXISTS(SELF\IfcCartesianTransformationOperator.Axis2)) OR -(SELF\IfcCartesianTransformationOperator.Axis2.Dim = 3); - Axis3Is3D : NOT(EXISTS(Axis3)) OR (Axis3.Dim = 3); -END_ENTITY; - -ENTITY IfcCartesianTransformationOperator3DnonUniform - SUBTYPE OF (IfcCartesianTransformationOperator3D); - Scale2 : OPTIONAL IfcReal; - Scale3 : OPTIONAL IfcReal; - DERIVE - Scl2 : IfcReal := NVL(Scale2, SELF\IfcCartesianTransformationOperator.Scl); - Scl3 : IfcReal := NVL(Scale3, SELF\IfcCartesianTransformationOperator.Scl); - WHERE - Scale2GreaterZero : Scl2 > 0.0; - Scale3GreaterZero : Scl3 > 0.0; -END_ENTITY; - -ENTITY IfcCenterLineProfileDef - SUBTYPE OF (IfcArbitraryOpenProfileDef); - Thickness : IfcPositiveLengthMeasure; -END_ENTITY; - -ENTITY IfcChiller - SUBTYPE OF (IfcEnergyConversionDevice); - PredefinedType : OPTIONAL IfcChillerTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcChillerTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcChillerTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCCHILLERTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcChillerType - SUBTYPE OF (IfcEnergyConversionDeviceType); - PredefinedType : IfcChillerTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcChillerTypeEnum.USERDEFINED) OR -((PredefinedType = IfcChillerTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcChimney - SUBTYPE OF (IfcBuildingElement); - PredefinedType : OPTIONAL IfcChimneyTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcChimneyTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcChimneyTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCCHIMNEYTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcChimneyType - SUBTYPE OF (IfcBuildingElementType); - PredefinedType : IfcChimneyTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcChimneyTypeEnum.USERDEFINED) OR -((PredefinedType = IfcChimneyTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcCircle - SUBTYPE OF (IfcConic); - Radius : IfcPositiveLengthMeasure; -END_ENTITY; - -ENTITY IfcCircleHollowProfileDef - SUBTYPE OF (IfcCircleProfileDef); - WallThickness : IfcPositiveLengthMeasure; - WHERE - WR1 : WallThickness < SELF\IfcCircleProfileDef.Radius; -END_ENTITY; - -ENTITY IfcCircleProfileDef - SUPERTYPE OF (ONEOF - (IfcCircleHollowProfileDef)) - SUBTYPE OF (IfcParameterizedProfileDef); - Radius : IfcPositiveLengthMeasure; -END_ENTITY; - -ENTITY IfcCivilElement - SUBTYPE OF (IfcElement); -END_ENTITY; - -ENTITY IfcCivilElementType - SUBTYPE OF (IfcElementType); -END_ENTITY; - -ENTITY IfcClassification - SUBTYPE OF (IfcExternalInformation); - Source : OPTIONAL IfcLabel; - Edition : OPTIONAL IfcLabel; - EditionDate : OPTIONAL IfcDate; - Name : IfcLabel; - Description : OPTIONAL IfcText; - Location : OPTIONAL IfcURIReference; - ReferenceTokens : OPTIONAL LIST [1:?] OF IfcIdentifier; - INVERSE - ClassificationForObjects : SET [0:?] OF IfcRelAssociatesClassification FOR RelatingClassification; - HasReferences : SET [0:?] OF IfcClassificationReference FOR ReferencedSource; -END_ENTITY; - -ENTITY IfcClassificationReference - SUBTYPE OF (IfcExternalReference); - ReferencedSource : OPTIONAL IfcClassificationReferenceSelect; - Description : OPTIONAL IfcText; - Sort : OPTIONAL IfcIdentifier; - INVERSE - ClassificationRefForObjects : SET [0:?] OF IfcRelAssociatesClassification FOR RelatingClassification; - HasReferences : SET [0:?] OF IfcClassificationReference FOR ReferencedSource; -END_ENTITY; - -ENTITY IfcClosedShell - SUBTYPE OF (IfcConnectedFaceSet); -END_ENTITY; - -ENTITY IfcCoil - SUBTYPE OF (IfcEnergyConversionDevice); - PredefinedType : OPTIONAL IfcCoilTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcCoilTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcCoilTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCCOILTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcCoilType - SUBTYPE OF (IfcEnergyConversionDeviceType); - PredefinedType : IfcCoilTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcCoilTypeEnum.USERDEFINED) OR -((PredefinedType = IfcCoilTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcColourRgb - SUBTYPE OF (IfcColourSpecification); - Red : IfcNormalisedRatioMeasure; - Green : IfcNormalisedRatioMeasure; - Blue : IfcNormalisedRatioMeasure; -END_ENTITY; - -ENTITY IfcColourRgbList - SUBTYPE OF (IfcPresentationItem); - ColourList : LIST [1:?] OF LIST [3:3] OF IfcNormalisedRatioMeasure; -END_ENTITY; - -ENTITY IfcColourSpecification - ABSTRACT SUPERTYPE OF (ONEOF - (IfcColourRgb)) - SUBTYPE OF (IfcPresentationItem); - Name : OPTIONAL IfcLabel; -END_ENTITY; - -ENTITY IfcColumn - SUPERTYPE OF (ONEOF - (IfcColumnStandardCase)) - SUBTYPE OF (IfcBuildingElement); - PredefinedType : OPTIONAL IfcColumnTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcColumnTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcColumnTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCCOLUMNTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcColumnStandardCase - SUBTYPE OF (IfcColumn); - WHERE - HasMaterialProfileSetUsage : SIZEOF (QUERY(temp <* USEDIN(SELF, 'IFC4.IFCRELASSOCIATES.RELATEDOBJECTS') | - ('IFC4.IFCRELASSOCIATESMATERIAL' IN TYPEOF(temp)) AND - ('IFC4.IFCMATERIALPROFILESETUSAGE' IN TYPEOF(temp.RelatingMaterial)) - )) = 1; -END_ENTITY; - -ENTITY IfcColumnType - SUBTYPE OF (IfcBuildingElementType); - PredefinedType : IfcColumnTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcColumnTypeEnum.USERDEFINED) OR -((PredefinedType = IfcColumnTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcCommunicationsAppliance - SUBTYPE OF (IfcFlowTerminal); - PredefinedType : OPTIONAL IfcCommunicationsApplianceTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcCommunicationsApplianceTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcCommunicationsApplianceTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCCOMMUNICATIONSAPPLIANCETYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcCommunicationsApplianceType - SUBTYPE OF (IfcFlowTerminalType); - PredefinedType : IfcCommunicationsApplianceTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcCommunicationsApplianceTypeEnum.USERDEFINED) OR -((PredefinedType = IfcCommunicationsApplianceTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcComplexProperty - SUBTYPE OF (IfcProperty); - UsageName : IfcIdentifier; - HasProperties : SET [1:?] OF IfcProperty; - WHERE - WR21 : SIZEOF(QUERY(temp <* HasProperties | SELF :=: temp)) = 0; - WR22 : IfcUniquePropertyName(HasProperties); -END_ENTITY; - -ENTITY IfcComplexPropertyTemplate - SUBTYPE OF (IfcPropertyTemplate); - UsageName : OPTIONAL IfcLabel; - TemplateType : OPTIONAL IfcComplexPropertyTemplateTypeEnum; - HasPropertyTemplates : OPTIONAL SET [1:?] OF IfcPropertyTemplate; - WHERE - UniquePropertyNames : IfcUniquePropertyTemplateNames(HasPropertyTemplates); - NoSelfReference : SIZEOF(QUERY(temp <* HasPropertyTemplates | SELF :=: temp)) = 0; -END_ENTITY; - -ENTITY IfcCompositeCurve - SUPERTYPE OF (ONEOF - (IfcCompositeCurveOnSurface)) - SUBTYPE OF (IfcBoundedCurve); - Segments : LIST [1:?] OF IfcCompositeCurveSegment; - SelfIntersect : IfcLogical; - DERIVE - NSegments : IfcInteger := SIZEOF(Segments); - ClosedCurve : IfcLogical := Segments[NSegments].Transition <> Discontinuous; - WHERE - CurveContinuous : ((NOT ClosedCurve) AND (SIZEOF(QUERY(Temp <* Segments | Temp.Transition = Discontinuous)) = 1)) OR ((ClosedCurve) AND (SIZEOF(QUERY(Temp <* Segments | Temp.Transition = Discontinuous)) = 0)); - SameDim : SIZEOF( QUERY( Temp <* Segments | Temp.Dim <> Segments[1].Dim)) = 0; -END_ENTITY; - -ENTITY IfcCompositeCurveOnSurface - SUPERTYPE OF (ONEOF - (IfcBoundaryCurve)) - SUBTYPE OF (IfcCompositeCurve); - DERIVE - BasisSurface : SET [0:1] OF IfcSurface := IfcGetBasisSurface(SELF); - WHERE - SameSurface : SIZEOF(BasisSurface) > 0; -END_ENTITY; - -ENTITY IfcCompositeCurveSegment - SUPERTYPE OF (ONEOF - (IfcReparametrisedCompositeCurveSegment)) - SUBTYPE OF (IfcGeometricRepresentationItem); - Transition : IfcTransitionCode; - SameSense : IfcBoolean; - ParentCurve : IfcCurve; - DERIVE - Dim : IfcDimensionCount := ParentCurve.Dim; - INVERSE - UsingCurves : SET [1:?] OF IfcCompositeCurve FOR Segments; - WHERE - ParentIsBoundedCurve : ('IFC4.IFCBOUNDEDCURVE' IN TYPEOF(ParentCurve)); -END_ENTITY; - -ENTITY IfcCompositeProfileDef - SUBTYPE OF (IfcProfileDef); - Profiles : SET [2:?] OF IfcProfileDef; - Label : OPTIONAL IfcLabel; - WHERE - InvariantProfileType : SIZEOF(QUERY(temp <* Profiles | temp.ProfileType <> Profiles[1].ProfileType)) = 0; - NoRecursion : SIZEOF(QUERY(temp <* Profiles | 'IFC4.IFCCOMPOSITEPROFILEDEF' IN TYPEOF(temp))) = 0; -END_ENTITY; - -ENTITY IfcCompressor - SUBTYPE OF (IfcFlowMovingDevice); - PredefinedType : OPTIONAL IfcCompressorTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcCompressorTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcCompressorTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCCOMPRESSORTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcCompressorType - SUBTYPE OF (IfcFlowMovingDeviceType); - PredefinedType : IfcCompressorTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcCompressorTypeEnum.USERDEFINED) OR -((PredefinedType = IfcCompressorTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcCondenser - SUBTYPE OF (IfcEnergyConversionDevice); - PredefinedType : OPTIONAL IfcCondenserTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcCondenserTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcCondenserTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCCONDENSERTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcCondenserType - SUBTYPE OF (IfcEnergyConversionDeviceType); - PredefinedType : IfcCondenserTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcCondenserTypeEnum.USERDEFINED) OR -((PredefinedType = IfcCondenserTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcConic - ABSTRACT SUPERTYPE OF (ONEOF - (IfcCircle - ,IfcEllipse)) - SUBTYPE OF (IfcCurve); - Position : IfcAxis2Placement; -END_ENTITY; - -ENTITY IfcConnectedFaceSet - SUPERTYPE OF (ONEOF - (IfcClosedShell - ,IfcOpenShell)) - SUBTYPE OF (IfcTopologicalRepresentationItem); - CfsFaces : SET [1:?] OF IfcFace; -END_ENTITY; - -ENTITY IfcConnectionCurveGeometry - SUBTYPE OF (IfcConnectionGeometry); - CurveOnRelatingElement : IfcCurveOrEdgeCurve; - CurveOnRelatedElement : OPTIONAL IfcCurveOrEdgeCurve; -END_ENTITY; - -ENTITY IfcConnectionGeometry - ABSTRACT SUPERTYPE OF (ONEOF - (IfcConnectionCurveGeometry - ,IfcConnectionPointGeometry - ,IfcConnectionSurfaceGeometry - ,IfcConnectionVolumeGeometry)); -END_ENTITY; - -ENTITY IfcConnectionPointEccentricity - SUBTYPE OF (IfcConnectionPointGeometry); - EccentricityInX : OPTIONAL IfcLengthMeasure; - EccentricityInY : OPTIONAL IfcLengthMeasure; - EccentricityInZ : OPTIONAL IfcLengthMeasure; -END_ENTITY; - -ENTITY IfcConnectionPointGeometry - SUPERTYPE OF (ONEOF - (IfcConnectionPointEccentricity)) - SUBTYPE OF (IfcConnectionGeometry); - PointOnRelatingElement : IfcPointOrVertexPoint; - PointOnRelatedElement : OPTIONAL IfcPointOrVertexPoint; -END_ENTITY; - -ENTITY IfcConnectionSurfaceGeometry - SUBTYPE OF (IfcConnectionGeometry); - SurfaceOnRelatingElement : IfcSurfaceOrFaceSurface; - SurfaceOnRelatedElement : OPTIONAL IfcSurfaceOrFaceSurface; -END_ENTITY; - -ENTITY IfcConnectionVolumeGeometry - SUBTYPE OF (IfcConnectionGeometry); - VolumeOnRelatingElement : IfcSolidOrShell; - VolumeOnRelatedElement : OPTIONAL IfcSolidOrShell; -END_ENTITY; - -ENTITY IfcConstraint - ABSTRACT SUPERTYPE OF (ONEOF - (IfcMetric - ,IfcObjective)); - Name : IfcLabel; - Description : OPTIONAL IfcText; - ConstraintGrade : IfcConstraintEnum; - ConstraintSource : OPTIONAL IfcLabel; - CreatingActor : OPTIONAL IfcActorSelect; - CreationTime : OPTIONAL IfcDateTime; - UserDefinedGrade : OPTIONAL IfcLabel; - INVERSE - HasExternalReferences : SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects; - PropertiesForConstraint : SET [0:?] OF IfcResourceConstraintRelationship FOR RelatingConstraint; - WHERE - WR11 : (ConstraintGrade <> IfcConstraintEnum.USERDEFINED) OR -((ConstraintGrade = IfcConstraintEnum.USERDEFINED) AND EXISTS(SELF\IfcConstraint.UserDefinedGrade)); -END_ENTITY; - -ENTITY IfcConstructionEquipmentResource - SUBTYPE OF (IfcConstructionResource); - PredefinedType : OPTIONAL IfcConstructionEquipmentResourceTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcConstructionEquipmentResourceTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcConstructionEquipmentResourceTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); -END_ENTITY; - -ENTITY IfcConstructionEquipmentResourceType - SUBTYPE OF (IfcConstructionResourceType); - PredefinedType : IfcConstructionEquipmentResourceTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcConstructionEquipmentResourceTypeEnum.USERDEFINED) OR -((PredefinedType = IfcConstructionEquipmentResourceTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcTypeResource.ResourceType)); -END_ENTITY; - -ENTITY IfcConstructionMaterialResource - SUBTYPE OF (IfcConstructionResource); - PredefinedType : OPTIONAL IfcConstructionMaterialResourceTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcConstructionMaterialResourceTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcConstructionMaterialResourceTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); -END_ENTITY; - -ENTITY IfcConstructionMaterialResourceType - SUBTYPE OF (IfcConstructionResourceType); - PredefinedType : IfcConstructionMaterialResourceTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcConstructionMaterialResourceTypeEnum.USERDEFINED) OR -((PredefinedType = IfcConstructionMaterialResourceTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcTypeResource.ResourceType)); -END_ENTITY; - -ENTITY IfcConstructionProductResource - SUBTYPE OF (IfcConstructionResource); - PredefinedType : OPTIONAL IfcConstructionProductResourceTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcConstructionProductResourceTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcConstructionProductResourceTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); -END_ENTITY; - -ENTITY IfcConstructionProductResourceType - SUBTYPE OF (IfcConstructionResourceType); - PredefinedType : IfcConstructionProductResourceTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcConstructionProductResourceTypeEnum.USERDEFINED) OR -((PredefinedType = IfcConstructionProductResourceTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcTypeResource.ResourceType)); -END_ENTITY; - -ENTITY IfcConstructionResource - ABSTRACT SUPERTYPE OF (ONEOF - (IfcConstructionEquipmentResource - ,IfcConstructionMaterialResource - ,IfcConstructionProductResource - ,IfcCrewResource - ,IfcLaborResource - ,IfcSubContractResource)) - SUBTYPE OF (IfcResource); - Usage : OPTIONAL IfcResourceTime; - BaseCosts : OPTIONAL LIST [1:?] OF IfcAppliedValue; - BaseQuantity : OPTIONAL IfcPhysicalQuantity; -END_ENTITY; - -ENTITY IfcConstructionResourceType - ABSTRACT SUPERTYPE OF (ONEOF - (IfcConstructionEquipmentResourceType - ,IfcConstructionMaterialResourceType - ,IfcConstructionProductResourceType - ,IfcCrewResourceType - ,IfcLaborResourceType - ,IfcSubContractResourceType)) - SUBTYPE OF (IfcTypeResource); - BaseCosts : OPTIONAL LIST [1:?] OF IfcAppliedValue; - BaseQuantity : OPTIONAL IfcPhysicalQuantity; -END_ENTITY; - -ENTITY IfcContext - ABSTRACT SUPERTYPE OF (ONEOF - (IfcProject - ,IfcProjectLibrary)) - SUBTYPE OF (IfcObjectDefinition); - ObjectType : OPTIONAL IfcLabel; - LongName : OPTIONAL IfcLabel; - Phase : OPTIONAL IfcLabel; - RepresentationContexts : OPTIONAL SET [1:?] OF IfcRepresentationContext; - UnitsInContext : OPTIONAL IfcUnitAssignment; - INVERSE - IsDefinedBy : SET [0:?] OF IfcRelDefinesByProperties FOR RelatedObjects; - Declares : SET [0:?] OF IfcRelDeclares FOR RelatingContext; -END_ENTITY; - -ENTITY IfcContextDependentUnit - SUBTYPE OF (IfcNamedUnit); - Name : IfcLabel; - INVERSE - HasExternalReference : SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects; -END_ENTITY; - -ENTITY IfcControl - ABSTRACT SUPERTYPE OF (ONEOF - (IfcActionRequest - ,IfcCostItem - ,IfcCostSchedule - ,IfcPerformanceHistory - ,IfcPermit - ,IfcProjectOrder - ,IfcWorkCalendar - ,IfcWorkControl)) - SUBTYPE OF (IfcObject); - Identification : OPTIONAL IfcIdentifier; - INVERSE - Controls : SET [0:?] OF IfcRelAssignsToControl FOR RelatingControl; -END_ENTITY; - -ENTITY IfcController - SUBTYPE OF (IfcDistributionControlElement); - PredefinedType : OPTIONAL IfcControllerTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcControllerTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcControllerTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR -('IFC4.IFCCONTROLLERTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcControllerType - SUBTYPE OF (IfcDistributionControlElementType); - PredefinedType : IfcControllerTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcControllerTypeEnum.USERDEFINED) OR -((PredefinedType = IfcControllerTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcConversionBasedUnit - SUPERTYPE OF (ONEOF - (IfcConversionBasedUnitWithOffset)) - SUBTYPE OF (IfcNamedUnit); - Name : IfcLabel; - ConversionFactor : IfcMeasureWithUnit; - INVERSE - HasExternalReference : SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects; -END_ENTITY; - -ENTITY IfcConversionBasedUnitWithOffset - SUBTYPE OF (IfcConversionBasedUnit); - ConversionOffset : IfcReal; -END_ENTITY; - -ENTITY IfcCooledBeam - SUBTYPE OF (IfcEnergyConversionDevice); - PredefinedType : OPTIONAL IfcCooledBeamTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcCooledBeamTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcCooledBeamTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCCOOLEDBEAMTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcCooledBeamType - SUBTYPE OF (IfcEnergyConversionDeviceType); - PredefinedType : IfcCooledBeamTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcCooledBeamTypeEnum.USERDEFINED) OR -((PredefinedType = IfcCooledBeamTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcCoolingTower - SUBTYPE OF (IfcEnergyConversionDevice); - PredefinedType : OPTIONAL IfcCoolingTowerTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcCoolingTowerTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcCoolingTowerTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCCOOLINGTOWERTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcCoolingTowerType - SUBTYPE OF (IfcEnergyConversionDeviceType); - PredefinedType : IfcCoolingTowerTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcCoolingTowerTypeEnum.USERDEFINED) OR -((PredefinedType = IfcCoolingTowerTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcCoordinateOperation - ABSTRACT SUPERTYPE OF (ONEOF - (IfcMapConversion)); - SourceCRS : IfcCoordinateReferenceSystemSelect; - TargetCRS : IfcCoordinateReferenceSystem; -END_ENTITY; - -ENTITY IfcCoordinateReferenceSystem - ABSTRACT SUPERTYPE OF (ONEOF - (IfcProjectedCRS)); - Name : IfcLabel; - Description : OPTIONAL IfcText; - GeodeticDatum : OPTIONAL IfcIdentifier; - VerticalDatum : OPTIONAL IfcIdentifier; - INVERSE - HasCoordinateOperation : SET [0:1] OF IfcCoordinateOperation FOR SourceCRS; -END_ENTITY; - -ENTITY IfcCostItem - SUBTYPE OF (IfcControl); - PredefinedType : OPTIONAL IfcCostItemTypeEnum; - CostValues : OPTIONAL LIST [1:?] OF IfcCostValue; - CostQuantities : OPTIONAL LIST [1:?] OF IfcPhysicalQuantity; -END_ENTITY; - -ENTITY IfcCostSchedule - SUBTYPE OF (IfcControl); - PredefinedType : OPTIONAL IfcCostScheduleTypeEnum; - Status : OPTIONAL IfcLabel; - SubmittedOn : OPTIONAL IfcDateTime; - UpdateDate : OPTIONAL IfcDateTime; -END_ENTITY; - -ENTITY IfcCostValue - SUBTYPE OF (IfcAppliedValue); -END_ENTITY; - -ENTITY IfcCovering - SUBTYPE OF (IfcBuildingElement); - PredefinedType : OPTIONAL IfcCoveringTypeEnum; - INVERSE - CoversSpaces : SET [0:1] OF IfcRelCoversSpaces FOR RelatedCoverings; - CoversElements : SET [0:1] OF IfcRelCoversBldgElements FOR RelatedCoverings; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcCoveringTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcCoveringTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCCOVERINGTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcCoveringType - SUBTYPE OF (IfcBuildingElementType); - PredefinedType : IfcCoveringTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcCoveringTypeEnum.USERDEFINED) OR -((PredefinedType = IfcCoveringTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcCrewResource - SUBTYPE OF (IfcConstructionResource); - PredefinedType : OPTIONAL IfcCrewResourceTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcCrewResourceTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcCrewResourceTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); -END_ENTITY; - -ENTITY IfcCrewResourceType - SUBTYPE OF (IfcConstructionResourceType); - PredefinedType : IfcCrewResourceTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcCrewResourceTypeEnum.USERDEFINED) OR -((PredefinedType = IfcCrewResourceTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcTypeResource.ResourceType)); -END_ENTITY; - -ENTITY IfcCsgPrimitive3D - ABSTRACT SUPERTYPE OF (ONEOF - (IfcBlock - ,IfcRectangularPyramid - ,IfcRightCircularCone - ,IfcRightCircularCylinder - ,IfcSphere)) - SUBTYPE OF (IfcGeometricRepresentationItem); - Position : IfcAxis2Placement3D; - DERIVE - Dim : IfcDimensionCount := 3; -END_ENTITY; - -ENTITY IfcCsgSolid - SUBTYPE OF (IfcSolidModel); - TreeRootExpression : IfcCsgSelect; -END_ENTITY; - -ENTITY IfcCurrencyRelationship - SUBTYPE OF (IfcResourceLevelRelationship); - RelatingMonetaryUnit : IfcMonetaryUnit; - RelatedMonetaryUnit : IfcMonetaryUnit; - ExchangeRate : IfcPositiveRatioMeasure; - RateDateTime : OPTIONAL IfcDateTime; - RateSource : OPTIONAL IfcLibraryInformation; -END_ENTITY; - -ENTITY IfcCurtainWall - SUBTYPE OF (IfcBuildingElement); - PredefinedType : OPTIONAL IfcCurtainWallTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcCurtainWallTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcCurtainWallTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCCURTAINWALLTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcCurtainWallType - SUBTYPE OF (IfcBuildingElementType); - PredefinedType : IfcCurtainWallTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcCurtainWallTypeEnum.USERDEFINED) OR -((PredefinedType = IfcCurtainWallTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcCurve - ABSTRACT SUPERTYPE OF (ONEOF - (IfcBoundedCurve - ,IfcConic - ,IfcLine - ,IfcOffsetCurve2D - ,IfcOffsetCurve3D - ,IfcPcurve - ,IfcSurfaceCurve)) - SUBTYPE OF (IfcGeometricRepresentationItem); - DERIVE - Dim : IfcDimensionCount := IfcCurveDim(SELF); -END_ENTITY; - -ENTITY IfcCurveBoundedPlane - SUBTYPE OF (IfcBoundedSurface); - BasisSurface : IfcPlane; - OuterBoundary : IfcCurve; - InnerBoundaries : SET [0:?] OF IfcCurve; -END_ENTITY; - -ENTITY IfcCurveBoundedSurface - SUBTYPE OF (IfcBoundedSurface); - BasisSurface : IfcSurface; - Boundaries : SET [1:?] OF IfcBoundaryCurve; - ImplicitOuter : IfcBoolean; -END_ENTITY; - -ENTITY IfcCurveStyle - SUBTYPE OF (IfcPresentationStyle); - CurveFont : OPTIONAL IfcCurveFontOrScaledCurveFontSelect; - CurveWidth : OPTIONAL IfcSizeSelect; - CurveColour : OPTIONAL IfcColour; - ModelOrDraughting : OPTIONAL IfcBoolean; - WHERE - MeasureOfWidth : (NOT(EXISTS(CurveWidth))) OR -('IFC4.IFCPOSITIVELENGTHMEASURE' IN TYPEOF(CurveWidth)) OR - (('IFC4.IFCDESCRIPTIVEMEASURE' IN TYPEOF(CurveWidth)) AND - (CurveWidth = 'by layer')); - IdentifiableCurveStyle : EXISTS(CurveFont) OR EXISTS(CurveWidth) OR EXISTS(CurveColour); -END_ENTITY; - -ENTITY IfcCurveStyleFont - SUBTYPE OF (IfcPresentationItem); - Name : OPTIONAL IfcLabel; - PatternList : LIST [1:?] OF IfcCurveStyleFontPattern; -END_ENTITY; - -ENTITY IfcCurveStyleFontAndScaling - SUBTYPE OF (IfcPresentationItem); - Name : OPTIONAL IfcLabel; - CurveFont : IfcCurveStyleFontSelect; - CurveFontScaling : IfcPositiveRatioMeasure; -END_ENTITY; - -ENTITY IfcCurveStyleFontPattern - SUBTYPE OF (IfcPresentationItem); - VisibleSegmentLength : IfcLengthMeasure; - InvisibleSegmentLength : IfcPositiveLengthMeasure; - WHERE - VisibleLengthGreaterEqualZero : VisibleSegmentLength >= 0.; -END_ENTITY; - -ENTITY IfcCylindricalSurface - SUBTYPE OF (IfcElementarySurface); - Radius : IfcPositiveLengthMeasure; -END_ENTITY; - -ENTITY IfcDamper - SUBTYPE OF (IfcFlowController); - PredefinedType : OPTIONAL IfcDamperTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcDamperTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcDamperTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCDAMPERTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcDamperType - SUBTYPE OF (IfcFlowControllerType); - PredefinedType : IfcDamperTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcDamperTypeEnum.USERDEFINED) OR -((PredefinedType = IfcDamperTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcDerivedProfileDef - SUPERTYPE OF (ONEOF - (IfcMirroredProfileDef)) - SUBTYPE OF (IfcProfileDef); - ParentProfile : IfcProfileDef; - Operator : IfcCartesianTransformationOperator2D; - Label : OPTIONAL IfcLabel; - WHERE - InvariantProfileType : SELF\IfcProfileDef.ProfileType = ParentProfile.ProfileType; -END_ENTITY; - -ENTITY IfcDerivedUnit; - Elements : SET [1:?] OF IfcDerivedUnitElement; - UnitType : IfcDerivedUnitEnum; - UserDefinedType : OPTIONAL IfcLabel; - DERIVE - Dimensions : IfcDimensionalExponents := IfcDeriveDimensionalExponents(Elements); - WHERE - WR1 : (SIZEOF (Elements) > 1) OR ((SIZEOF (Elements) = 1) AND (Elements[1].Exponent <> 1 )); - WR2 : (UnitType <> IfcDerivedUnitEnum.USERDEFINED) OR -((UnitType = IfcDerivedUnitEnum.USERDEFINED) AND - (EXISTS(SELF.UserDefinedType))); -END_ENTITY; - -ENTITY IfcDerivedUnitElement; - Unit : IfcNamedUnit; - Exponent : INTEGER; -END_ENTITY; - -ENTITY IfcDimensionalExponents; - LengthExponent : INTEGER; - MassExponent : INTEGER; - TimeExponent : INTEGER; - ElectricCurrentExponent : INTEGER; - ThermodynamicTemperatureExponent : INTEGER; - AmountOfSubstanceExponent : INTEGER; - LuminousIntensityExponent : INTEGER; -END_ENTITY; - -ENTITY IfcDirection - SUBTYPE OF (IfcGeometricRepresentationItem); - DirectionRatios : LIST [2:3] OF IfcReal; - DERIVE - Dim : IfcDimensionCount := HIINDEX(DirectionRatios); - WHERE - MagnitudeGreaterZero : SIZEOF(QUERY(Tmp <* DirectionRatios | Tmp <> 0.0)) > 0; -END_ENTITY; - -ENTITY IfcDiscreteAccessory - SUBTYPE OF (IfcElementComponent); - PredefinedType : OPTIONAL IfcDiscreteAccessoryTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR -(PredefinedType <> IfcDiscreteAccessoryTypeEnum.USERDEFINED) OR -((PredefinedType = IfcDiscreteAccessoryTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR -('IFC4.IFCDISCRETEACCESSORYTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcDiscreteAccessoryType - SUBTYPE OF (IfcElementComponentType); - PredefinedType : IfcDiscreteAccessoryTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcDiscreteAccessoryTypeEnum.USERDEFINED) OR -((PredefinedType = IfcDiscreteAccessoryTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcDistributionChamberElement - SUBTYPE OF (IfcDistributionFlowElement); - PredefinedType : OPTIONAL IfcDistributionChamberElementTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcDistributionChamberElementTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcDistributionChamberElementTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR -('IFC4.IFCDISTRIBUTIONCHAMBERELEMENTTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcDistributionChamberElementType - SUBTYPE OF (IfcDistributionFlowElementType); - PredefinedType : IfcDistributionChamberElementTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcDistributionChamberElementTypeEnum.USERDEFINED) OR -((PredefinedType = IfcDistributionChamberElementTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcDistributionCircuit - SUBTYPE OF (IfcDistributionSystem); -END_ENTITY; - -ENTITY IfcDistributionControlElement - SUPERTYPE OF (ONEOF - (IfcActuator - ,IfcAlarm - ,IfcController - ,IfcFlowInstrument - ,IfcProtectiveDeviceTrippingUnit - ,IfcSensor - ,IfcUnitaryControlElement)) - SUBTYPE OF (IfcDistributionElement); - INVERSE - AssignedToFlowElement : SET [0:1] OF IfcRelFlowControlElements FOR RelatedControlElements; -END_ENTITY; - -ENTITY IfcDistributionControlElementType - ABSTRACT SUPERTYPE OF (ONEOF - (IfcActuatorType - ,IfcAlarmType - ,IfcControllerType - ,IfcFlowInstrumentType - ,IfcProtectiveDeviceTrippingUnitType - ,IfcSensorType - ,IfcUnitaryControlElementType)) - SUBTYPE OF (IfcDistributionElementType); -END_ENTITY; - -ENTITY IfcDistributionElement - SUPERTYPE OF (ONEOF - (IfcDistributionControlElement - ,IfcDistributionFlowElement)) - SUBTYPE OF (IfcElement); - INVERSE - HasPorts : SET [0:?] OF IfcRelConnectsPortToElement FOR RelatedElement; -END_ENTITY; - -ENTITY IfcDistributionElementType - SUPERTYPE OF (ONEOF - (IfcDistributionControlElementType - ,IfcDistributionFlowElementType)) - SUBTYPE OF (IfcElementType); -END_ENTITY; - -ENTITY IfcDistributionFlowElement - SUPERTYPE OF (ONEOF - (IfcDistributionChamberElement - ,IfcEnergyConversionDevice - ,IfcFlowController - ,IfcFlowFitting - ,IfcFlowMovingDevice - ,IfcFlowSegment - ,IfcFlowStorageDevice - ,IfcFlowTerminal - ,IfcFlowTreatmentDevice)) - SUBTYPE OF (IfcDistributionElement); - INVERSE - HasControlElements : SET [0:1] OF IfcRelFlowControlElements FOR RelatingFlowElement; -END_ENTITY; - -ENTITY IfcDistributionFlowElementType - ABSTRACT SUPERTYPE OF (ONEOF - (IfcDistributionChamberElementType - ,IfcEnergyConversionDeviceType - ,IfcFlowControllerType - ,IfcFlowFittingType - ,IfcFlowMovingDeviceType - ,IfcFlowSegmentType - ,IfcFlowStorageDeviceType - ,IfcFlowTerminalType - ,IfcFlowTreatmentDeviceType)) - SUBTYPE OF (IfcDistributionElementType); -END_ENTITY; - -ENTITY IfcDistributionPort - SUBTYPE OF (IfcPort); - FlowDirection : OPTIONAL IfcFlowDirectionEnum; - PredefinedType : OPTIONAL IfcDistributionPortTypeEnum; - SystemType : OPTIONAL IfcDistributionSystemEnum; -END_ENTITY; - -ENTITY IfcDistributionSystem - SUPERTYPE OF (ONEOF - (IfcDistributionCircuit)) - SUBTYPE OF (IfcSystem); - LongName : OPTIONAL IfcLabel; - PredefinedType : OPTIONAL IfcDistributionSystemEnum; -END_ENTITY; - -ENTITY IfcDocumentInformation - SUBTYPE OF (IfcExternalInformation); - Identification : IfcIdentifier; - Name : IfcLabel; - Description : OPTIONAL IfcText; - Location : OPTIONAL IfcURIReference; - Purpose : OPTIONAL IfcText; - IntendedUse : OPTIONAL IfcText; - Scope : OPTIONAL IfcText; - Revision : OPTIONAL IfcLabel; - DocumentOwner : OPTIONAL IfcActorSelect; - Editors : OPTIONAL SET [1:?] OF IfcActorSelect; - CreationTime : OPTIONAL IfcDateTime; - LastRevisionTime : OPTIONAL IfcDateTime; - ElectronicFormat : OPTIONAL IfcIdentifier; - ValidFrom : OPTIONAL IfcDate; - ValidUntil : OPTIONAL IfcDate; - Confidentiality : OPTIONAL IfcDocumentConfidentialityEnum; - Status : OPTIONAL IfcDocumentStatusEnum; - INVERSE - DocumentInfoForObjects : SET [0:?] OF IfcRelAssociatesDocument FOR RelatingDocument; - HasDocumentReferences : SET [0:?] OF IfcDocumentReference FOR ReferencedDocument; - IsPointedTo : SET [0:?] OF IfcDocumentInformationRelationship FOR RelatedDocuments; - IsPointer : SET [0:1] OF IfcDocumentInformationRelationship FOR RelatingDocument; -END_ENTITY; - -ENTITY IfcDocumentInformationRelationship - SUBTYPE OF (IfcResourceLevelRelationship); - RelatingDocument : IfcDocumentInformation; - RelatedDocuments : SET [1:?] OF IfcDocumentInformation; - RelationshipType : OPTIONAL IfcLabel; -END_ENTITY; - -ENTITY IfcDocumentReference - SUBTYPE OF (IfcExternalReference); - Description : OPTIONAL IfcText; - ReferencedDocument : OPTIONAL IfcDocumentInformation; - INVERSE - DocumentRefForObjects : SET [0:?] OF IfcRelAssociatesDocument FOR RelatingDocument; - WHERE - WR1 : EXISTS(Name) XOR EXISTS(ReferencedDocument); -END_ENTITY; - -ENTITY IfcDoor - SUPERTYPE OF (ONEOF - (IfcDoorStandardCase)) - SUBTYPE OF (IfcBuildingElement); - OverallHeight : OPTIONAL IfcPositiveLengthMeasure; - OverallWidth : OPTIONAL IfcPositiveLengthMeasure; - PredefinedType : OPTIONAL IfcDoorTypeEnum; - OperationType : OPTIONAL IfcDoorTypeOperationEnum; - UserDefinedOperationType : OPTIONAL IfcLabel; - WHERE - CorrectStyleAssigned : (SIZEOF(IsTypedBy) = 0) -OR ('IFC4.IFCDOORTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcDoorLiningProperties - SUBTYPE OF (IfcPreDefinedPropertySet); - LiningDepth : OPTIONAL IfcPositiveLengthMeasure; - LiningThickness : OPTIONAL IfcNonNegativeLengthMeasure; - ThresholdDepth : OPTIONAL IfcPositiveLengthMeasure; - ThresholdThickness : OPTIONAL IfcNonNegativeLengthMeasure; - TransomThickness : OPTIONAL IfcNonNegativeLengthMeasure; - TransomOffset : OPTIONAL IfcLengthMeasure; - LiningOffset : OPTIONAL IfcLengthMeasure; - ThresholdOffset : OPTIONAL IfcLengthMeasure; - CasingThickness : OPTIONAL IfcPositiveLengthMeasure; - CasingDepth : OPTIONAL IfcPositiveLengthMeasure; - ShapeAspectStyle : OPTIONAL IfcShapeAspect; - LiningToPanelOffsetX : OPTIONAL IfcLengthMeasure; - LiningToPanelOffsetY : OPTIONAL IfcLengthMeasure; - WHERE - WR31 : NOT(EXISTS(LiningDepth) AND NOT(EXISTS(LiningThickness))); - WR32 : NOT(EXISTS(ThresholdDepth) AND NOT(EXISTS(ThresholdThickness))); - WR33 : (EXISTS(TransomOffset) AND EXISTS(TransomThickness)) XOR -(NOT(EXISTS(TransomOffset)) AND NOT(EXISTS(TransomThickness))); - WR34 : (EXISTS(CasingDepth) AND EXISTS(CasingThickness)) XOR -(NOT(EXISTS(CasingDepth)) AND NOT(EXISTS(CasingThickness))); - WR35 : (EXISTS(SELF\IfcPropertySetDefinition.DefinesType[1])) -AND -( - ('IFC4.IFCDOORTYPE' IN TYPEOF(SELF\IfcPropertySetDefinition.DefinesType[1])) - OR - ('IFC4.IFCDOORSTYLE' IN TYPEOF(SELF\IfcPropertySetDefinition.DefinesType[1])) -); -END_ENTITY; - -ENTITY IfcDoorPanelProperties - SUBTYPE OF (IfcPreDefinedPropertySet); - PanelDepth : OPTIONAL IfcPositiveLengthMeasure; - PanelOperation : IfcDoorPanelOperationEnum; - PanelWidth : OPTIONAL IfcNormalisedRatioMeasure; - PanelPosition : IfcDoorPanelPositionEnum; - ShapeAspectStyle : OPTIONAL IfcShapeAspect; - WHERE - ApplicableToType : (EXISTS(SELF\IfcPropertySetDefinition.DefinesType[1])) -AND -( - ('IFC4.IFCDOORTYPE' IN TYPEOF(SELF\IfcPropertySetDefinition.DefinesType[1])) - OR - ('IFC4.IFCDOORSTYLE' IN TYPEOF(SELF\IfcPropertySetDefinition.DefinesType[1])) -); -END_ENTITY; - -ENTITY IfcDoorStandardCase - SUBTYPE OF (IfcDoor); -END_ENTITY; - -ENTITY IfcDoorStyle - SUBTYPE OF (IfcTypeProduct); - OperationType : IfcDoorStyleOperationEnum; - ConstructionType : IfcDoorStyleConstructionEnum; - ParameterTakesPrecedence : IfcBoolean; - Sizeable : IfcBoolean; -END_ENTITY; - -ENTITY IfcDoorType - SUBTYPE OF (IfcBuildingElementType); - PredefinedType : IfcDoorTypeEnum; - OperationType : IfcDoorTypeOperationEnum; - ParameterTakesPrecedence : OPTIONAL IfcBoolean; - UserDefinedOperationType : OPTIONAL IfcLabel; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcDoorTypeEnum.USERDEFINED) OR -((PredefinedType = IfcDoorTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcDraughtingPreDefinedColour - SUBTYPE OF (IfcPreDefinedColour); - WHERE - PreDefinedColourNames : SELF\IfcPreDefinedItem.Name IN ['black','red','green','blue','yellow', - 'magenta','cyan','white','by layer']; -END_ENTITY; - -ENTITY IfcDraughtingPreDefinedCurveFont - SUBTYPE OF (IfcPreDefinedCurveFont); - WHERE - PreDefinedCurveFontNames : SELF\IfcPredefinedItem.Name IN - ['continuous', - 'chain', - 'chain double dash', - 'dashed', - 'dotted', - 'by layer']; -END_ENTITY; - -ENTITY IfcDuctFitting - SUBTYPE OF (IfcFlowFitting); - PredefinedType : OPTIONAL IfcDuctFittingTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcDuctFittingTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcDuctFittingTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCDUCTFITTINGTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcDuctFittingType - SUBTYPE OF (IfcFlowFittingType); - PredefinedType : IfcDuctFittingTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcDuctFittingTypeEnum.USERDEFINED) OR -((PredefinedType = IfcDuctFittingTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcDuctSegment - SUBTYPE OF (IfcFlowSegment); - PredefinedType : OPTIONAL IfcDuctSegmentTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcDuctSegmentTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcDuctSegmentTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCDUCTSEGMENTTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcDuctSegmentType - SUBTYPE OF (IfcFlowSegmentType); - PredefinedType : IfcDuctSegmentTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcDuctSegmentTypeEnum.USERDEFINED) OR -((PredefinedType = IfcDuctSegmentTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcDuctSilencer - SUBTYPE OF (IfcFlowTreatmentDevice); - PredefinedType : OPTIONAL IfcDuctSilencerTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcDuctSilencerTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcDuctSilencerTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCDUCTSILENCERTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcDuctSilencerType - SUBTYPE OF (IfcFlowTreatmentDeviceType); - PredefinedType : IfcDuctSilencerTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcDuctSilencerTypeEnum.USERDEFINED) OR -((PredefinedType = IfcDuctSilencerTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcEdge - SUPERTYPE OF (ONEOF - (IfcEdgeCurve - ,IfcOrientedEdge - ,IfcSubedge)) - SUBTYPE OF (IfcTopologicalRepresentationItem); - EdgeStart : IfcVertex; - EdgeEnd : IfcVertex; -END_ENTITY; - -ENTITY IfcEdgeCurve - SUBTYPE OF (IfcEdge); - EdgeGeometry : IfcCurve; - SameSense : IfcBoolean; -END_ENTITY; - -ENTITY IfcEdgeLoop - SUBTYPE OF (IfcLoop); - EdgeList : LIST [1:?] OF IfcOrientedEdge; - DERIVE - Ne : IfcInteger := SIZEOF(EdgeList); - WHERE - IsClosed : (EdgeList[1].EdgeStart) :=: (EdgeList[Ne].EdgeEnd); - IsContinuous : IfcLoopHeadToTail(SELF); -END_ENTITY; - -ENTITY IfcElectricAppliance - SUBTYPE OF (IfcFlowTerminal); - PredefinedType : OPTIONAL IfcElectricApplianceTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcElectricApplianceTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcElectricApplianceTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCELECTRICAPPLIANCETYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcElectricApplianceType - SUBTYPE OF (IfcFlowTerminalType); - PredefinedType : IfcElectricApplianceTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcElectricApplianceTypeEnum.USERDEFINED) OR -((PredefinedType = IfcElectricApplianceTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcElectricDistributionBoard - SUBTYPE OF (IfcFlowController); - PredefinedType : OPTIONAL IfcElectricDistributionBoardTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcElectricDistributionBoardTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcElectricDistributionBoardTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCELECTRICDISTRIBUTIONBOARDTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcElectricDistributionBoardType - SUBTYPE OF (IfcFlowControllerType); - PredefinedType : IfcElectricDistributionBoardTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcElectricDistributionBoardTypeEnum.USERDEFINED) OR -((PredefinedType = IfcElectricDistributionBoardTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcElectricFlowStorageDevice - SUBTYPE OF (IfcFlowStorageDevice); - PredefinedType : OPTIONAL IfcElectricFlowStorageDeviceTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcElectricFlowStorageDeviceTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcElectricFlowStorageDeviceTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCELECTRICFLOWSTORAGEDEVICETYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcElectricFlowStorageDeviceType - SUBTYPE OF (IfcFlowStorageDeviceType); - PredefinedType : IfcElectricFlowStorageDeviceTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcElectricFlowStorageDeviceTypeEnum.USERDEFINED) OR -((PredefinedType = IfcElectricFlowStorageDeviceTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcElectricGenerator - SUBTYPE OF (IfcEnergyConversionDevice); - PredefinedType : OPTIONAL IfcElectricGeneratorTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcElectricGeneratorTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcElectricGeneratorTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCELECTRICGENERATORTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcElectricGeneratorType - SUBTYPE OF (IfcEnergyConversionDeviceType); - PredefinedType : IfcElectricGeneratorTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcElectricGeneratorTypeEnum.USERDEFINED) OR -((PredefinedType = IfcElectricGeneratorTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcElectricMotor - SUBTYPE OF (IfcEnergyConversionDevice); - PredefinedType : OPTIONAL IfcElectricMotorTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcElectricMotorTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcElectricMotorTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCELECTRICMOTORTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcElectricMotorType - SUBTYPE OF (IfcEnergyConversionDeviceType); - PredefinedType : IfcElectricMotorTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcElectricMotorTypeEnum.USERDEFINED) OR -((PredefinedType = IfcElectricMotorTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcElectricTimeControl - SUBTYPE OF (IfcFlowController); - PredefinedType : OPTIONAL IfcElectricTimeControlTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcElectricTimeControlTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcElectricTimeControlTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCELECTRICTIMECONTROLTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcElectricTimeControlType - SUBTYPE OF (IfcFlowControllerType); - PredefinedType : IfcElectricTimeControlTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcElectricTimeControlTypeEnum.USERDEFINED) OR -((PredefinedType = IfcElectricTimeControlTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcElement - ABSTRACT SUPERTYPE OF (ONEOF - (IfcBuildingElement - ,IfcCivilElement - ,IfcDistributionElement - ,IfcElementAssembly - ,IfcElementComponent - ,IfcFeatureElement - ,IfcFurnishingElement - ,IfcGeographicElement - ,IfcTransportElement - ,IfcVirtualElement)) - SUBTYPE OF (IfcProduct); - Tag : OPTIONAL IfcIdentifier; - INVERSE - FillsVoids : SET [0:1] OF IfcRelFillsElement FOR RelatedBuildingElement; - ConnectedTo : SET [0:?] OF IfcRelConnectsElements FOR RelatingElement; - IsInterferedByElements : SET [0:?] OF IfcRelInterferesElements FOR RelatedElement; - InterferesElements : SET [0:?] OF IfcRelInterferesElements FOR RelatingElement; - HasProjections : SET [0:?] OF IfcRelProjectsElement FOR RelatingElement; - ReferencedInStructures : SET [0:?] OF IfcRelReferencedInSpatialStructure FOR RelatedElements; - HasOpenings : SET [0:?] OF IfcRelVoidsElement FOR RelatingBuildingElement; - IsConnectionRealization : SET [0:?] OF IfcRelConnectsWithRealizingElements FOR RealizingElements; - ProvidesBoundaries : SET [0:?] OF IfcRelSpaceBoundary FOR RelatedBuildingElement; - ConnectedFrom : SET [0:?] OF IfcRelConnectsElements FOR RelatedElement; - ContainedInStructure : SET [0:1] OF IfcRelContainedInSpatialStructure FOR RelatedElements; - HasCoverings : SET [0:?] OF IfcRelCoversBldgElements FOR RelatingBuildingElement; -END_ENTITY; - -ENTITY IfcElementAssembly - SUBTYPE OF (IfcElement); - AssemblyPlace : OPTIONAL IfcAssemblyPlaceEnum; - PredefinedType : OPTIONAL IfcElementAssemblyTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcElementAssemblyTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcElementAssemblyTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCELEMENTASSEMBLYTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcElementAssemblyType - SUBTYPE OF (IfcElementType); - PredefinedType : IfcElementAssemblyTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcElementAssemblyTypeEnum.USERDEFINED) OR -((PredefinedType = IfcElementAssemblyTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcElementComponent - ABSTRACT SUPERTYPE OF (ONEOF - (IfcBuildingElementPart - ,IfcDiscreteAccessory - ,IfcFastener - ,IfcMechanicalFastener - ,IfcReinforcingElement - ,IfcVibrationIsolator)) - SUBTYPE OF (IfcElement); -END_ENTITY; - -ENTITY IfcElementComponentType - ABSTRACT SUPERTYPE OF (ONEOF - (IfcBuildingElementPartType - ,IfcDiscreteAccessoryType - ,IfcFastenerType - ,IfcMechanicalFastenerType - ,IfcReinforcingElementType - ,IfcVibrationIsolatorType)) - SUBTYPE OF (IfcElementType); -END_ENTITY; - -ENTITY IfcElementQuantity - SUBTYPE OF (IfcQuantitySet); - MethodOfMeasurement : OPTIONAL IfcLabel; - Quantities : SET [1:?] OF IfcPhysicalQuantity; - WHERE - UniqueQuantityNames : IfcUniqueQuantityNames(Quantities); -END_ENTITY; - -ENTITY IfcElementType - ABSTRACT SUPERTYPE OF (ONEOF - (IfcBuildingElementType - ,IfcCivilElementType - ,IfcDistributionElementType - ,IfcElementAssemblyType - ,IfcElementComponentType - ,IfcFurnishingElementType - ,IfcGeographicElementType - ,IfcTransportElementType)) - SUBTYPE OF (IfcTypeProduct); - ElementType : OPTIONAL IfcLabel; -END_ENTITY; - -ENTITY IfcElementarySurface - ABSTRACT SUPERTYPE OF (ONEOF - (IfcCylindricalSurface - ,IfcPlane - ,IfcSphericalSurface - ,IfcToroidalSurface)) - SUBTYPE OF (IfcSurface); - Position : IfcAxis2Placement3D; -END_ENTITY; - -ENTITY IfcEllipse - SUBTYPE OF (IfcConic); - SemiAxis1 : IfcPositiveLengthMeasure; - SemiAxis2 : IfcPositiveLengthMeasure; -END_ENTITY; - -ENTITY IfcEllipseProfileDef - SUBTYPE OF (IfcParameterizedProfileDef); - SemiAxis1 : IfcPositiveLengthMeasure; - SemiAxis2 : IfcPositiveLengthMeasure; -END_ENTITY; - -ENTITY IfcEnergyConversionDevice - SUPERTYPE OF (ONEOF - (IfcAirToAirHeatRecovery - ,IfcBoiler - ,IfcBurner - ,IfcChiller - ,IfcCoil - ,IfcCondenser - ,IfcCooledBeam - ,IfcCoolingTower - ,IfcElectricGenerator - ,IfcElectricMotor - ,IfcEngine - ,IfcEvaporativeCooler - ,IfcEvaporator - ,IfcHeatExchanger - ,IfcHumidifier - ,IfcMotorConnection - ,IfcSolarDevice - ,IfcTransformer - ,IfcTubeBundle - ,IfcUnitaryEquipment)) - SUBTYPE OF (IfcDistributionFlowElement); -END_ENTITY; - -ENTITY IfcEnergyConversionDeviceType - ABSTRACT SUPERTYPE OF (ONEOF - (IfcAirToAirHeatRecoveryType - ,IfcBoilerType - ,IfcBurnerType - ,IfcChillerType - ,IfcCoilType - ,IfcCondenserType - ,IfcCooledBeamType - ,IfcCoolingTowerType - ,IfcElectricGeneratorType - ,IfcElectricMotorType - ,IfcEngineType - ,IfcEvaporativeCoolerType - ,IfcEvaporatorType - ,IfcHeatExchangerType - ,IfcHumidifierType - ,IfcMotorConnectionType - ,IfcSolarDeviceType - ,IfcTransformerType - ,IfcTubeBundleType - ,IfcUnitaryEquipmentType)) - SUBTYPE OF (IfcDistributionFlowElementType); -END_ENTITY; - -ENTITY IfcEngine - SUBTYPE OF (IfcEnergyConversionDevice); - PredefinedType : OPTIONAL IfcEngineTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcEngineTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcEngineTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR -('IFC4.IFCENGINETYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcEngineType - SUBTYPE OF (IfcEnergyConversionDeviceType); - PredefinedType : IfcEngineTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcEngineTypeEnum.USERDEFINED) OR -((PredefinedType = IfcEngineTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcEvaporativeCooler - SUBTYPE OF (IfcEnergyConversionDevice); - PredefinedType : OPTIONAL IfcEvaporativeCoolerTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcEvaporativeCoolerTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcEvaporativeCoolerTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCEVAPORATIVECOOLERTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcEvaporativeCoolerType - SUBTYPE OF (IfcEnergyConversionDeviceType); - PredefinedType : IfcEvaporativeCoolerTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcEvaporativeCoolerTypeEnum.USERDEFINED) OR -((PredefinedType = IfcEvaporativeCoolerTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcEvaporator - SUBTYPE OF (IfcEnergyConversionDevice); - PredefinedType : OPTIONAL IfcEvaporatorTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcEvaporatorTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcEvaporatorTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCEVAPORATORTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcEvaporatorType - SUBTYPE OF (IfcEnergyConversionDeviceType); - PredefinedType : IfcEvaporatorTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcEvaporatorTypeEnum.USERDEFINED) OR -((PredefinedType = IfcEvaporatorTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcEvent - SUBTYPE OF (IfcProcess); - PredefinedType : OPTIONAL IfcEventTypeEnum; - EventTriggerType : OPTIONAL IfcEventTriggerTypeEnum; - UserDefinedEventTriggerType : OPTIONAL IfcLabel; - EventOccurenceTime : OPTIONAL IfcEventTime; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR (PredefinedType <> IfcEventTypeEnum.USERDEFINED) OR ((PredefinedType = IfcEventTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : NOT(EXISTS(EventTriggerType)) OR (EventTriggerType <> IfcEventTriggerTypeEnum.USERDEFINED) OR ((EventTriggerType = IfcEventTriggerTypeEnum.USERDEFINED) AND EXISTS(UserDefinedEventTriggerType)); -END_ENTITY; - -ENTITY IfcEventTime - SUBTYPE OF (IfcSchedulingTime); - ActualDate : OPTIONAL IfcDateTime; - EarlyDate : OPTIONAL IfcDateTime; - LateDate : OPTIONAL IfcDateTime; - ScheduleDate : OPTIONAL IfcDateTime; -END_ENTITY; - -ENTITY IfcEventType - SUBTYPE OF (IfcTypeProcess); - PredefinedType : IfcEventTypeEnum; - EventTriggerType : IfcEventTriggerTypeEnum; - UserDefinedEventTriggerType : OPTIONAL IfcLabel; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcEventTypeEnum.USERDEFINED) OR ((PredefinedType = IfcEventTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcTypeProcess.ProcessType)); - CorrectEventTriggerType : (EventTriggerType <> IfcEventTriggerTypeEnum.USERDEFINED) OR ((EventTriggerType = IfcEventTriggerTypeEnum.USERDEFINED) AND EXISTS(UserDefinedEventTriggerType)); -END_ENTITY; - -ENTITY IfcExtendedProperties - ABSTRACT SUPERTYPE OF (ONEOF - (IfcMaterialProperties - ,IfcProfileProperties)) - SUBTYPE OF (IfcPropertyAbstraction); - Name : OPTIONAL IfcIdentifier; - Description : OPTIONAL IfcText; - Properties : SET [1:?] OF IfcProperty; -END_ENTITY; - -ENTITY IfcExternalInformation - ABSTRACT SUPERTYPE OF (ONEOF - (IfcClassification - ,IfcDocumentInformation - ,IfcLibraryInformation)); -END_ENTITY; - -ENTITY IfcExternalReference - ABSTRACT SUPERTYPE OF (ONEOF - (IfcClassificationReference - ,IfcDocumentReference - ,IfcExternallyDefinedHatchStyle - ,IfcExternallyDefinedSurfaceStyle - ,IfcExternallyDefinedTextFont - ,IfcLibraryReference)); - Location : OPTIONAL IfcURIReference; - Identification : OPTIONAL IfcIdentifier; - Name : OPTIONAL IfcLabel; - INVERSE - ExternalReferenceForResources : SET [0:?] OF IfcExternalReferenceRelationship FOR RelatingReference; - WHERE - WR1 : EXISTS(Identification) OR EXISTS(Location) OR EXISTS(Name); -END_ENTITY; - -ENTITY IfcExternalReferenceRelationship - SUBTYPE OF (IfcResourceLevelRelationship); - RelatingReference : IfcExternalReference; - RelatedResourceObjects : SET [1:?] OF IfcResourceObjectSelect; -END_ENTITY; - -ENTITY IfcExternalSpatialElement - SUBTYPE OF (IfcExternalSpatialStructureElement); - PredefinedType : OPTIONAL IfcExternalSpatialElementTypeEnum; - INVERSE - BoundedBy : SET [0:?] OF IfcRelSpaceBoundary FOR RelatingSpace; -END_ENTITY; - -ENTITY IfcExternalSpatialStructureElement - ABSTRACT SUPERTYPE OF (ONEOF - (IfcExternalSpatialElement)) - SUBTYPE OF (IfcSpatialElement); -END_ENTITY; - -ENTITY IfcExternallyDefinedHatchStyle - SUBTYPE OF (IfcExternalReference); -END_ENTITY; - -ENTITY IfcExternallyDefinedSurfaceStyle - SUBTYPE OF (IfcExternalReference); -END_ENTITY; - -ENTITY IfcExternallyDefinedTextFont - SUBTYPE OF (IfcExternalReference); -END_ENTITY; - -ENTITY IfcExtrudedAreaSolid - SUPERTYPE OF (ONEOF - (IfcExtrudedAreaSolidTapered)) - SUBTYPE OF (IfcSweptAreaSolid); - ExtrudedDirection : IfcDirection; - Depth : IfcPositiveLengthMeasure; - WHERE - ValidExtrusionDirection : IfcDotProduct(IfcRepresentationItem() || IfcGeometricRepresentationItem() || IfcDirection([0.0,0.0,1.0]), SELF.ExtrudedDirection) <> 0.0; -END_ENTITY; - -ENTITY IfcExtrudedAreaSolidTapered - SUBTYPE OF (IfcExtrudedAreaSolid); - EndSweptArea : IfcProfileDef; - WHERE - CorrectProfileAssignment : IfcTaperedSweptAreaProfiles(SELF\IfcSweptAreaSolid.SweptArea, SELF.EndSweptArea); -END_ENTITY; - -ENTITY IfcFace - SUPERTYPE OF (ONEOF - (IfcFaceSurface)) - SUBTYPE OF (IfcTopologicalRepresentationItem); - Bounds : SET [1:?] OF IfcFaceBound; - INVERSE - HasTextureMaps : SET [0:?] OF IfcTextureMap FOR MappedTo; - WHERE - HasOuterBound : SIZEOF(QUERY(temp <* Bounds | 'IFC4.IFCFACEOUTERBOUND' IN TYPEOF(temp))) <= 1; -END_ENTITY; - -ENTITY IfcFaceBasedSurfaceModel - SUBTYPE OF (IfcGeometricRepresentationItem); - FbsmFaces : SET [1:?] OF IfcConnectedFaceSet; - DERIVE - Dim : IfcDimensionCount := 3; -END_ENTITY; - -ENTITY IfcFaceBound - SUPERTYPE OF (ONEOF - (IfcFaceOuterBound)) - SUBTYPE OF (IfcTopologicalRepresentationItem); - Bound : IfcLoop; - Orientation : IfcBoolean; -END_ENTITY; - -ENTITY IfcFaceOuterBound - SUBTYPE OF (IfcFaceBound); -END_ENTITY; - -ENTITY IfcFaceSurface - SUPERTYPE OF (ONEOF - (IfcAdvancedFace)) - SUBTYPE OF (IfcFace); - FaceSurface : IfcSurface; - SameSense : IfcBoolean; -END_ENTITY; - -ENTITY IfcFacetedBrep - SUPERTYPE OF (ONEOF - (IfcFacetedBrepWithVoids)) - SUBTYPE OF (IfcManifoldSolidBrep); -END_ENTITY; - -ENTITY IfcFacetedBrepWithVoids - SUBTYPE OF (IfcFacetedBrep); - Voids : SET [1:?] OF IfcClosedShell; -END_ENTITY; - -ENTITY IfcFailureConnectionCondition - SUBTYPE OF (IfcStructuralConnectionCondition); - TensionFailureX : OPTIONAL IfcForceMeasure; - TensionFailureY : OPTIONAL IfcForceMeasure; - TensionFailureZ : OPTIONAL IfcForceMeasure; - CompressionFailureX : OPTIONAL IfcForceMeasure; - CompressionFailureY : OPTIONAL IfcForceMeasure; - CompressionFailureZ : OPTIONAL IfcForceMeasure; -END_ENTITY; - -ENTITY IfcFan - SUBTYPE OF (IfcFlowMovingDevice); - PredefinedType : OPTIONAL IfcFanTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcFanTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcFanTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCFANTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcFanType - SUBTYPE OF (IfcFlowMovingDeviceType); - PredefinedType : IfcFanTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcFanTypeEnum.USERDEFINED) OR -((PredefinedType = IfcFanTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcFastener - SUBTYPE OF (IfcElementComponent); - PredefinedType : OPTIONAL IfcFastenerTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR -(PredefinedType <> IfcFastenerTypeEnum.USERDEFINED) OR -((PredefinedType = IfcFastenerTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR -('IFC4.IFCFASTENERTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcFastenerType - SUBTYPE OF (IfcElementComponentType); - PredefinedType : IfcFastenerTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcFastenerTypeEnum.USERDEFINED) OR -((PredefinedType = IfcFastenerTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcFeatureElement - ABSTRACT SUPERTYPE OF (ONEOF - (IfcFeatureElementAddition - ,IfcFeatureElementSubtraction - ,IfcSurfaceFeature)) - SUBTYPE OF (IfcElement); -END_ENTITY; - -ENTITY IfcFeatureElementAddition - ABSTRACT SUPERTYPE OF (ONEOF - (IfcProjectionElement)) - SUBTYPE OF (IfcFeatureElement); - INVERSE - ProjectsElements : IfcRelProjectsElement FOR RelatedFeatureElement; -END_ENTITY; - -ENTITY IfcFeatureElementSubtraction - ABSTRACT SUPERTYPE OF (ONEOF - (IfcOpeningElement - ,IfcVoidingFeature)) - SUBTYPE OF (IfcFeatureElement); - INVERSE - VoidsElements : IfcRelVoidsElement FOR RelatedOpeningElement; - WHERE - HasNoSubtraction : SIZEOF(SELF\IfcElement.HasOpenings) = 0; - IsNotFilling : SIZEOF(SELF\IfcElement.FillsVoids) = 0; -END_ENTITY; - -ENTITY IfcFillAreaStyle - SUBTYPE OF (IfcPresentationStyle); - FillStyles : SET [1:?] OF IfcFillStyleSelect; - ModelorDraughting : OPTIONAL IfcBoolean; - WHERE - MaxOneColour : SIZEOF(QUERY(Style <* SELF.FillStyles | - 'IFC4.IFCCOLOUR' IN - TYPEOF(Style) - )) <= 1; - MaxOneExtHatchStyle : SIZEOF(QUERY(Style <* SELF.FillStyles | - 'IFC4.IFCEXTERNALLYDEFINEDHATCHSTYLE' IN - TYPEOF(Style) - )) <= 1; - ConsistentHatchStyleDef : IfcCorrectFillAreaStyle(SELF.FillStyles); -END_ENTITY; - -ENTITY IfcFillAreaStyleHatching - SUBTYPE OF (IfcGeometricRepresentationItem); - HatchLineAppearance : IfcCurveStyle; - StartOfNextHatchLine : IfcHatchLineDistanceSelect; - PointOfReferenceHatchLine : OPTIONAL IfcCartesianPoint; - PatternStart : OPTIONAL IfcCartesianPoint; - HatchLineAngle : IfcPlaneAngleMeasure; - WHERE - PatternStart2D : NOT(EXISTS(PatternStart)) OR (PatternStart.Dim = 2); - RefHatchLine2D : NOT(EXISTS(PointOfReferenceHatchLine)) OR (PointOfReferenceHatchLine.Dim = 2); -END_ENTITY; - -ENTITY IfcFillAreaStyleTiles - SUBTYPE OF (IfcGeometricRepresentationItem); - TilingPattern : LIST [2:2] OF IfcVector; - Tiles : SET [1:?] OF IfcStyledItem; - TilingScale : IfcPositiveRatioMeasure; -END_ENTITY; - -ENTITY IfcFilter - SUBTYPE OF (IfcFlowTreatmentDevice); - PredefinedType : OPTIONAL IfcFilterTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcFilterTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcFilterTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCFILTERTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcFilterType - SUBTYPE OF (IfcFlowTreatmentDeviceType); - PredefinedType : IfcFilterTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcFilterTypeEnum.USERDEFINED) OR -((PredefinedType = IfcFilterTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcFireSuppressionTerminal - SUBTYPE OF (IfcFlowTerminal); - PredefinedType : OPTIONAL IfcFireSuppressionTerminalTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcFireSuppressionTerminalTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcFireSuppressionTerminalTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCFIRESUPPRESSIONTERMINALTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcFireSuppressionTerminalType - SUBTYPE OF (IfcFlowTerminalType); - PredefinedType : IfcFireSuppressionTerminalTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcFireSuppressionTerminalTypeEnum.USERDEFINED) OR -((PredefinedType = IfcFireSuppressionTerminalTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcFixedReferenceSweptAreaSolid - SUBTYPE OF (IfcSweptAreaSolid); - Directrix : IfcCurve; - StartParam : OPTIONAL IfcParameterValue; - EndParam : OPTIONAL IfcParameterValue; - FixedReference : IfcDirection; - WHERE - DirectrixBounded : (EXISTS(StartParam) AND EXISTS(EndParam)) OR -(SIZEOF(['IFC4.IFCCONIC', 'IFC4.IFCBOUNDEDCURVE'] * TYPEOF(Directrix)) = 1); -END_ENTITY; - -ENTITY IfcFlowController - SUPERTYPE OF (ONEOF - (IfcAirTerminalBox - ,IfcDamper - ,IfcElectricDistributionBoard - ,IfcElectricTimeControl - ,IfcFlowMeter - ,IfcProtectiveDevice - ,IfcSwitchingDevice - ,IfcValve)) - SUBTYPE OF (IfcDistributionFlowElement); -END_ENTITY; - -ENTITY IfcFlowControllerType - ABSTRACT SUPERTYPE OF (ONEOF - (IfcAirTerminalBoxType - ,IfcDamperType - ,IfcElectricDistributionBoardType - ,IfcElectricTimeControlType - ,IfcFlowMeterType - ,IfcProtectiveDeviceType - ,IfcSwitchingDeviceType - ,IfcValveType)) - SUBTYPE OF (IfcDistributionFlowElementType); -END_ENTITY; - -ENTITY IfcFlowFitting - SUPERTYPE OF (ONEOF - (IfcCableCarrierFitting - ,IfcCableFitting - ,IfcDuctFitting - ,IfcJunctionBox - ,IfcPipeFitting)) - SUBTYPE OF (IfcDistributionFlowElement); -END_ENTITY; - -ENTITY IfcFlowFittingType - ABSTRACT SUPERTYPE OF (ONEOF - (IfcCableCarrierFittingType - ,IfcCableFittingType - ,IfcDuctFittingType - ,IfcJunctionBoxType - ,IfcPipeFittingType)) - SUBTYPE OF (IfcDistributionFlowElementType); -END_ENTITY; - -ENTITY IfcFlowInstrument - SUBTYPE OF (IfcDistributionControlElement); - PredefinedType : OPTIONAL IfcFlowInstrumentTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcFlowInstrumentTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcFlowInstrumentTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR -('IFC4.IFCFLOWINSTRUMENTTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcFlowInstrumentType - SUBTYPE OF (IfcDistributionControlElementType); - PredefinedType : IfcFlowInstrumentTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcFlowInstrumentTypeEnum.USERDEFINED) OR -((PredefinedType = IfcFlowInstrumentTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcFlowMeter - SUBTYPE OF (IfcFlowController); - PredefinedType : OPTIONAL IfcFlowMeterTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcFlowMeterTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcFlowMeterTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCFLOWMETERTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcFlowMeterType - SUBTYPE OF (IfcFlowControllerType); - PredefinedType : IfcFlowMeterTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcFlowMeterTypeEnum.USERDEFINED) OR -((PredefinedType = IfcFlowMeterTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcFlowMovingDevice - SUPERTYPE OF (ONEOF - (IfcCompressor - ,IfcFan - ,IfcPump)) - SUBTYPE OF (IfcDistributionFlowElement); -END_ENTITY; - -ENTITY IfcFlowMovingDeviceType - ABSTRACT SUPERTYPE OF (ONEOF - (IfcCompressorType - ,IfcFanType - ,IfcPumpType)) - SUBTYPE OF (IfcDistributionFlowElementType); -END_ENTITY; - -ENTITY IfcFlowSegment - SUPERTYPE OF (ONEOF - (IfcCableCarrierSegment - ,IfcCableSegment - ,IfcDuctSegment - ,IfcPipeSegment)) - SUBTYPE OF (IfcDistributionFlowElement); -END_ENTITY; - -ENTITY IfcFlowSegmentType - ABSTRACT SUPERTYPE OF (ONEOF - (IfcCableCarrierSegmentType - ,IfcCableSegmentType - ,IfcDuctSegmentType - ,IfcPipeSegmentType)) - SUBTYPE OF (IfcDistributionFlowElementType); -END_ENTITY; - -ENTITY IfcFlowStorageDevice - SUPERTYPE OF (ONEOF - (IfcElectricFlowStorageDevice - ,IfcTank)) - SUBTYPE OF (IfcDistributionFlowElement); -END_ENTITY; - -ENTITY IfcFlowStorageDeviceType - ABSTRACT SUPERTYPE OF (ONEOF - (IfcElectricFlowStorageDeviceType - ,IfcTankType)) - SUBTYPE OF (IfcDistributionFlowElementType); -END_ENTITY; - -ENTITY IfcFlowTerminal - SUPERTYPE OF (ONEOF - (IfcAirTerminal - ,IfcAudioVisualAppliance - ,IfcCommunicationsAppliance - ,IfcElectricAppliance - ,IfcFireSuppressionTerminal - ,IfcLamp - ,IfcLightFixture - ,IfcMedicalDevice - ,IfcOutlet - ,IfcSanitaryTerminal - ,IfcSpaceHeater - ,IfcStackTerminal - ,IfcWasteTerminal)) - SUBTYPE OF (IfcDistributionFlowElement); -END_ENTITY; - -ENTITY IfcFlowTerminalType - ABSTRACT SUPERTYPE OF (ONEOF - (IfcAirTerminalType - ,IfcAudioVisualApplianceType - ,IfcCommunicationsApplianceType - ,IfcElectricApplianceType - ,IfcFireSuppressionTerminalType - ,IfcLampType - ,IfcLightFixtureType - ,IfcMedicalDeviceType - ,IfcOutletType - ,IfcSanitaryTerminalType - ,IfcSpaceHeaterType - ,IfcStackTerminalType - ,IfcWasteTerminalType)) - SUBTYPE OF (IfcDistributionFlowElementType); -END_ENTITY; - -ENTITY IfcFlowTreatmentDevice - SUPERTYPE OF (ONEOF - (IfcDuctSilencer - ,IfcFilter - ,IfcInterceptor)) - SUBTYPE OF (IfcDistributionFlowElement); -END_ENTITY; - -ENTITY IfcFlowTreatmentDeviceType - ABSTRACT SUPERTYPE OF (ONEOF - (IfcDuctSilencerType - ,IfcFilterType - ,IfcInterceptorType)) - SUBTYPE OF (IfcDistributionFlowElementType); -END_ENTITY; - -ENTITY IfcFooting - SUBTYPE OF (IfcBuildingElement); - PredefinedType : OPTIONAL IfcFootingTypeEnum; - WHERE - CorrectPredefinedType : NOT EXISTS(PredefinedType) OR -(PredefinedType <> IfcFootingTypeEnum.USERDEFINED) OR -((PredefinedType = IfcFootingTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR -('IFC4.IFCFOOTINGTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcFootingType - SUBTYPE OF (IfcBuildingElementType); - PredefinedType : IfcFootingTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcFootingTypeEnum.USERDEFINED) OR -((PredefinedType = IfcFootingTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcFurnishingElement - SUPERTYPE OF (ONEOF - (IfcFurniture - ,IfcSystemFurnitureElement)) - SUBTYPE OF (IfcElement); -END_ENTITY; - -ENTITY IfcFurnishingElementType - SUPERTYPE OF (ONEOF - (IfcFurnitureType - ,IfcSystemFurnitureElementType)) - SUBTYPE OF (IfcElementType); -END_ENTITY; - -ENTITY IfcFurniture - SUBTYPE OF (IfcFurnishingElement); - PredefinedType : OPTIONAL IfcFurnitureTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcFurnitureTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcFurnitureTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCFURNITURETYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcFurnitureType - SUBTYPE OF (IfcFurnishingElementType); - AssemblyPlace : IfcAssemblyPlaceEnum; - PredefinedType : OPTIONAL IfcFurnitureTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcFurnitureTypeEnum.USERDEFINED) OR -((PredefinedType = IfcFurnitureTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcGeographicElement - SUBTYPE OF (IfcElement); - PredefinedType : OPTIONAL IfcGeographicElementTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcGeographicElementTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcGeographicElementTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCGEOGRAPHICELEMENTTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcGeographicElementType - SUBTYPE OF (IfcElementType); - PredefinedType : IfcGeographicElementTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcGeographicElementTypeEnum.USERDEFINED) OR -((PredefinedType = IfcGeographicElementTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcGeometricCurveSet - SUBTYPE OF (IfcGeometricSet); - WHERE - NoSurfaces : SIZEOF(QUERY(Temp <* SELF\IfcGeometricSet.Elements | -'IFC4.IFCSURFACE' IN TYPEOF(Temp))) = 0; -END_ENTITY; - -ENTITY IfcGeometricRepresentationContext - SUPERTYPE OF (ONEOF - (IfcGeometricRepresentationSubContext)) - SUBTYPE OF (IfcRepresentationContext); - CoordinateSpaceDimension : IfcDimensionCount; - Precision : OPTIONAL IfcReal; - WorldCoordinateSystem : IfcAxis2Placement; - TrueNorth : OPTIONAL IfcDirection; - INVERSE - HasSubContexts : SET [0:?] OF IfcGeometricRepresentationSubContext FOR ParentContext; - HasCoordinateOperation : SET [0:1] OF IfcCoordinateOperation FOR SourceCRS; - WHERE - North2D : NOT(EXISTS(TrueNorth)) OR (HIINDEX(TrueNorth.DirectionRatios) = 2); -END_ENTITY; - -ENTITY IfcGeometricRepresentationItem - ABSTRACT SUPERTYPE OF (ONEOF - (IfcAnnotationFillArea - ,IfcBooleanResult - ,IfcBoundingBox - ,IfcCartesianPointList - ,IfcCartesianTransformationOperator - ,IfcCompositeCurveSegment - ,IfcCsgPrimitive3D - ,IfcCurve - ,IfcDirection - ,IfcFaceBasedSurfaceModel - ,IfcFillAreaStyleHatching - ,IfcFillAreaStyleTiles - ,IfcGeometricSet - ,IfcHalfSpaceSolid - ,IfcLightSource - ,IfcPlacement - ,IfcPlanarExtent - ,IfcPoint - ,IfcSectionedSpine - ,IfcShellBasedSurfaceModel - ,IfcSolidModel - ,IfcSurface - ,IfcTessellatedItem - ,IfcTextLiteral - ,IfcVector)) - SUBTYPE OF (IfcRepresentationItem); -END_ENTITY; - -ENTITY IfcGeometricRepresentationSubContext - SUBTYPE OF (IfcGeometricRepresentationContext); - ParentContext : IfcGeometricRepresentationContext; - TargetScale : OPTIONAL IfcPositiveRatioMeasure; - TargetView : IfcGeometricProjectionEnum; - UserDefinedTargetView : OPTIONAL IfcLabel; - DERIVE - SELF\IfcGeometricRepresentationContext.WorldCoordinateSystem : IfcAxis2Placement := ParentContext.WorldCoordinateSystem; - SELF\IfcGeometricRepresentationContext.CoordinateSpaceDimension : IfcDimensionCount := ParentContext.CoordinateSpaceDimension; - SELF\IfcGeometricRepresentationContext.TrueNorth : IfcDirection := NVL(ParentContext.TrueNorth, IfcConvertDirectionInto2D(SELF\IfcGeometricRepresentationContext.WorldCoordinateSystem.P[2])); - SELF\IfcGeometricRepresentationContext.Precision : IfcReal := NVL(ParentContext.Precision,1.E-5); - WHERE - ParentNoSub : NOT('IFC4.IFCGEOMETRICREPRESENTATIONSUBCONTEXT' IN TYPEOF(ParentContext)); - UserTargetProvided : (TargetView <> IfcGeometricProjectionEnum.USERDEFINED) OR -((TargetView = IfcGeometricProjectionEnum.USERDEFINED) AND EXISTS(UserDefinedTargetView)); - NoCoordOperation : SIZEOF(SELF\IfcGeometricRepresentationContext.HasCoordinateOperation) = 0; -END_ENTITY; - -ENTITY IfcGeometricSet - SUPERTYPE OF (ONEOF - (IfcGeometricCurveSet)) - SUBTYPE OF (IfcGeometricRepresentationItem); - Elements : SET [1:?] OF IfcGeometricSetSelect; - DERIVE - Dim : IfcDimensionCount := Elements[1].Dim; - WHERE - ConsistentDim : SIZEOF(QUERY(Temp <* Elements | - Temp.Dim <> Elements[1].Dim)) -= 0; -END_ENTITY; - -ENTITY IfcGrid - SUBTYPE OF (IfcProduct); - UAxes : LIST [1:?] OF UNIQUE IfcGridAxis; - VAxes : LIST [1:?] OF UNIQUE IfcGridAxis; - WAxes : OPTIONAL LIST [1:?] OF UNIQUE IfcGridAxis; - PredefinedType : OPTIONAL IfcGridTypeEnum; - INVERSE - ContainedInStructure : SET [0:1] OF IfcRelContainedInSpatialStructure FOR RelatedElements; - WHERE - HasPlacement : EXISTS(SELF\IfcProduct.ObjectPlacement); -END_ENTITY; - -ENTITY IfcGridAxis; - AxisTag : OPTIONAL IfcLabel; - AxisCurve : IfcCurve; - SameSense : IfcBoolean; - INVERSE - PartOfW : SET [0:1] OF IfcGrid FOR WAxes; - PartOfV : SET [0:1] OF IfcGrid FOR VAxes; - PartOfU : SET [0:1] OF IfcGrid FOR UAxes; - HasIntersections : SET [0:?] OF IfcVirtualGridIntersection FOR IntersectingAxes; - WHERE - WR1 : AxisCurve.Dim = 2; - WR2 : (SIZEOF(PartOfU) = 1) XOR (SIZEOF(PartOfV) = 1) XOR (SIZEOF(PartOfW) = 1); -END_ENTITY; - -ENTITY IfcGridPlacement - SUBTYPE OF (IfcObjectPlacement); - PlacementLocation : IfcVirtualGridIntersection; - PlacementRefDirection : OPTIONAL IfcGridPlacementDirectionSelect; -END_ENTITY; - -ENTITY IfcGroup - SUPERTYPE OF (ONEOF - (IfcAsset - ,IfcInventory - ,IfcStructuralLoadGroup - ,IfcStructuralResultGroup - ,IfcSystem)) - SUBTYPE OF (IfcObject); - INVERSE - IsGroupedBy : SET [0:?] OF IfcRelAssignsToGroup FOR RelatingGroup; -END_ENTITY; - -ENTITY IfcHalfSpaceSolid - SUPERTYPE OF (ONEOF - (IfcBoxedHalfSpace - ,IfcPolygonalBoundedHalfSpace)) - SUBTYPE OF (IfcGeometricRepresentationItem); - BaseSurface : IfcSurface; - AgreementFlag : IfcBoolean; - DERIVE - Dim : IfcDimensionCount := 3; -END_ENTITY; - -ENTITY IfcHeatExchanger - SUBTYPE OF (IfcEnergyConversionDevice); - PredefinedType : OPTIONAL IfcHeatExchangerTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcHeatExchangerTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcHeatExchangerTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCHEATEXCHANGERTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcHeatExchangerType - SUBTYPE OF (IfcEnergyConversionDeviceType); - PredefinedType : IfcHeatExchangerTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcHeatExchangerTypeEnum.USERDEFINED) OR -((PredefinedType = IfcHeatExchangerTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcHumidifier - SUBTYPE OF (IfcEnergyConversionDevice); - PredefinedType : OPTIONAL IfcHumidifierTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcHumidifierTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcHumidifierTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCHUMIDIFIERTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcHumidifierType - SUBTYPE OF (IfcEnergyConversionDeviceType); - PredefinedType : IfcHumidifierTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcHumidifierTypeEnum.USERDEFINED) OR -((PredefinedType = IfcHumidifierTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcIShapeProfileDef - SUBTYPE OF (IfcParameterizedProfileDef); - OverallWidth : IfcPositiveLengthMeasure; - OverallDepth : IfcPositiveLengthMeasure; - WebThickness : IfcPositiveLengthMeasure; - FlangeThickness : IfcPositiveLengthMeasure; - FilletRadius : OPTIONAL IfcNonNegativeLengthMeasure; - FlangeEdgeRadius : OPTIONAL IfcNonNegativeLengthMeasure; - FlangeSlope : OPTIONAL IfcPlaneAngleMeasure; - WHERE - ValidFlangeThickness : (2. * FlangeThickness) < OverallDepth; - ValidWebThickness : WebThickness < OverallWidth; - ValidFilletRadius : NOT(EXISTS(FilletRadius)) OR -((FilletRadius <= (OverallWidth - WebThickness)/2.) AND - (FilletRadius <= (OverallDepth - (2. * FlangeThickness))/2.)); -END_ENTITY; - -ENTITY IfcImageTexture - SUBTYPE OF (IfcSurfaceTexture); - URLReference : IfcURIReference; -END_ENTITY; - -ENTITY IfcIndexedColourMap - SUBTYPE OF (IfcPresentationItem); - MappedTo : IfcTessellatedFaceSet; - Opacity : OPTIONAL IfcNormalisedRatioMeasure; - Colours : IfcColourRgbList; - ColourIndex : LIST [1:?] OF IfcPositiveInteger; -END_ENTITY; - -ENTITY IfcIndexedPolyCurve - SUBTYPE OF (IfcBoundedCurve); - Points : IfcCartesianPointList; - Segments : OPTIONAL LIST [1:?] OF IfcSegmentIndexSelect; - SelfIntersect : OPTIONAL IfcBoolean; - WHERE - Consecutive : (SIZEOF(Segments) = 0) OR IfcConsecutiveSegments(Segments); -END_ENTITY; - -ENTITY IfcIndexedPolygonalFace - SUPERTYPE OF (ONEOF - (IfcIndexedPolygonalFaceWithVoids)) - SUBTYPE OF (IfcTessellatedItem); - CoordIndex : LIST [3:?] OF IfcPositiveInteger; - INVERSE - ToFaceSet : SET [1:?] OF IfcPolygonalFaceSet FOR Faces; -END_ENTITY; - -ENTITY IfcIndexedPolygonalFaceWithVoids - SUBTYPE OF (IfcIndexedPolygonalFace); - InnerCoordIndices : LIST [1:?] OF LIST [3:?] OF UNIQUE IfcPositiveInteger; -END_ENTITY; - -ENTITY IfcIndexedTextureMap - ABSTRACT SUPERTYPE OF (ONEOF - (IfcIndexedTriangleTextureMap)) - SUBTYPE OF (IfcTextureCoordinate); - MappedTo : IfcTessellatedFaceSet; - TexCoords : IfcTextureVertexList; -END_ENTITY; - -ENTITY IfcIndexedTriangleTextureMap - SUBTYPE OF (IfcIndexedTextureMap); - TexCoordIndex : OPTIONAL LIST [1:?] OF LIST [3:3] OF IfcPositiveInteger; -END_ENTITY; - -ENTITY IfcInterceptor - SUBTYPE OF (IfcFlowTreatmentDevice); - PredefinedType : OPTIONAL IfcInterceptorTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcInterceptorTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcInterceptorTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCINTERCEPTORTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcInterceptorType - SUBTYPE OF (IfcFlowTreatmentDeviceType); - PredefinedType : IfcInterceptorTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcInterceptorTypeEnum.USERDEFINED) OR -((PredefinedType = IfcInterceptorTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcIntersectionCurve - SUBTYPE OF (IfcSurfaceCurve); - WHERE - TwoPCurves : SIZEOF(SELF\IfcSurfaceCurve.AssociatedGeometry) = 2; - DistinctSurfaces : IfcAssociatedSurface(SELF\IfcSurfaceCurve.AssociatedGeometry[1]) <> IfcAssociatedSurface(SELF\IfcSurfaceCurve.AssociatedGeometry[2]); -END_ENTITY; - -ENTITY IfcInventory - SUBTYPE OF (IfcGroup); - PredefinedType : OPTIONAL IfcInventoryTypeEnum; - Jurisdiction : OPTIONAL IfcActorSelect; - ResponsiblePersons : OPTIONAL SET [1:?] OF IfcPerson; - LastUpdateDate : OPTIONAL IfcDate; - CurrentValue : OPTIONAL IfcCostValue; - OriginalValue : OPTIONAL IfcCostValue; -END_ENTITY; - -ENTITY IfcIrregularTimeSeries - SUBTYPE OF (IfcTimeSeries); - Values : LIST [1:?] OF IfcIrregularTimeSeriesValue; -END_ENTITY; - -ENTITY IfcIrregularTimeSeriesValue; - TimeStamp : IfcDateTime; - ListValues : LIST [1:?] OF IfcValue; -END_ENTITY; - -ENTITY IfcJunctionBox - SUBTYPE OF (IfcFlowFitting); - PredefinedType : OPTIONAL IfcJunctionBoxTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcJunctionBoxTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcJunctionBoxTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCJUNCTIONBOXTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcJunctionBoxType - SUBTYPE OF (IfcFlowFittingType); - PredefinedType : IfcJunctionBoxTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcJunctionBoxTypeEnum.USERDEFINED) OR -((PredefinedType = IfcJunctionBoxTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcLShapeProfileDef - SUBTYPE OF (IfcParameterizedProfileDef); - Depth : IfcPositiveLengthMeasure; - Width : OPTIONAL IfcPositiveLengthMeasure; - Thickness : IfcPositiveLengthMeasure; - FilletRadius : OPTIONAL IfcNonNegativeLengthMeasure; - EdgeRadius : OPTIONAL IfcNonNegativeLengthMeasure; - LegSlope : OPTIONAL IfcPlaneAngleMeasure; - WHERE - ValidThickness : (Thickness < Depth) AND (NOT(EXISTS(Width)) OR (Thickness < Width)); -END_ENTITY; - -ENTITY IfcLaborResource - SUBTYPE OF (IfcConstructionResource); - PredefinedType : OPTIONAL IfcLaborResourceTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcLaborResourceTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcLaborResourceTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); -END_ENTITY; - -ENTITY IfcLaborResourceType - SUBTYPE OF (IfcConstructionResourceType); - PredefinedType : IfcLaborResourceTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcLaborResourceTypeEnum.USERDEFINED) OR -((PredefinedType = IfcLaborResourceTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcTypeResource.ResourceType)); -END_ENTITY; - -ENTITY IfcLagTime - SUBTYPE OF (IfcSchedulingTime); - LagValue : IfcTimeOrRatioSelect; - DurationType : IfcTaskDurationEnum; -END_ENTITY; - -ENTITY IfcLamp - SUBTYPE OF (IfcFlowTerminal); - PredefinedType : OPTIONAL IfcLampTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcLampTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcLampTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCLAMPTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcLampType - SUBTYPE OF (IfcFlowTerminalType); - PredefinedType : IfcLampTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcLampTypeEnum.USERDEFINED) OR -((PredefinedType = IfcLampTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcLibraryInformation - SUBTYPE OF (IfcExternalInformation); - Name : IfcLabel; - Version : OPTIONAL IfcLabel; - Publisher : OPTIONAL IfcActorSelect; - VersionDate : OPTIONAL IfcDateTime; - Location : OPTIONAL IfcURIReference; - Description : OPTIONAL IfcText; - INVERSE - LibraryInfoForObjects : SET [0:?] OF IfcRelAssociatesLibrary FOR RelatingLibrary; - HasLibraryReferences : SET [0:?] OF IfcLibraryReference FOR ReferencedLibrary; -END_ENTITY; - -ENTITY IfcLibraryReference - SUBTYPE OF (IfcExternalReference); - Description : OPTIONAL IfcText; - Language : OPTIONAL IfcLanguageId; - ReferencedLibrary : OPTIONAL IfcLibraryInformation; - INVERSE - LibraryRefForObjects : SET [0:?] OF IfcRelAssociatesLibrary FOR RelatingLibrary; -END_ENTITY; - -ENTITY IfcLightDistributionData; - MainPlaneAngle : IfcPlaneAngleMeasure; - SecondaryPlaneAngle : LIST [1:?] OF IfcPlaneAngleMeasure; - LuminousIntensity : LIST [1:?] OF IfcLuminousIntensityDistributionMeasure; -END_ENTITY; - -ENTITY IfcLightFixture - SUBTYPE OF (IfcFlowTerminal); - PredefinedType : OPTIONAL IfcLightFixtureTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcLightFixtureTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcLightFixtureTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCLIGHTFIXTURETYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcLightFixtureType - SUBTYPE OF (IfcFlowTerminalType); - PredefinedType : IfcLightFixtureTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcLightFixtureTypeEnum.USERDEFINED) OR -((PredefinedType = IfcLightFixtureTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcLightIntensityDistribution; - LightDistributionCurve : IfcLightDistributionCurveEnum; - DistributionData : LIST [1:?] OF IfcLightDistributionData; -END_ENTITY; - -ENTITY IfcLightSource - ABSTRACT SUPERTYPE OF (ONEOF - (IfcLightSourceAmbient - ,IfcLightSourceDirectional - ,IfcLightSourceGoniometric - ,IfcLightSourcePositional)) - SUBTYPE OF (IfcGeometricRepresentationItem); - Name : OPTIONAL IfcLabel; - LightColour : IfcColourRgb; - AmbientIntensity : OPTIONAL IfcNormalisedRatioMeasure; - Intensity : OPTIONAL IfcNormalisedRatioMeasure; -END_ENTITY; - -ENTITY IfcLightSourceAmbient - SUBTYPE OF (IfcLightSource); -END_ENTITY; - -ENTITY IfcLightSourceDirectional - SUBTYPE OF (IfcLightSource); - Orientation : IfcDirection; -END_ENTITY; - -ENTITY IfcLightSourceGoniometric - SUBTYPE OF (IfcLightSource); - Position : IfcAxis2Placement3D; - ColourAppearance : OPTIONAL IfcColourRgb; - ColourTemperature : IfcThermodynamicTemperatureMeasure; - LuminousFlux : IfcLuminousFluxMeasure; - LightEmissionSource : IfcLightEmissionSourceEnum; - LightDistributionDataSource : IfcLightDistributionDataSourceSelect; -END_ENTITY; - -ENTITY IfcLightSourcePositional - SUPERTYPE OF (ONEOF - (IfcLightSourceSpot)) - SUBTYPE OF (IfcLightSource); - Position : IfcCartesianPoint; - Radius : IfcPositiveLengthMeasure; - ConstantAttenuation : IfcReal; - DistanceAttenuation : IfcReal; - QuadricAttenuation : IfcReal; -END_ENTITY; - -ENTITY IfcLightSourceSpot - SUBTYPE OF (IfcLightSourcePositional); - Orientation : IfcDirection; - ConcentrationExponent : OPTIONAL IfcReal; - SpreadAngle : IfcPositivePlaneAngleMeasure; - BeamWidthAngle : IfcPositivePlaneAngleMeasure; -END_ENTITY; - -ENTITY IfcLine - SUBTYPE OF (IfcCurve); - Pnt : IfcCartesianPoint; - Dir : IfcVector; - WHERE - SameDim : Dir.Dim = Pnt.Dim; -END_ENTITY; - -ENTITY IfcLocalPlacement - SUBTYPE OF (IfcObjectPlacement); - PlacementRelTo : OPTIONAL IfcObjectPlacement; - RelativePlacement : IfcAxis2Placement; - WHERE - WR21 : IfcCorrectLocalPlacement(RelativePlacement, PlacementRelTo); -END_ENTITY; - -ENTITY IfcLoop - SUPERTYPE OF (ONEOF - (IfcEdgeLoop - ,IfcPolyLoop - ,IfcVertexLoop)) - SUBTYPE OF (IfcTopologicalRepresentationItem); -END_ENTITY; - -ENTITY IfcManifoldSolidBrep - ABSTRACT SUPERTYPE OF (ONEOF - (IfcAdvancedBrep - ,IfcFacetedBrep)) - SUBTYPE OF (IfcSolidModel); - Outer : IfcClosedShell; -END_ENTITY; - -ENTITY IfcMapConversion - SUBTYPE OF (IfcCoordinateOperation); - Eastings : IfcLengthMeasure; - Northings : IfcLengthMeasure; - OrthogonalHeight : IfcLengthMeasure; - XAxisAbscissa : OPTIONAL IfcReal; - XAxisOrdinate : OPTIONAL IfcReal; - Scale : OPTIONAL IfcReal; -END_ENTITY; - -ENTITY IfcMappedItem - SUBTYPE OF (IfcRepresentationItem); - MappingSource : IfcRepresentationMap; - MappingTarget : IfcCartesianTransformationOperator; -END_ENTITY; - -ENTITY IfcMaterial - SUBTYPE OF (IfcMaterialDefinition); - Name : IfcLabel; - Description : OPTIONAL IfcText; - Category : OPTIONAL IfcLabel; - INVERSE - HasRepresentation : SET [0:1] OF IfcMaterialDefinitionRepresentation FOR RepresentedMaterial; - IsRelatedWith : SET [0:?] OF IfcMaterialRelationship FOR RelatedMaterials; - RelatesTo : SET [0:1] OF IfcMaterialRelationship FOR RelatingMaterial; -END_ENTITY; - -ENTITY IfcMaterialClassificationRelationship; - MaterialClassifications : SET [1:?] OF IfcClassificationSelect; - ClassifiedMaterial : IfcMaterial; -END_ENTITY; - -ENTITY IfcMaterialConstituent - SUBTYPE OF (IfcMaterialDefinition); - Name : OPTIONAL IfcLabel; - Description : OPTIONAL IfcText; - Material : IfcMaterial; - Fraction : OPTIONAL IfcNormalisedRatioMeasure; - Category : OPTIONAL IfcLabel; - INVERSE - ToMaterialConstituentSet : IfcMaterialConstituentSet FOR MaterialConstituents; -END_ENTITY; - -ENTITY IfcMaterialConstituentSet - SUBTYPE OF (IfcMaterialDefinition); - Name : OPTIONAL IfcLabel; - Description : OPTIONAL IfcText; - MaterialConstituents : OPTIONAL SET [1:?] OF IfcMaterialConstituent; -END_ENTITY; - -ENTITY IfcMaterialDefinition - ABSTRACT SUPERTYPE OF (ONEOF - (IfcMaterial - ,IfcMaterialConstituent - ,IfcMaterialConstituentSet - ,IfcMaterialLayer - ,IfcMaterialLayerSet - ,IfcMaterialProfile - ,IfcMaterialProfileSet)); - INVERSE - AssociatedTo : SET [0:?] OF IfcRelAssociatesMaterial FOR RelatingMaterial; - HasExternalReferences : SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects; - HasProperties : SET [0:?] OF IfcMaterialProperties FOR Material; -END_ENTITY; - -ENTITY IfcMaterialDefinitionRepresentation - SUBTYPE OF (IfcProductRepresentation); - RepresentedMaterial : IfcMaterial; - WHERE - OnlyStyledRepresentations : SIZEOF(QUERY(temp <* Representations | - (NOT('IFC4.IFCSTYLEDREPRESENTATION' IN TYPEOF(temp))) -)) = 0; -END_ENTITY; - -ENTITY IfcMaterialLayer - SUPERTYPE OF (ONEOF - (IfcMaterialLayerWithOffsets)) - SUBTYPE OF (IfcMaterialDefinition); - Material : OPTIONAL IfcMaterial; - LayerThickness : IfcNonNegativeLengthMeasure; - IsVentilated : OPTIONAL IfcLogical; - Name : OPTIONAL IfcLabel; - Description : OPTIONAL IfcText; - Category : OPTIONAL IfcLabel; - Priority : OPTIONAL IfcInteger; - INVERSE - ToMaterialLayerSet : IfcMaterialLayerSet FOR MaterialLayers; - WHERE - NormalizedPriority : NOT(EXISTS(Priority)) OR {0 <= Priority <= 100}; -END_ENTITY; - -ENTITY IfcMaterialLayerSet - SUBTYPE OF (IfcMaterialDefinition); - MaterialLayers : LIST [1:?] OF IfcMaterialLayer; - LayerSetName : OPTIONAL IfcLabel; - Description : OPTIONAL IfcText; - DERIVE - TotalThickness : IfcLengthMeasure := IfcMlsTotalThickness(SELF); -END_ENTITY; - -ENTITY IfcMaterialLayerSetUsage - SUBTYPE OF (IfcMaterialUsageDefinition); - ForLayerSet : IfcMaterialLayerSet; - LayerSetDirection : IfcLayerSetDirectionEnum; - DirectionSense : IfcDirectionSenseEnum; - OffsetFromReferenceLine : IfcLengthMeasure; - ReferenceExtent : OPTIONAL IfcPositiveLengthMeasure; -END_ENTITY; - -ENTITY IfcMaterialLayerWithOffsets - SUBTYPE OF (IfcMaterialLayer); - OffsetDirection : IfcLayerSetDirectionEnum; - OffsetValues : ARRAY [1:2] OF IfcLengthMeasure; -END_ENTITY; - -ENTITY IfcMaterialList; - Materials : LIST [1:?] OF IfcMaterial; -END_ENTITY; - -ENTITY IfcMaterialProfile - SUPERTYPE OF (ONEOF - (IfcMaterialProfileWithOffsets)) - SUBTYPE OF (IfcMaterialDefinition); - Name : OPTIONAL IfcLabel; - Description : OPTIONAL IfcText; - Material : OPTIONAL IfcMaterial; - Profile : IfcProfileDef; - Priority : OPTIONAL IfcInteger; - Category : OPTIONAL IfcLabel; - INVERSE - ToMaterialProfileSet : IfcMaterialProfileSet FOR MaterialProfiles; - WHERE - NormalizedPriority : NOT(EXISTS(Priority)) OR {0 <= Priority <= 100}; -END_ENTITY; - -ENTITY IfcMaterialProfileSet - SUBTYPE OF (IfcMaterialDefinition); - Name : OPTIONAL IfcLabel; - Description : OPTIONAL IfcText; - MaterialProfiles : LIST [1:?] OF IfcMaterialProfile; - CompositeProfile : OPTIONAL IfcCompositeProfileDef; -END_ENTITY; - -ENTITY IfcMaterialProfileSetUsage - SUPERTYPE OF (ONEOF - (IfcMaterialProfileSetUsageTapering)) - SUBTYPE OF (IfcMaterialUsageDefinition); - ForProfileSet : IfcMaterialProfileSet; - CardinalPoint : OPTIONAL IfcCardinalPointReference; - ReferenceExtent : OPTIONAL IfcPositiveLengthMeasure; -END_ENTITY; - -ENTITY IfcMaterialProfileSetUsageTapering - SUBTYPE OF (IfcMaterialProfileSetUsage); - ForProfileEndSet : IfcMaterialProfileSet; - CardinalEndPoint : OPTIONAL IfcCardinalPointReference; -END_ENTITY; - -ENTITY IfcMaterialProfileWithOffsets - SUBTYPE OF (IfcMaterialProfile); - OffsetValues : ARRAY [1:2] OF IfcLengthMeasure; -END_ENTITY; - -ENTITY IfcMaterialProperties - SUBTYPE OF (IfcExtendedProperties); - Material : IfcMaterialDefinition; -END_ENTITY; - -ENTITY IfcMaterialRelationship - SUBTYPE OF (IfcResourceLevelRelationship); - RelatingMaterial : IfcMaterial; - RelatedMaterials : SET [1:?] OF IfcMaterial; - Expression : OPTIONAL IfcLabel; -END_ENTITY; - -ENTITY IfcMaterialUsageDefinition - ABSTRACT SUPERTYPE OF (ONEOF - (IfcMaterialLayerSetUsage - ,IfcMaterialProfileSetUsage)); - INVERSE - AssociatedTo : SET [1:?] OF IfcRelAssociatesMaterial FOR RelatingMaterial; -END_ENTITY; - -ENTITY IfcMeasureWithUnit; - ValueComponent : IfcValue; - UnitComponent : IfcUnit; -END_ENTITY; - -ENTITY IfcMechanicalFastener - SUBTYPE OF (IfcElementComponent); - NominalDiameter : OPTIONAL IfcPositiveLengthMeasure; - NominalLength : OPTIONAL IfcPositiveLengthMeasure; - PredefinedType : OPTIONAL IfcMechanicalFastenerTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR -(PredefinedType <> IfcMechanicalFastenerTypeEnum.USERDEFINED) OR -((PredefinedType = IfcMechanicalFastenerTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR -('IFC4.IFCMECHANICALFASTENERTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcMechanicalFastenerType - SUBTYPE OF (IfcElementComponentType); - PredefinedType : IfcMechanicalFastenerTypeEnum; - NominalDiameter : OPTIONAL IfcPositiveLengthMeasure; - NominalLength : OPTIONAL IfcPositiveLengthMeasure; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcMechanicalFastenerTypeEnum.USERDEFINED) OR -((PredefinedType = IfcMechanicalFastenerTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcMedicalDevice - SUBTYPE OF (IfcFlowTerminal); - PredefinedType : OPTIONAL IfcMedicalDeviceTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcMedicalDeviceTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcMedicalDeviceTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCMEDICALDEVICETYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcMedicalDeviceType - SUBTYPE OF (IfcFlowTerminalType); - PredefinedType : IfcMedicalDeviceTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcMedicalDeviceTypeEnum.USERDEFINED) OR -((PredefinedType = IfcMedicalDeviceTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcMember - SUPERTYPE OF (ONEOF - (IfcMemberStandardCase)) - SUBTYPE OF (IfcBuildingElement); - PredefinedType : OPTIONAL IfcMemberTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcMemberTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcMemberTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCMEMBERTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcMemberStandardCase - SUBTYPE OF (IfcMember); - WHERE - HasMaterialProfileSetUsage : SIZEOF (QUERY(temp <* USEDIN(SELF, 'IFC4.IFCRELASSOCIATES.RELATEDOBJECTS') | - ('IFC4.IFCRELASSOCIATESMATERIAL' IN TYPEOF(temp)) AND - ('IFC4.IFCMATERIALPROFILESETUSAGE' IN TYPEOF(temp.RelatingMaterial)) - )) = 1; -END_ENTITY; - -ENTITY IfcMemberType - SUBTYPE OF (IfcBuildingElementType); - PredefinedType : IfcMemberTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcMemberTypeEnum.USERDEFINED) OR -((PredefinedType = IfcMemberTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcMetric - SUBTYPE OF (IfcConstraint); - Benchmark : IfcBenchmarkEnum; - ValueSource : OPTIONAL IfcLabel; - DataValue : OPTIONAL IfcMetricValueSelect; - ReferencePath : OPTIONAL IfcReference; -END_ENTITY; - -ENTITY IfcMirroredProfileDef - SUBTYPE OF (IfcDerivedProfileDef); - DERIVE - SELF\IfcDerivedProfileDef.Operator : IfcCartesianTransformationOperator2D := -IfcRepresentationItem() || IfcGeometricRepresentationItem() || -IfcCartesianTransformationOperator( - -- Axis1 - IfcRepresentationItem() || IfcGeometricRepresentationItem() || - IfcDirection([-1., 0.]), - -- Axis2 - IfcRepresentationItem() || IfcGeometricRepresentationItem() || - IfcDirection([ 0., 1.]), - -- LocalOrigin - IfcRepresentationItem() || IfcGeometricRepresentationItem() || - IfcPoint() || IfcCartesianPoint([0., 0.]), - -- Scale - 1.) || -IfcCartesianTransformationOperator2D(); -END_ENTITY; - -ENTITY IfcMonetaryUnit; - Currency : IfcLabel; -END_ENTITY; - -ENTITY IfcMotorConnection - SUBTYPE OF (IfcEnergyConversionDevice); - PredefinedType : OPTIONAL IfcMotorConnectionTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcMotorConnectionTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcMotorConnectionTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCMOTORCONNECTIONTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcMotorConnectionType - SUBTYPE OF (IfcEnergyConversionDeviceType); - PredefinedType : IfcMotorConnectionTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcMotorConnectionTypeEnum.USERDEFINED) OR -((PredefinedType = IfcMotorConnectionTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcNamedUnit - ABSTRACT SUPERTYPE OF (ONEOF - (IfcContextDependentUnit - ,IfcConversionBasedUnit - ,IfcSIUnit)); - Dimensions : IfcDimensionalExponents; - UnitType : IfcUnitEnum; - WHERE - WR1 : IfcCorrectDimensions (SELF.UnitType, SELF.Dimensions); -END_ENTITY; - -ENTITY IfcObject - ABSTRACT SUPERTYPE OF (ONEOF - (IfcActor - ,IfcControl - ,IfcGroup - ,IfcProcess - ,IfcProduct - ,IfcResource)) - SUBTYPE OF (IfcObjectDefinition); - ObjectType : OPTIONAL IfcLabel; - INVERSE - IsDeclaredBy : SET [0:1] OF IfcRelDefinesByObject FOR RelatedObjects; - Declares : SET [0:?] OF IfcRelDefinesByObject FOR RelatingObject; - IsTypedBy : SET [0:1] OF IfcRelDefinesByType FOR RelatedObjects; - IsDefinedBy : SET [0:?] OF IfcRelDefinesByProperties FOR RelatedObjects; - WHERE - UniquePropertySetNames : ((SIZEOF(IsDefinedBy) = 0) OR IfcUniqueDefinitionNames(IsDefinedBy)); -END_ENTITY; - -ENTITY IfcObjectDefinition - ABSTRACT SUPERTYPE OF (ONEOF - (IfcContext - ,IfcObject - ,IfcTypeObject)) - SUBTYPE OF (IfcRoot); - INVERSE - HasAssignments : SET [0:?] OF IfcRelAssigns FOR RelatedObjects; - Nests : SET [0:1] OF IfcRelNests FOR RelatedObjects; - IsNestedBy : SET [0:?] OF IfcRelNests FOR RelatingObject; - HasContext : SET [0:1] OF IfcRelDeclares FOR RelatedDefinitions; - IsDecomposedBy : SET [0:?] OF IfcRelAggregates FOR RelatingObject; - Decomposes : SET [0:1] OF IfcRelAggregates FOR RelatedObjects; - HasAssociations : SET [0:?] OF IfcRelAssociates FOR RelatedObjects; -END_ENTITY; - -ENTITY IfcObjectPlacement - ABSTRACT SUPERTYPE OF (ONEOF - (IfcGridPlacement - ,IfcLocalPlacement)); - INVERSE - PlacesObject : SET [0:?] OF IfcProduct FOR ObjectPlacement; - ReferencedByPlacements : SET [0:?] OF IfcLocalPlacement FOR PlacementRelTo; -END_ENTITY; - -ENTITY IfcObjective - SUBTYPE OF (IfcConstraint); - BenchmarkValues : OPTIONAL LIST [1:?] OF IfcConstraint; - LogicalAggregator : OPTIONAL IfcLogicalOperatorEnum; - ObjectiveQualifier : IfcObjectiveEnum; - UserDefinedQualifier : OPTIONAL IfcLabel; - WHERE - WR21 : (ObjectiveQualifier <> IfcObjectiveEnum.USERDEFINED) OR -((ObjectiveQualifier = IfcObjectiveEnum.USERDEFINED) AND EXISTS(SELF\IfcObjective.UserDefinedQualifier)); -END_ENTITY; - -ENTITY IfcOccupant - SUBTYPE OF (IfcActor); - PredefinedType : OPTIONAL IfcOccupantTypeEnum; - WHERE - WR31 : NOT(PredefinedType = IfcOccupantTypeEnum.USERDEFINED) -OR EXISTS(SELF\IfcObject.ObjectType); -END_ENTITY; - -ENTITY IfcOffsetCurve2D - SUBTYPE OF (IfcCurve); - BasisCurve : IfcCurve; - Distance : IfcLengthMeasure; - SelfIntersect : IfcLogical; - WHERE - DimIs2D : BasisCurve.Dim = 2; -END_ENTITY; - -ENTITY IfcOffsetCurve3D - SUBTYPE OF (IfcCurve); - BasisCurve : IfcCurve; - Distance : IfcLengthMeasure; - SelfIntersect : IfcLogical; - RefDirection : IfcDirection; - WHERE - DimIs2D : BasisCurve.Dim = 3; -END_ENTITY; - -ENTITY IfcOpenShell - SUBTYPE OF (IfcConnectedFaceSet); -END_ENTITY; - -ENTITY IfcOpeningElement - SUPERTYPE OF (ONEOF - (IfcOpeningStandardCase)) - SUBTYPE OF (IfcFeatureElementSubtraction); - PredefinedType : OPTIONAL IfcOpeningElementTypeEnum; - INVERSE - HasFillings : SET [0:?] OF IfcRelFillsElement FOR RelatingOpeningElement; -END_ENTITY; - -ENTITY IfcOpeningStandardCase - SUBTYPE OF (IfcOpeningElement); -END_ENTITY; - -ENTITY IfcOrganization; - Identification : OPTIONAL IfcIdentifier; - Name : IfcLabel; - Description : OPTIONAL IfcText; - Roles : OPTIONAL LIST [1:?] OF IfcActorRole; - Addresses : OPTIONAL LIST [1:?] OF IfcAddress; - INVERSE - IsRelatedBy : SET [0:?] OF IfcOrganizationRelationship FOR RelatedOrganizations; - Relates : SET [0:?] OF IfcOrganizationRelationship FOR RelatingOrganization; - Engages : SET [0:?] OF IfcPersonAndOrganization FOR TheOrganization; -END_ENTITY; - -ENTITY IfcOrganizationRelationship - SUBTYPE OF (IfcResourceLevelRelationship); - RelatingOrganization : IfcOrganization; - RelatedOrganizations : SET [1:?] OF IfcOrganization; -END_ENTITY; - -ENTITY IfcOrientedEdge - SUBTYPE OF (IfcEdge); - EdgeElement : IfcEdge; - Orientation : IfcBoolean; - DERIVE - SELF\IfcEdge.EdgeStart : IfcVertex := IfcBooleanChoose -(Orientation, EdgeElement.EdgeStart, EdgeElement.EdgeEnd); - SELF\IfcEdge.EdgeEnd : IfcVertex := IfcBooleanChoose -(Orientation, EdgeElement.EdgeEnd, EdgeElement.EdgeStart); - WHERE - EdgeElementNotOriented : NOT('IFC4.IFCORIENTEDEDGE' IN TYPEOF(EdgeElement)); -END_ENTITY; - -ENTITY IfcOuterBoundaryCurve - SUBTYPE OF (IfcBoundaryCurve); -END_ENTITY; - -ENTITY IfcOutlet - SUBTYPE OF (IfcFlowTerminal); - PredefinedType : OPTIONAL IfcOutletTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcOutletTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcOutletTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCOUTLETTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcOutletType - SUBTYPE OF (IfcFlowTerminalType); - PredefinedType : IfcOutletTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcOutletTypeEnum.USERDEFINED) OR -((PredefinedType = IfcOutletTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcOwnerHistory; - OwningUser : IfcPersonAndOrganization; - OwningApplication : IfcApplication; - State : OPTIONAL IfcStateEnum; - ChangeAction : OPTIONAL IfcChangeActionEnum; - LastModifiedDate : OPTIONAL IfcTimeStamp; - LastModifyingUser : OPTIONAL IfcPersonAndOrganization; - LastModifyingApplication : OPTIONAL IfcApplication; - CreationDate : IfcTimeStamp; - WHERE - CorrectChangeAction : (EXISTS(LastModifiedDate)) OR -(NOT(EXISTS(LastModifiedDate)) AND NOT(EXISTS(ChangeAction))) OR -(NOT(EXISTS(LastModifiedDate)) AND EXISTS(ChangeAction) AND ((ChangeAction = IfcChangeActionEnum.NOTDEFINED) OR (ChangeAction = IfcChangeActionEnum.NOCHANGE))); -END_ENTITY; - -ENTITY IfcParameterizedProfileDef - ABSTRACT SUPERTYPE OF (ONEOF - (IfcAsymmetricIShapeProfileDef - ,IfcCShapeProfileDef - ,IfcCircleProfileDef - ,IfcEllipseProfileDef - ,IfcIShapeProfileDef - ,IfcLShapeProfileDef - ,IfcRectangleProfileDef - ,IfcTShapeProfileDef - ,IfcTrapeziumProfileDef - ,IfcUShapeProfileDef - ,IfcZShapeProfileDef)) - SUBTYPE OF (IfcProfileDef); - Position : OPTIONAL IfcAxis2Placement2D; -END_ENTITY; - -ENTITY IfcPath - SUBTYPE OF (IfcTopologicalRepresentationItem); - EdgeList : LIST [1:?] OF UNIQUE IfcOrientedEdge; - WHERE - IsContinuous : IfcPathHeadToTail(SELF); -END_ENTITY; - -ENTITY IfcPcurve - SUBTYPE OF (IfcCurve); - BasisSurface : IfcSurface; - ReferenceCurve : IfcCurve; - WHERE - DimIs2D : ReferenceCurve.Dim = 2; -END_ENTITY; - -ENTITY IfcPerformanceHistory - SUBTYPE OF (IfcControl); - LifeCyclePhase : IfcLabel; - PredefinedType : OPTIONAL IfcPerformanceHistoryTypeEnum; -END_ENTITY; - -ENTITY IfcPermeableCoveringProperties - SUBTYPE OF (IfcPreDefinedPropertySet); - OperationType : IfcPermeableCoveringOperationEnum; - PanelPosition : IfcWindowPanelPositionEnum; - FrameDepth : OPTIONAL IfcPositiveLengthMeasure; - FrameThickness : OPTIONAL IfcPositiveLengthMeasure; - ShapeAspectStyle : OPTIONAL IfcShapeAspect; -END_ENTITY; - -ENTITY IfcPermit - SUBTYPE OF (IfcControl); - PredefinedType : OPTIONAL IfcPermitTypeEnum; - Status : OPTIONAL IfcLabel; - LongDescription : OPTIONAL IfcText; -END_ENTITY; - -ENTITY IfcPerson; - Identification : OPTIONAL IfcIdentifier; - FamilyName : OPTIONAL IfcLabel; - GivenName : OPTIONAL IfcLabel; - MiddleNames : OPTIONAL LIST [1:?] OF IfcLabel; - PrefixTitles : OPTIONAL LIST [1:?] OF IfcLabel; - SuffixTitles : OPTIONAL LIST [1:?] OF IfcLabel; - Roles : OPTIONAL LIST [1:?] OF IfcActorRole; - Addresses : OPTIONAL LIST [1:?] OF IfcAddress; - INVERSE - EngagedIn : SET [0:?] OF IfcPersonAndOrganization FOR ThePerson; - WHERE - IdentifiablePerson : EXISTS(Identification) OR EXISTS(FamilyName) OR EXISTS(GivenName); - ValidSetOfNames : NOT EXISTS(MiddleNames) OR EXISTS(FamilyName) OR EXISTS(GivenName); -END_ENTITY; - -ENTITY IfcPersonAndOrganization; - ThePerson : IfcPerson; - TheOrganization : IfcOrganization; - Roles : OPTIONAL LIST [1:?] OF IfcActorRole; -END_ENTITY; - -ENTITY IfcPhysicalComplexQuantity - SUBTYPE OF (IfcPhysicalQuantity); - HasQuantities : SET [1:?] OF IfcPhysicalQuantity; - Discrimination : IfcLabel; - Quality : OPTIONAL IfcLabel; - Usage : OPTIONAL IfcLabel; - WHERE - NoSelfReference : SIZEOF(QUERY(temp <* HasQuantities | SELF :=: temp)) = 0; - UniqueQuantityNames : IfcUniqueQuantityNames(HasQuantities); -END_ENTITY; - -ENTITY IfcPhysicalQuantity - ABSTRACT SUPERTYPE OF (ONEOF - (IfcPhysicalComplexQuantity - ,IfcPhysicalSimpleQuantity)); - Name : IfcLabel; - Description : OPTIONAL IfcText; - INVERSE - HasExternalReferences : SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects; - PartOfComplex : SET [0:1] OF IfcPhysicalComplexQuantity FOR HasQuantities; -END_ENTITY; - -ENTITY IfcPhysicalSimpleQuantity - ABSTRACT SUPERTYPE OF (ONEOF - (IfcQuantityArea - ,IfcQuantityCount - ,IfcQuantityLength - ,IfcQuantityTime - ,IfcQuantityVolume - ,IfcQuantityWeight)) - SUBTYPE OF (IfcPhysicalQuantity); - Unit : OPTIONAL IfcNamedUnit; -END_ENTITY; - -ENTITY IfcPile - SUBTYPE OF (IfcBuildingElement); - PredefinedType : OPTIONAL IfcPileTypeEnum; - ConstructionType : OPTIONAL IfcPileConstructionEnum; - WHERE - CorrectPredefinedType : NOT EXISTS(PredefinedType) OR -(PredefinedType <> IfcPileTypeEnum.USERDEFINED) OR -((PredefinedType = IfcPileTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR -('IFC4.IFCPILETYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcPileType - SUBTYPE OF (IfcBuildingElementType); - PredefinedType : IfcPileTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcPileTypeEnum.USERDEFINED) OR -((PredefinedType = IfcPileTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcPipeFitting - SUBTYPE OF (IfcFlowFitting); - PredefinedType : OPTIONAL IfcPipeFittingTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcPipeFittingTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcPipeFittingTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCPIPEFITTINGTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcPipeFittingType - SUBTYPE OF (IfcFlowFittingType); - PredefinedType : IfcPipeFittingTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcPipeFittingTypeEnum.USERDEFINED) OR -((PredefinedType = IfcPipeFittingTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcPipeSegment - SUBTYPE OF (IfcFlowSegment); - PredefinedType : OPTIONAL IfcPipeSegmentTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcPipeSegmentTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcPipeSegmentTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCPIPESEGMENTTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcPipeSegmentType - SUBTYPE OF (IfcFlowSegmentType); - PredefinedType : IfcPipeSegmentTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcPipeSegmentTypeEnum.USERDEFINED) OR -((PredefinedType = IfcPipeSegmentTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcPixelTexture - SUBTYPE OF (IfcSurfaceTexture); - Width : IfcInteger; - Height : IfcInteger; - ColourComponents : IfcInteger; - Pixel : LIST [1:?] OF IfcBinary; - WHERE - MinPixelInS : Width >= 1; - MinPixelInT : Height >= 1; - NumberOfColours : {1 <= ColourComponents <= 4}; - SizeOfPixelList : SIZEOF(Pixel) = (Width * Height); - PixelAsByteAndSameLength : SIZEOF(QUERY(temp<* Pixel | - (BLENGTH(temp) MOD 8 = 0) AND - (BLENGTH(temp) = BLENGTH(Pixel[1])) -)) = SIZEOF(Pixel); -END_ENTITY; - -ENTITY IfcPlacement - ABSTRACT SUPERTYPE OF (ONEOF - (IfcAxis1Placement - ,IfcAxis2Placement2D - ,IfcAxis2Placement3D)) - SUBTYPE OF (IfcGeometricRepresentationItem); - Location : IfcCartesianPoint; - DERIVE - Dim : IfcDimensionCount := Location.Dim; -END_ENTITY; - -ENTITY IfcPlanarBox - SUBTYPE OF (IfcPlanarExtent); - Placement : IfcAxis2Placement; -END_ENTITY; - -ENTITY IfcPlanarExtent - SUPERTYPE OF (ONEOF - (IfcPlanarBox)) - SUBTYPE OF (IfcGeometricRepresentationItem); - SizeInX : IfcLengthMeasure; - SizeInY : IfcLengthMeasure; -END_ENTITY; - -ENTITY IfcPlane - SUBTYPE OF (IfcElementarySurface); -END_ENTITY; - -ENTITY IfcPlate - SUPERTYPE OF (ONEOF - (IfcPlateStandardCase)) - SUBTYPE OF (IfcBuildingElement); - PredefinedType : OPTIONAL IfcPlateTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcPlateTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcPlateTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCPLATETYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcPlateStandardCase - SUBTYPE OF (IfcPlate); - WHERE - HasMaterialLayerSetUsage : SIZEOF (QUERY(temp <* USEDIN(SELF, 'IFC4.IFCRELASSOCIATES.RELATEDOBJECTS') | - ('IFC4.IFCRELASSOCIATESMATERIAL' IN TYPEOF(temp)) AND - ('IFC4.IFCMATERIALLAYERSETUSAGE' IN TYPEOF(temp.RelatingMaterial)) - )) = 1; -END_ENTITY; - -ENTITY IfcPlateType - SUBTYPE OF (IfcBuildingElementType); - PredefinedType : IfcPlateTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcPlateTypeEnum.USERDEFINED) OR -((PredefinedType = IfcPlateTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcPoint - ABSTRACT SUPERTYPE OF (ONEOF - (IfcCartesianPoint - ,IfcPointOnCurve - ,IfcPointOnSurface)) - SUBTYPE OF (IfcGeometricRepresentationItem); -END_ENTITY; - -ENTITY IfcPointOnCurve - SUBTYPE OF (IfcPoint); - BasisCurve : IfcCurve; - PointParameter : IfcParameterValue; - DERIVE - Dim : IfcDimensionCount := BasisCurve.Dim; -END_ENTITY; - -ENTITY IfcPointOnSurface - SUBTYPE OF (IfcPoint); - BasisSurface : IfcSurface; - PointParameterU : IfcParameterValue; - PointParameterV : IfcParameterValue; - DERIVE - Dim : IfcDimensionCount := BasisSurface.Dim; -END_ENTITY; - -ENTITY IfcPolyLoop - SUBTYPE OF (IfcLoop); - Polygon : LIST [3:?] OF UNIQUE IfcCartesianPoint; - WHERE - AllPointsSameDim : SIZEOF(QUERY(Temp <* Polygon | Temp.Dim <> Polygon[1].Dim)) = 0; -END_ENTITY; - -ENTITY IfcPolygonalBoundedHalfSpace - SUBTYPE OF (IfcHalfSpaceSolid); - Position : IfcAxis2Placement3D; - PolygonalBoundary : IfcBoundedCurve; - WHERE - BoundaryDim : PolygonalBoundary.Dim = 2; - BoundaryType : SIZEOF(TYPEOF(PolygonalBoundary) * [ - 'IFC4.IFCPOLYLINE', - 'IFC4.IFCCOMPOSITECURVE'] -) = 1; -END_ENTITY; - -ENTITY IfcPolygonalFaceSet - SUBTYPE OF (IfcTessellatedFaceSet); - Closed : OPTIONAL IfcBoolean; - Faces : LIST [1:?] OF IfcIndexedPolygonalFace; - PnIndex : OPTIONAL LIST [1:?] OF IfcPositiveInteger; -END_ENTITY; - -ENTITY IfcPolyline - SUBTYPE OF (IfcBoundedCurve); - Points : LIST [2:?] OF IfcCartesianPoint; - WHERE - SameDim : SIZEOF(QUERY(Temp <* Points | Temp.Dim <> Points[1].Dim)) = 0; -END_ENTITY; - -ENTITY IfcPort - ABSTRACT SUPERTYPE OF (ONEOF - (IfcDistributionPort)) - SUBTYPE OF (IfcProduct); - INVERSE - ContainedIn : SET [0:1] OF IfcRelConnectsPortToElement FOR RelatingPort; - ConnectedFrom : SET [0:1] OF IfcRelConnectsPorts FOR RelatedPort; - ConnectedTo : SET [0:1] OF IfcRelConnectsPorts FOR RelatingPort; -END_ENTITY; - -ENTITY IfcPostalAddress - SUBTYPE OF (IfcAddress); - InternalLocation : OPTIONAL IfcLabel; - AddressLines : OPTIONAL LIST [1:?] OF IfcLabel; - PostalBox : OPTIONAL IfcLabel; - Town : OPTIONAL IfcLabel; - Region : OPTIONAL IfcLabel; - PostalCode : OPTIONAL IfcLabel; - Country : OPTIONAL IfcLabel; - WHERE - WR1 : EXISTS (InternalLocation) OR -EXISTS (AddressLines) OR -EXISTS (PostalBox) OR -EXISTS (PostalCode) OR -EXISTS (Town) OR -EXISTS (Region) OR -EXISTS (Country); -END_ENTITY; - -ENTITY IfcPreDefinedColour - ABSTRACT SUPERTYPE OF (ONEOF - (IfcDraughtingPreDefinedColour)) - SUBTYPE OF (IfcPreDefinedItem); -END_ENTITY; - -ENTITY IfcPreDefinedCurveFont - ABSTRACT SUPERTYPE OF (ONEOF - (IfcDraughtingPreDefinedCurveFont)) - SUBTYPE OF (IfcPreDefinedItem); -END_ENTITY; - -ENTITY IfcPreDefinedItem - ABSTRACT SUPERTYPE OF (ONEOF - (IfcPreDefinedColour - ,IfcPreDefinedCurveFont - ,IfcPreDefinedTextFont)) - SUBTYPE OF (IfcPresentationItem); - Name : IfcLabel; -END_ENTITY; - -ENTITY IfcPreDefinedProperties - ABSTRACT SUPERTYPE OF (ONEOF - (IfcReinforcementBarProperties - ,IfcSectionProperties - ,IfcSectionReinforcementProperties)) - SUBTYPE OF (IfcPropertyAbstraction); -END_ENTITY; - -ENTITY IfcPreDefinedPropertySet - ABSTRACT SUPERTYPE OF (ONEOF - (IfcDoorLiningProperties - ,IfcDoorPanelProperties - ,IfcPermeableCoveringProperties - ,IfcReinforcementDefinitionProperties - ,IfcWindowLiningProperties - ,IfcWindowPanelProperties)) - SUBTYPE OF (IfcPropertySetDefinition); -END_ENTITY; - -ENTITY IfcPreDefinedTextFont - ABSTRACT SUPERTYPE OF (ONEOF - (IfcTextStyleFontModel)) - SUBTYPE OF (IfcPreDefinedItem); -END_ENTITY; - -ENTITY IfcPresentationItem - ABSTRACT SUPERTYPE OF (ONEOF - (IfcColourRgbList - ,IfcColourSpecification - ,IfcCurveStyleFont - ,IfcCurveStyleFontAndScaling - ,IfcCurveStyleFontPattern - ,IfcIndexedColourMap - ,IfcPreDefinedItem - ,IfcSurfaceStyleLighting - ,IfcSurfaceStyleRefraction - ,IfcSurfaceStyleShading - ,IfcSurfaceStyleWithTextures - ,IfcSurfaceTexture - ,IfcTextStyleForDefinedFont - ,IfcTextStyleTextModel - ,IfcTextureCoordinate - ,IfcTextureVertex - ,IfcTextureVertexList)); -END_ENTITY; - -ENTITY IfcPresentationLayerAssignment - SUPERTYPE OF (ONEOF - (IfcPresentationLayerWithStyle)); - Name : IfcLabel; - Description : OPTIONAL IfcText; - AssignedItems : SET [1:?] OF IfcLayeredItem; - Identifier : OPTIONAL IfcIdentifier; - WHERE - ApplicableItems : SIZEOF(QUERY(temp <* AssignedItems | ( - SIZEOF(TYPEOF(temp) * [ - 'IFC4.IFCSHAPEREPRESENTATION', - 'IFC4.IFCGEOMETRICREPRESENTATIONITEM', - 'IFC4.IFCMAPPEDITEM']) = 1) -)) = SIZEOF(AssignedItems); -END_ENTITY; - -ENTITY IfcPresentationLayerWithStyle - SUBTYPE OF (IfcPresentationLayerAssignment); - LayerOn : IfcLogical; - LayerFrozen : IfcLogical; - LayerBlocked : IfcLogical; - LayerStyles : SET [0:?] OF IfcPresentationStyle; - WHERE - ApplicableOnlyToItems : SIZEOF(QUERY(temp <* AssignedItems | ( - SIZEOF(TYPEOF(temp) * [ - 'IFC4.IFCGEOMETRICREPRESENTATIONITEM', - 'IFC4.IFCMAPPEDITEM']) = 1) -)) = SIZEOF(AssignedItems); -END_ENTITY; - -ENTITY IfcPresentationStyle - ABSTRACT SUPERTYPE OF (ONEOF - (IfcCurveStyle - ,IfcFillAreaStyle - ,IfcSurfaceStyle - ,IfcTextStyle)); - Name : OPTIONAL IfcLabel; -END_ENTITY; - -ENTITY IfcPresentationStyleAssignment; - Styles : SET [1:?] OF IfcPresentationStyleSelect; -END_ENTITY; - -ENTITY IfcProcedure - SUBTYPE OF (IfcProcess); - PredefinedType : OPTIONAL IfcProcedureTypeEnum; - WHERE - HasName : EXISTS(SELF\IfcRoot.Name); - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR (PredefinedType <> IfcProcedureTypeEnum.USERDEFINED) OR -((PredefinedType = IfcProcedureTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcObject.ObjectType)); -END_ENTITY; - -ENTITY IfcProcedureType - SUBTYPE OF (IfcTypeProcess); - PredefinedType : IfcProcedureTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcProcedureTypeEnum.USERDEFINED) OR ((PredefinedType = IfcProcedureTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcTypeProcess.ProcessType)); -END_ENTITY; - -ENTITY IfcProcess - ABSTRACT SUPERTYPE OF (ONEOF - (IfcEvent - ,IfcProcedure - ,IfcTask)) - SUBTYPE OF (IfcObject); - Identification : OPTIONAL IfcIdentifier; - LongDescription : OPTIONAL IfcText; - INVERSE - IsPredecessorTo : SET [0:?] OF IfcRelSequence FOR RelatingProcess; - IsSuccessorFrom : SET [0:?] OF IfcRelSequence FOR RelatedProcess; - OperatesOn : SET [0:?] OF IfcRelAssignsToProcess FOR RelatingProcess; -END_ENTITY; - -ENTITY IfcProduct - ABSTRACT SUPERTYPE OF (ONEOF - (IfcAnnotation - ,IfcElement - ,IfcGrid - ,IfcPort - ,IfcProxy - ,IfcSpatialElement - ,IfcStructuralActivity - ,IfcStructuralItem)) - SUBTYPE OF (IfcObject); - ObjectPlacement : OPTIONAL IfcObjectPlacement; - Representation : OPTIONAL IfcProductRepresentation; - INVERSE - ReferencedBy : SET [0:?] OF IfcRelAssignsToProduct FOR RelatingProduct; - WHERE - PlacementForShapeRepresentation : (EXISTS(Representation) AND EXISTS(ObjectPlacement)) - OR (EXISTS(Representation) AND - (SIZEOF(QUERY(temp <* Representation.Representations | 'IFC4.IFCSHAPEREPRESENTATION' IN TYPEOF(temp))) = 0)) - OR (NOT(EXISTS(Representation))); -END_ENTITY; - -ENTITY IfcProductDefinitionShape - SUBTYPE OF (IfcProductRepresentation); - INVERSE - ShapeOfProduct : SET [1:?] OF IfcProduct FOR Representation; - HasShapeAspects : SET [0:?] OF IfcShapeAspect FOR PartOfProductDefinitionShape; - WHERE - OnlyShapeModel : SIZEOF(QUERY(temp <* Representations | - (NOT('IFC4.IFCSHAPEMODEL' IN TYPEOF(temp))) -)) = 0; -END_ENTITY; - -ENTITY IfcProductRepresentation - ABSTRACT SUPERTYPE OF (ONEOF - (IfcMaterialDefinitionRepresentation - ,IfcProductDefinitionShape)); - Name : OPTIONAL IfcLabel; - Description : OPTIONAL IfcText; - Representations : LIST [1:?] OF IfcRepresentation; -END_ENTITY; - -ENTITY IfcProfileDef - SUPERTYPE OF (ONEOF - (IfcArbitraryClosedProfileDef - ,IfcArbitraryOpenProfileDef - ,IfcCompositeProfileDef - ,IfcDerivedProfileDef - ,IfcParameterizedProfileDef)); - ProfileType : IfcProfileTypeEnum; - ProfileName : OPTIONAL IfcLabel; - INVERSE - HasExternalReference : SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects; - HasProperties : SET [0:?] OF IfcProfileProperties FOR ProfileDefinition; -END_ENTITY; - -ENTITY IfcProfileProperties - SUBTYPE OF (IfcExtendedProperties); - ProfileDefinition : IfcProfileDef; -END_ENTITY; - -ENTITY IfcProject - SUBTYPE OF (IfcContext); - WHERE - HasName : EXISTS(SELF\IfcRoot.Name); - CorrectContext : NOT(EXISTS(SELF\IfcContext.RepresentationContexts)) OR -(SIZEOF(QUERY(Temp <* SELF\IfcContext.RepresentationContexts | - 'IFC4.IFCGEOMETRICREPRESENTATIONSUBCONTEXT' IN TYPEOF(Temp) - )) = 0); - NoDecomposition : SIZEOF(SELF\IfcObjectDefinition.Decomposes) = 0; -END_ENTITY; - -ENTITY IfcProjectLibrary - SUBTYPE OF (IfcContext); -END_ENTITY; - -ENTITY IfcProjectOrder - SUBTYPE OF (IfcControl); - PredefinedType : OPTIONAL IfcProjectOrderTypeEnum; - Status : OPTIONAL IfcLabel; - LongDescription : OPTIONAL IfcText; -END_ENTITY; - -ENTITY IfcProjectedCRS - SUBTYPE OF (IfcCoordinateReferenceSystem); - MapProjection : OPTIONAL IfcIdentifier; - MapZone : OPTIONAL IfcIdentifier; - MapUnit : OPTIONAL IfcNamedUnit; - WHERE - IsLengthUnit : NOT(EXISTS(MapUnit)) OR (MapUnit.UnitType = IfcUnitEnum.LENGTHUNIT); -END_ENTITY; - -ENTITY IfcProjectionElement - SUBTYPE OF (IfcFeatureElementAddition); - PredefinedType : OPTIONAL IfcProjectionElementTypeEnum; -END_ENTITY; - -ENTITY IfcProperty - ABSTRACT SUPERTYPE OF (ONEOF - (IfcComplexProperty - ,IfcSimpleProperty)) - SUBTYPE OF (IfcPropertyAbstraction); - Name : IfcIdentifier; - Description : OPTIONAL IfcText; - INVERSE - PartOfPset : SET [0:?] OF IfcPropertySet FOR HasProperties; - PropertyForDependance : SET [0:?] OF IfcPropertyDependencyRelationship FOR DependingProperty; - PropertyDependsOn : SET [0:?] OF IfcPropertyDependencyRelationship FOR DependantProperty; - PartOfComplex : SET [0:?] OF IfcComplexProperty FOR HasProperties; - HasConstraints : SET [0:?] OF IfcResourceConstraintRelationship FOR RelatedResourceObjects; - HasApprovals : SET [0:?] OF IfcResourceApprovalRelationship FOR RelatedResourceObjects; -END_ENTITY; - -ENTITY IfcPropertyAbstraction - ABSTRACT SUPERTYPE OF (ONEOF - (IfcExtendedProperties - ,IfcPreDefinedProperties - ,IfcProperty - ,IfcPropertyEnumeration)); - INVERSE - HasExternalReferences : SET [0:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects; -END_ENTITY; - -ENTITY IfcPropertyBoundedValue - SUBTYPE OF (IfcSimpleProperty); - UpperBoundValue : OPTIONAL IfcValue; - LowerBoundValue : OPTIONAL IfcValue; - Unit : OPTIONAL IfcUnit; - SetPointValue : OPTIONAL IfcValue; - WHERE - SameUnitUpperLower : NOT(EXISTS(UpperBoundValue)) OR NOT(EXISTS(LowerBoundValue)) OR -(TYPEOF(UpperBoundValue) = TYPEOF(LowerBoundValue)); - SameUnitUpperSet : NOT(EXISTS(UpperBoundValue)) OR NOT(EXISTS(SetPointValue)) OR -(TYPEOF(UpperBoundValue) = TYPEOF(SetPointValue)); - SameUnitLowerSet : NOT(EXISTS(LowerBoundValue)) OR NOT(EXISTS(SetPointValue)) OR -(TYPEOF(LowerBoundValue) = TYPEOF(SetPointValue)); -END_ENTITY; - -ENTITY IfcPropertyDefinition - ABSTRACT SUPERTYPE OF (ONEOF - (IfcPropertySetDefinition - ,IfcPropertyTemplateDefinition)) - SUBTYPE OF (IfcRoot); - INVERSE - HasContext : SET [0:1] OF IfcRelDeclares FOR RelatedDefinitions; - HasAssociations : SET [0:?] OF IfcRelAssociates FOR RelatedObjects; -END_ENTITY; - -ENTITY IfcPropertyDependencyRelationship - SUBTYPE OF (IfcResourceLevelRelationship); - DependingProperty : IfcProperty; - DependantProperty : IfcProperty; - Expression : OPTIONAL IfcText; - WHERE - NoSelfReference : DependingProperty :<>: DependantProperty; -END_ENTITY; - -ENTITY IfcPropertyEnumeratedValue - SUBTYPE OF (IfcSimpleProperty); - EnumerationValues : OPTIONAL LIST [1:?] OF IfcValue; - EnumerationReference : OPTIONAL IfcPropertyEnumeration; - WHERE - WR21 : NOT(EXISTS(EnumerationReference)) -OR NOT(EXISTS(EnumerationValues)) -OR (SIZEOF(QUERY(temp <* EnumerationValues | - temp IN EnumerationReference.EnumerationValues)) - = SIZEOF(EnumerationValues)); -END_ENTITY; - -ENTITY IfcPropertyEnumeration - SUBTYPE OF (IfcPropertyAbstraction); - Name : IfcLabel; - EnumerationValues : LIST [1:?] OF UNIQUE IfcValue; - Unit : OPTIONAL IfcUnit; - UNIQUE - UR1 : Name; - WHERE - WR01 : SIZEOF(QUERY(temp <* SELF.EnumerationValues | - NOT(TYPEOF(SELF.EnumerationValues[1]) = TYPEOF(temp)) - )) = 0; -END_ENTITY; - -ENTITY IfcPropertyListValue - SUBTYPE OF (IfcSimpleProperty); - ListValues : OPTIONAL LIST [1:?] OF IfcValue; - Unit : OPTIONAL IfcUnit; - WHERE - WR31 : SIZEOF(QUERY(temp <* SELF.ListValues | - NOT(TYPEOF(SELF.ListValues[1]) = TYPEOF(temp)) - )) = 0; -END_ENTITY; - -ENTITY IfcPropertyReferenceValue - SUBTYPE OF (IfcSimpleProperty); - UsageName : OPTIONAL IfcText; - PropertyReference : OPTIONAL IfcObjectReferenceSelect; -END_ENTITY; - -ENTITY IfcPropertySet - SUBTYPE OF (IfcPropertySetDefinition); - HasProperties : SET [1:?] OF IfcProperty; - WHERE - ExistsName : EXISTS(SELF\IfcRoot.Name); - UniquePropertyNames : IfcUniquePropertyName(HasProperties); -END_ENTITY; - -ENTITY IfcPropertySetDefinition - ABSTRACT SUPERTYPE OF (ONEOF - (IfcPreDefinedPropertySet - ,IfcPropertySet - ,IfcQuantitySet)) - SUBTYPE OF (IfcPropertyDefinition); - INVERSE - DefinesType : SET [0:?] OF IfcTypeObject FOR HasPropertySets; - IsDefinedBy : SET [0:?] OF IfcRelDefinesByTemplate FOR RelatedPropertySets; - DefinesOccurrence : SET [0:?] OF IfcRelDefinesByProperties FOR RelatingPropertyDefinition; -END_ENTITY; - -ENTITY IfcPropertySetTemplate - SUBTYPE OF (IfcPropertyTemplateDefinition); - TemplateType : OPTIONAL IfcPropertySetTemplateTypeEnum; - ApplicableEntity : OPTIONAL IfcIdentifier; - HasPropertyTemplates : SET [1:?] OF IfcPropertyTemplate; - INVERSE - Defines : SET [0:?] OF IfcRelDefinesByTemplate FOR RelatingTemplate; - WHERE - ExistsName : EXISTS(SELF\IfcRoot.Name); - UniquePropertyNames : IfcUniquePropertyTemplateNames(HasPropertyTemplates); -END_ENTITY; - -ENTITY IfcPropertySingleValue - SUBTYPE OF (IfcSimpleProperty); - NominalValue : OPTIONAL IfcValue; - Unit : OPTIONAL IfcUnit; -END_ENTITY; - -ENTITY IfcPropertyTableValue - SUBTYPE OF (IfcSimpleProperty); - DefiningValues : OPTIONAL LIST [1:?] OF UNIQUE IfcValue; - DefinedValues : OPTIONAL LIST [1:?] OF IfcValue; - Expression : OPTIONAL IfcText; - DefiningUnit : OPTIONAL IfcUnit; - DefinedUnit : OPTIONAL IfcUnit; - CurveInterpolation : OPTIONAL IfcCurveInterpolationEnum; - WHERE - WR21 : (NOT(EXISTS(DefiningValues)) AND NOT(EXISTS(DefinedValues))) -OR (SIZEOF(DefiningValues) = SIZEOF(DefinedValues)); - WR22 : NOT(EXISTS(DefiningValues)) OR -(SIZEOF(QUERY(temp <* SELF.DefiningValues | TYPEOF(temp) <> TYPEOF(SELF.DefiningValues[1]) -)) = 0); - WR23 : NOT(EXISTS(DefinedValues)) OR -(SIZEOF(QUERY(temp <* SELF.DefinedValues | TYPEOF(temp) <> TYPEOF(SELF.DefinedValues[1]) -)) = 0); -END_ENTITY; - -ENTITY IfcPropertyTemplate - ABSTRACT SUPERTYPE OF (ONEOF - (IfcComplexPropertyTemplate - ,IfcSimplePropertyTemplate)) - SUBTYPE OF (IfcPropertyTemplateDefinition); - INVERSE - PartOfComplexTemplate : SET [0:?] OF IfcComplexPropertyTemplate FOR HasPropertyTemplates; - PartOfPsetTemplate : SET [0:?] OF IfcPropertySetTemplate FOR HasPropertyTemplates; -END_ENTITY; - -ENTITY IfcPropertyTemplateDefinition - ABSTRACT SUPERTYPE OF (ONEOF - (IfcPropertySetTemplate - ,IfcPropertyTemplate)) - SUBTYPE OF (IfcPropertyDefinition); -END_ENTITY; - -ENTITY IfcProtectiveDevice - SUBTYPE OF (IfcFlowController); - PredefinedType : OPTIONAL IfcProtectiveDeviceTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcProtectiveDeviceTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcProtectiveDeviceTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCPROTECTIVEDEVICETYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcProtectiveDeviceTrippingUnit - SUBTYPE OF (IfcDistributionControlElement); - PredefinedType : OPTIONAL IfcProtectiveDeviceTrippingUnitTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcProtectiveDeviceTrippingUnitTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcProtectiveDeviceTrippingUnitTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCPROTECTIVEDEVICETRIPPINGUNITTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcProtectiveDeviceTrippingUnitType - SUBTYPE OF (IfcDistributionControlElementType); - PredefinedType : IfcProtectiveDeviceTrippingUnitTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcProtectiveDeviceTrippingUnitTypeEnum.USERDEFINED) OR -((PredefinedType = IfcProtectiveDeviceTrippingUnitTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcProtectiveDeviceType - SUBTYPE OF (IfcFlowControllerType); - PredefinedType : IfcProtectiveDeviceTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcProtectiveDeviceTypeEnum.USERDEFINED) OR -((PredefinedType = IfcProtectiveDeviceTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcProxy - SUBTYPE OF (IfcProduct); - ProxyType : IfcObjectTypeEnum; - Tag : OPTIONAL IfcLabel; - WHERE - WR1 : EXISTS(SELF\IfcRoot.Name); -END_ENTITY; - -ENTITY IfcPump - SUBTYPE OF (IfcFlowMovingDevice); - PredefinedType : OPTIONAL IfcPumpTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcPumpTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcPumpTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCPUMPTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcPumpType - SUBTYPE OF (IfcFlowMovingDeviceType); - PredefinedType : IfcPumpTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcPumpTypeEnum.USERDEFINED) OR -((PredefinedType = IfcPumpTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcQuantityArea - SUBTYPE OF (IfcPhysicalSimpleQuantity); - AreaValue : IfcAreaMeasure; - Formula : OPTIONAL IfcLabel; - WHERE - WR21 : NOT(EXISTS(SELF\IfcPhysicalSimpleQuantity.Unit)) OR - (SELF\IfcPhysicalSimpleQuantity.Unit.UnitType = IfcUnitEnum.AREAUNIT); - WR22 : AreaValue >= 0.; -END_ENTITY; - -ENTITY IfcQuantityCount - SUBTYPE OF (IfcPhysicalSimpleQuantity); - CountValue : IfcCountMeasure; - Formula : OPTIONAL IfcLabel; - WHERE - WR21 : CountValue >= 0.; -END_ENTITY; - -ENTITY IfcQuantityLength - SUBTYPE OF (IfcPhysicalSimpleQuantity); - LengthValue : IfcLengthMeasure; - Formula : OPTIONAL IfcLabel; - WHERE - WR21 : NOT(EXISTS(SELF\IfcPhysicalSimpleQuantity.Unit)) OR - (SELF\IfcPhysicalSimpleQuantity.Unit.UnitType = IfcUnitEnum.LENGTHUNIT); - WR22 : LengthValue >= 0.; -END_ENTITY; - -ENTITY IfcQuantitySet - ABSTRACT SUPERTYPE OF (ONEOF - (IfcElementQuantity)) - SUBTYPE OF (IfcPropertySetDefinition); -END_ENTITY; - -ENTITY IfcQuantityTime - SUBTYPE OF (IfcPhysicalSimpleQuantity); - TimeValue : IfcTimeMeasure; - Formula : OPTIONAL IfcLabel; - WHERE - WR21 : NOT(EXISTS(SELF\IfcPhysicalSimpleQuantity.Unit)) OR - (SELF\IfcPhysicalSimpleQuantity.Unit.UnitType = IfcUnitEnum.TIMEUNIT); - WR22 : TimeValue >= 0.; -END_ENTITY; - -ENTITY IfcQuantityVolume - SUBTYPE OF (IfcPhysicalSimpleQuantity); - VolumeValue : IfcVolumeMeasure; - Formula : OPTIONAL IfcLabel; - WHERE - WR21 : NOT(EXISTS(SELF\IfcPhysicalSimpleQuantity.Unit)) OR - (SELF\IfcPhysicalSimpleQuantity.Unit.UnitType = IfcUnitEnum.VOLUMEUNIT); - WR22 : VolumeValue >= 0.; -END_ENTITY; - -ENTITY IfcQuantityWeight - SUBTYPE OF (IfcPhysicalSimpleQuantity); - WeightValue : IfcMassMeasure; - Formula : OPTIONAL IfcLabel; - WHERE - WR21 : NOT(EXISTS(SELF\IfcPhysicalSimpleQuantity.Unit)) OR - (SELF\IfcPhysicalSimpleQuantity.Unit.UnitType = IfcUnitEnum.MASSUNIT); - WR22 : WeightValue >= 0.; -END_ENTITY; - -ENTITY IfcRailing - SUBTYPE OF (IfcBuildingElement); - PredefinedType : OPTIONAL IfcRailingTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcRailingTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcRailingTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCRAILINGTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcRailingType - SUBTYPE OF (IfcBuildingElementType); - PredefinedType : IfcRailingTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcRailingTypeEnum.USERDEFINED) OR -((PredefinedType = IfcRailingTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcRamp - SUBTYPE OF (IfcBuildingElement); - PredefinedType : OPTIONAL IfcRampTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcRampTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcRampTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCRAMPTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcRampFlight - SUBTYPE OF (IfcBuildingElement); - PredefinedType : OPTIONAL IfcRampFlightTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcRampFlightTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcRampFlightTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCRAMPFLIGHTTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcRampFlightType - SUBTYPE OF (IfcBuildingElementType); - PredefinedType : IfcRampFlightTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcRampFlightTypeEnum.USERDEFINED) OR -((PredefinedType = IfcRampFlightTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcRampType - SUBTYPE OF (IfcBuildingElementType); - PredefinedType : IfcRampTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcRampTypeEnum.USERDEFINED) OR -((PredefinedType = IfcRampTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcRationalBSplineCurveWithKnots - SUBTYPE OF (IfcBSplineCurveWithKnots); - WeightsData : LIST [2:?] OF IfcReal; - DERIVE - Weights : ARRAY [0:UpperIndexOnControlPoints] OF IfcReal := IfcListToArray(WeightsData,0,SELF\IfcBSplineCurve.UpperIndexOnControlPoints); - WHERE - SameNumOfWeightsAndPoints : SIZEOF(WeightsData) = SIZEOF(SELF\IfcBSplineCurve.ControlPointsList); - WeightsGreaterZero : IfcCurveWeightsPositive(SELF); -END_ENTITY; - -ENTITY IfcRationalBSplineSurfaceWithKnots - SUBTYPE OF (IfcBSplineSurfaceWithKnots); - WeightsData : LIST [2:?] OF LIST [2:?] OF IfcReal; - DERIVE - Weights : ARRAY [0:UUpper] OF ARRAY [0:VUpper] OF IfcReal := IfcMakeArrayOfArray(WeightsData,0,UUpper,0,VUpper); - WHERE - CorrespondingWeightsDataLists : (SIZEOF(WeightsData) = SIZEOF(SELF\IfcBSplineSurface.ControlPointsList)) -AND -(SIZEOF(WeightsData[1]) = SIZEOF(SELF\IfcBSplineSurface.ControlPointsList[1])); - WeightValuesGreaterZero : IfcSurfaceWeightsPositive(SELF); -END_ENTITY; - -ENTITY IfcRectangleHollowProfileDef - SUBTYPE OF (IfcRectangleProfileDef); - WallThickness : IfcPositiveLengthMeasure; - InnerFilletRadius : OPTIONAL IfcNonNegativeLengthMeasure; - OuterFilletRadius : OPTIONAL IfcNonNegativeLengthMeasure; - WHERE - ValidWallThickness : (WallThickness < (SELF\IfcRectangleProfileDef.XDim/2.)) AND -(WallThickness < (SELF\IfcRectangleProfileDef.YDim/2.)); - ValidInnerRadius : NOT(EXISTS(InnerFilletRadius)) OR -((InnerFilletRadius <= (SELF\IfcRectangleProfileDef.XDim/2. - WallThickness)) AND - (InnerFilletRadius <= (SELF\IfcRectangleProfileDef.YDim/2. - WallThickness))); - ValidOuterRadius : NOT(EXISTS(OuterFilletRadius)) OR -((OuterFilletRadius <= (SELF\IfcRectangleProfileDef.XDim/2.)) AND - (OuterFilletRadius <= (SELF\IfcRectangleProfileDef.YDim/2.))); -END_ENTITY; - -ENTITY IfcRectangleProfileDef - SUPERTYPE OF (ONEOF - (IfcRectangleHollowProfileDef - ,IfcRoundedRectangleProfileDef)) - SUBTYPE OF (IfcParameterizedProfileDef); - XDim : IfcPositiveLengthMeasure; - YDim : IfcPositiveLengthMeasure; -END_ENTITY; - -ENTITY IfcRectangularPyramid - SUBTYPE OF (IfcCsgPrimitive3D); - XLength : IfcPositiveLengthMeasure; - YLength : IfcPositiveLengthMeasure; - Height : IfcPositiveLengthMeasure; -END_ENTITY; - -ENTITY IfcRectangularTrimmedSurface - SUBTYPE OF (IfcBoundedSurface); - BasisSurface : IfcSurface; - U1 : IfcParameterValue; - V1 : IfcParameterValue; - U2 : IfcParameterValue; - V2 : IfcParameterValue; - Usense : IfcBoolean; - Vsense : IfcBoolean; - WHERE - U1AndU2Different : U1 <> U2; - V1AndV2Different : V1 <> V2; - UsenseCompatible : (('IFC4.IFCELEMENTARYSURFACE' IN TYPEOF(BasisSurface)) AND - (NOT ('IFC4.IFCPLANE' IN TYPEOF(BasisSurface)))) OR - ('IFC4.IFCSURFACEOFREVOLUTION' IN TYPEOF(BasisSurface)) OR - (Usense = (U2 > U1)); - VsenseCompatible : Vsense = (V2 > V1); -END_ENTITY; - -ENTITY IfcRecurrencePattern; - RecurrenceType : IfcRecurrenceTypeEnum; - DayComponent : OPTIONAL SET [1:?] OF IfcDayInMonthNumber; - WeekdayComponent : OPTIONAL SET [1:?] OF IfcDayInWeekNumber; - MonthComponent : OPTIONAL SET [1:?] OF IfcMonthInYearNumber; - Position : OPTIONAL IfcInteger; - Interval : OPTIONAL IfcInteger; - Occurrences : OPTIONAL IfcInteger; - TimePeriods : OPTIONAL LIST [1:?] OF IfcTimePeriod; -END_ENTITY; - -ENTITY IfcReference; - TypeIdentifier : OPTIONAL IfcIdentifier; - AttributeIdentifier : OPTIONAL IfcIdentifier; - InstanceName : OPTIONAL IfcLabel; - ListPositions : OPTIONAL LIST [1:?] OF IfcInteger; - InnerReference : OPTIONAL IfcReference; -END_ENTITY; - -ENTITY IfcRegularTimeSeries - SUBTYPE OF (IfcTimeSeries); - TimeStep : IfcTimeMeasure; - Values : LIST [1:?] OF IfcTimeSeriesValue; -END_ENTITY; - -ENTITY IfcReinforcementBarProperties - SUBTYPE OF (IfcPreDefinedProperties); - TotalCrossSectionArea : IfcAreaMeasure; - SteelGrade : IfcLabel; - BarSurface : OPTIONAL IfcReinforcingBarSurfaceEnum; - EffectiveDepth : OPTIONAL IfcLengthMeasure; - NominalBarDiameter : OPTIONAL IfcPositiveLengthMeasure; - BarCount : OPTIONAL IfcCountMeasure; -END_ENTITY; - -ENTITY IfcReinforcementDefinitionProperties - SUBTYPE OF (IfcPreDefinedPropertySet); - DefinitionType : OPTIONAL IfcLabel; - ReinforcementSectionDefinitions : LIST [1:?] OF IfcSectionReinforcementProperties; -END_ENTITY; - -ENTITY IfcReinforcingBar - SUBTYPE OF (IfcReinforcingElement); - NominalDiameter : OPTIONAL IfcPositiveLengthMeasure; - CrossSectionArea : OPTIONAL IfcAreaMeasure; - BarLength : OPTIONAL IfcPositiveLengthMeasure; - PredefinedType : OPTIONAL IfcReinforcingBarTypeEnum; - BarSurface : OPTIONAL IfcReinforcingBarSurfaceEnum; - WHERE - CorrectPredefinedType : NOT EXISTS(PredefinedType) OR -(PredefinedType <> IfcReinforcingBarTypeEnum.USERDEFINED) OR -((PredefinedType = IfcReinforcingBarTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR -('IFC4.IFCREINFORCINGBARTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcReinforcingBarType - SUBTYPE OF (IfcReinforcingElementType); - PredefinedType : IfcReinforcingBarTypeEnum; - NominalDiameter : OPTIONAL IfcPositiveLengthMeasure; - CrossSectionArea : OPTIONAL IfcAreaMeasure; - BarLength : OPTIONAL IfcPositiveLengthMeasure; - BarSurface : OPTIONAL IfcReinforcingBarSurfaceEnum; - BendingShapeCode : OPTIONAL IfcLabel; - BendingParameters : OPTIONAL LIST [1:?] OF IfcBendingParameterSelect; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcReinforcingBarTypeEnum.USERDEFINED) OR -((PredefinedType = IfcReinforcingBarTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); - BendingShapeCodeProvided : NOT EXISTS(BendingParameters) OR EXISTS(BendingShapeCode); -END_ENTITY; - -ENTITY IfcReinforcingElement - ABSTRACT SUPERTYPE OF (ONEOF - (IfcReinforcingBar - ,IfcReinforcingMesh - ,IfcTendon - ,IfcTendonAnchor)) - SUBTYPE OF (IfcElementComponent); - SteelGrade : OPTIONAL IfcLabel; -END_ENTITY; - -ENTITY IfcReinforcingElementType - ABSTRACT SUPERTYPE OF (ONEOF - (IfcReinforcingBarType - ,IfcReinforcingMeshType - ,IfcTendonAnchorType - ,IfcTendonType)) - SUBTYPE OF (IfcElementComponentType); -END_ENTITY; - -ENTITY IfcReinforcingMesh - SUBTYPE OF (IfcReinforcingElement); - MeshLength : OPTIONAL IfcPositiveLengthMeasure; - MeshWidth : OPTIONAL IfcPositiveLengthMeasure; - LongitudinalBarNominalDiameter : OPTIONAL IfcPositiveLengthMeasure; - TransverseBarNominalDiameter : OPTIONAL IfcPositiveLengthMeasure; - LongitudinalBarCrossSectionArea : OPTIONAL IfcAreaMeasure; - TransverseBarCrossSectionArea : OPTIONAL IfcAreaMeasure; - LongitudinalBarSpacing : OPTIONAL IfcPositiveLengthMeasure; - TransverseBarSpacing : OPTIONAL IfcPositiveLengthMeasure; - PredefinedType : OPTIONAL IfcReinforcingMeshTypeEnum; - WHERE - CorrectPredefinedType : NOT EXISTS(PredefinedType) OR -(PredefinedType <> IfcReinforcingMeshTypeEnum.USERDEFINED) OR -((PredefinedType = IfcReinforcingMeshTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR -('IFC4.IFCREINFORCINGMESHTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcReinforcingMeshType - SUBTYPE OF (IfcReinforcingElementType); - PredefinedType : IfcReinforcingMeshTypeEnum; - MeshLength : OPTIONAL IfcPositiveLengthMeasure; - MeshWidth : OPTIONAL IfcPositiveLengthMeasure; - LongitudinalBarNominalDiameter : OPTIONAL IfcPositiveLengthMeasure; - TransverseBarNominalDiameter : OPTIONAL IfcPositiveLengthMeasure; - LongitudinalBarCrossSectionArea : OPTIONAL IfcAreaMeasure; - TransverseBarCrossSectionArea : OPTIONAL IfcAreaMeasure; - LongitudinalBarSpacing : OPTIONAL IfcPositiveLengthMeasure; - TransverseBarSpacing : OPTIONAL IfcPositiveLengthMeasure; - BendingShapeCode : OPTIONAL IfcLabel; - BendingParameters : OPTIONAL LIST [1:?] OF IfcBendingParameterSelect; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcReinforcingMeshTypeEnum.USERDEFINED) OR -((PredefinedType = IfcReinforcingMeshTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); - BendingShapeCodeProvided : NOT EXISTS(BendingParameters) OR EXISTS(BendingShapeCode); -END_ENTITY; - -ENTITY IfcRelAggregates - SUBTYPE OF (IfcRelDecomposes); - RelatingObject : IfcObjectDefinition; - RelatedObjects : SET [1:?] OF IfcObjectDefinition; - WHERE - NoSelfReference : SIZEOF(QUERY(Temp <* RelatedObjects | RelatingObject :=: Temp)) = 0; -END_ENTITY; - -ENTITY IfcRelAssigns - ABSTRACT SUPERTYPE OF (ONEOF - (IfcRelAssignsToActor - ,IfcRelAssignsToControl - ,IfcRelAssignsToGroup - ,IfcRelAssignsToProcess - ,IfcRelAssignsToProduct - ,IfcRelAssignsToResource)) - SUBTYPE OF (IfcRelationship); - RelatedObjects : SET [1:?] OF IfcObjectDefinition; - RelatedObjectsType : OPTIONAL IfcObjectTypeEnum; - WHERE - WR1 : IfcCorrectObjectAssignment(RelatedObjectsType, RelatedObjects); -END_ENTITY; - -ENTITY IfcRelAssignsToActor - SUBTYPE OF (IfcRelAssigns); - RelatingActor : IfcActor; - ActingRole : OPTIONAL IfcActorRole; - WHERE - NoSelfReference : SIZEOF(QUERY(Temp <* SELF\IfcRelAssigns.RelatedObjects | RelatingActor :=: Temp)) = 0; -END_ENTITY; - -ENTITY IfcRelAssignsToControl - SUBTYPE OF (IfcRelAssigns); - RelatingControl : IfcControl; - WHERE - NoSelfReference : SIZEOF(QUERY(Temp <* SELF\IfcRelAssigns.RelatedObjects | RelatingControl :=: Temp)) = 0; -END_ENTITY; - -ENTITY IfcRelAssignsToGroup - SUPERTYPE OF (ONEOF - (IfcRelAssignsToGroupByFactor)) - SUBTYPE OF (IfcRelAssigns); - RelatingGroup : IfcGroup; - WHERE - NoSelfReference : SIZEOF(QUERY(Temp <* SELF\IfcRelAssigns.RelatedObjects | RelatingGroup :=: Temp)) = 0; -END_ENTITY; - -ENTITY IfcRelAssignsToGroupByFactor - SUBTYPE OF (IfcRelAssignsToGroup); - Factor : IfcRatioMeasure; -END_ENTITY; - -ENTITY IfcRelAssignsToProcess - SUBTYPE OF (IfcRelAssigns); - RelatingProcess : IfcProcessSelect; - QuantityInProcess : OPTIONAL IfcMeasureWithUnit; - WHERE - NoSelfReference : SIZEOF(QUERY(Temp <* SELF\IfcRelAssigns.RelatedObjects | RelatingProcess :=: Temp)) = 0; -END_ENTITY; - -ENTITY IfcRelAssignsToProduct - SUBTYPE OF (IfcRelAssigns); - RelatingProduct : IfcProductSelect; - WHERE - NoSelfReference : SIZEOF(QUERY(Temp <* SELF\IfcRelAssigns.RelatedObjects | RelatingProduct :=: Temp)) = 0; -END_ENTITY; - -ENTITY IfcRelAssignsToResource - SUBTYPE OF (IfcRelAssigns); - RelatingResource : IfcResourceSelect; - WHERE - NoSelfReference : SIZEOF(QUERY(Temp <* SELF\IfcRelAssigns.RelatedObjects | RelatingResource :=: Temp)) = 0; -END_ENTITY; - -ENTITY IfcRelAssociates - ABSTRACT SUPERTYPE OF (ONEOF - (IfcRelAssociatesApproval - ,IfcRelAssociatesClassification - ,IfcRelAssociatesConstraint - ,IfcRelAssociatesDocument - ,IfcRelAssociatesLibrary - ,IfcRelAssociatesMaterial)) - SUBTYPE OF (IfcRelationship); - RelatedObjects : SET [1:?] OF IfcDefinitionSelect; -END_ENTITY; - -ENTITY IfcRelAssociatesApproval - SUBTYPE OF (IfcRelAssociates); - RelatingApproval : IfcApproval; -END_ENTITY; - -ENTITY IfcRelAssociatesClassification - SUBTYPE OF (IfcRelAssociates); - RelatingClassification : IfcClassificationSelect; -END_ENTITY; - -ENTITY IfcRelAssociatesConstraint - SUBTYPE OF (IfcRelAssociates); - Intent : OPTIONAL IfcLabel; - RelatingConstraint : IfcConstraint; -END_ENTITY; - -ENTITY IfcRelAssociatesDocument - SUBTYPE OF (IfcRelAssociates); - RelatingDocument : IfcDocumentSelect; -END_ENTITY; - -ENTITY IfcRelAssociatesLibrary - SUBTYPE OF (IfcRelAssociates); - RelatingLibrary : IfcLibrarySelect; -END_ENTITY; - -ENTITY IfcRelAssociatesMaterial - SUBTYPE OF (IfcRelAssociates); - RelatingMaterial : IfcMaterialSelect; - WHERE - NoVoidElement : SIZEOF(QUERY(temp <* SELF\IfcRelAssociates.RelatedObjects | - ('IFC4.IFCFEATUREELEMENTSUBTRACTION' IN TYPEOF(temp)) OR - ('IFC4.IFCVIRTUALELEMENT' IN TYPEOF(temp)) -)) = 0; - AllowedElements : SIZEOF(QUERY(temp <* SELF\IfcRelAssociates.RelatedObjects | ( - SIZEOF(TYPEOF(temp) * [ - 'IFC4.IFCELEMENT', - 'IFC4.IFCELEMENTTYPE', - 'IFC4.IFCWINDOWSTYLE', - 'IFC4.IFCDOORSTYLE', - 'IFC4.IFCSTRUCTURALMEMBER', - 'IFC4.IFCPORT']) = 0) -)) = 0; -END_ENTITY; - -ENTITY IfcRelConnects - ABSTRACT SUPERTYPE OF (ONEOF - (IfcRelConnectsElements - ,IfcRelConnectsPortToElement - ,IfcRelConnectsPorts - ,IfcRelConnectsStructuralActivity - ,IfcRelConnectsStructuralMember - ,IfcRelContainedInSpatialStructure - ,IfcRelCoversBldgElements - ,IfcRelCoversSpaces - ,IfcRelFillsElement - ,IfcRelFlowControlElements - ,IfcRelInterferesElements - ,IfcRelReferencedInSpatialStructure - ,IfcRelSequence - ,IfcRelServicesBuildings - ,IfcRelSpaceBoundary)) - SUBTYPE OF (IfcRelationship); -END_ENTITY; - -ENTITY IfcRelConnectsElements - SUPERTYPE OF (ONEOF - (IfcRelConnectsPathElements - ,IfcRelConnectsWithRealizingElements)) - SUBTYPE OF (IfcRelConnects); - ConnectionGeometry : OPTIONAL IfcConnectionGeometry; - RelatingElement : IfcElement; - RelatedElement : IfcElement; - WHERE - NoSelfReference : RelatingElement :<>: RelatedElement; -END_ENTITY; - -ENTITY IfcRelConnectsPathElements - SUBTYPE OF (IfcRelConnectsElements); - RelatingPriorities : LIST [0:?] OF IfcInteger; - RelatedPriorities : LIST [0:?] OF IfcInteger; - RelatedConnectionType : IfcConnectionTypeEnum; - RelatingConnectionType : IfcConnectionTypeEnum; - WHERE - NormalizedRelatingPriorities : (SIZEOF(RelatingPriorities) = 0) -OR -(SIZEOF (QUERY (temp <* RelatingPriorities - | {0 <= temp <= 100} - )) = SIZEOF(RelatingPriorities)); - NormalizedRelatedPriorities : (SIZEOF(RelatedPriorities) = 0) -OR -(SIZEOF (QUERY (temp <* RelatedPriorities - | {0 <= temp <= 100} - )) = SIZEOF(RelatedPriorities)); -END_ENTITY; - -ENTITY IfcRelConnectsPortToElement - SUBTYPE OF (IfcRelConnects); - RelatingPort : IfcPort; - RelatedElement : IfcDistributionElement; -END_ENTITY; - -ENTITY IfcRelConnectsPorts - SUBTYPE OF (IfcRelConnects); - RelatingPort : IfcPort; - RelatedPort : IfcPort; - RealizingElement : OPTIONAL IfcElement; - WHERE - NoSelfReference : RelatingPort :<>: RelatedPort; -END_ENTITY; - -ENTITY IfcRelConnectsStructuralActivity - SUBTYPE OF (IfcRelConnects); - RelatingElement : IfcStructuralActivityAssignmentSelect; - RelatedStructuralActivity : IfcStructuralActivity; -END_ENTITY; - -ENTITY IfcRelConnectsStructuralMember - SUPERTYPE OF (ONEOF - (IfcRelConnectsWithEccentricity)) - SUBTYPE OF (IfcRelConnects); - RelatingStructuralMember : IfcStructuralMember; - RelatedStructuralConnection : IfcStructuralConnection; - AppliedCondition : OPTIONAL IfcBoundaryCondition; - AdditionalConditions : OPTIONAL IfcStructuralConnectionCondition; - SupportedLength : OPTIONAL IfcLengthMeasure; - ConditionCoordinateSystem : OPTIONAL IfcAxis2Placement3D; -END_ENTITY; - -ENTITY IfcRelConnectsWithEccentricity - SUBTYPE OF (IfcRelConnectsStructuralMember); - ConnectionConstraint : IfcConnectionGeometry; -END_ENTITY; - -ENTITY IfcRelConnectsWithRealizingElements - SUBTYPE OF (IfcRelConnectsElements); - RealizingElements : SET [1:?] OF IfcElement; - ConnectionType : OPTIONAL IfcLabel; -END_ENTITY; - -ENTITY IfcRelContainedInSpatialStructure - SUBTYPE OF (IfcRelConnects); - RelatedElements : SET [1:?] OF IfcProduct; - RelatingStructure : IfcSpatialElement; - WHERE - WR31 : SIZEOF(QUERY(temp <* RelatedElements | 'IFC4.IFCSPATIALSTRUCTUREELEMENT' IN TYPEOF(temp))) = 0; -END_ENTITY; - -ENTITY IfcRelCoversBldgElements - SUBTYPE OF (IfcRelConnects); - RelatingBuildingElement : IfcElement; - RelatedCoverings : SET [1:?] OF IfcCovering; -END_ENTITY; - -ENTITY IfcRelCoversSpaces - SUBTYPE OF (IfcRelConnects); - RelatingSpace : IfcSpace; - RelatedCoverings : SET [1:?] OF IfcCovering; -END_ENTITY; - -ENTITY IfcRelDeclares - SUBTYPE OF (IfcRelationship); - RelatingContext : IfcContext; - RelatedDefinitions : SET [1:?] OF IfcDefinitionSelect; - WHERE - NoSelfReference : SIZEOF(QUERY(Temp <* RelatedDefinitions | RelatingContext :=: Temp)) = 0; -END_ENTITY; - -ENTITY IfcRelDecomposes - ABSTRACT SUPERTYPE OF (ONEOF - (IfcRelAggregates - ,IfcRelNests - ,IfcRelProjectsElement - ,IfcRelVoidsElement)) - SUBTYPE OF (IfcRelationship); -END_ENTITY; - -ENTITY IfcRelDefines - ABSTRACT SUPERTYPE OF (ONEOF - (IfcRelDefinesByObject - ,IfcRelDefinesByProperties - ,IfcRelDefinesByTemplate - ,IfcRelDefinesByType)) - SUBTYPE OF (IfcRelationship); -END_ENTITY; - -ENTITY IfcRelDefinesByObject - SUBTYPE OF (IfcRelDefines); - RelatedObjects : SET [1:?] OF IfcObject; - RelatingObject : IfcObject; -END_ENTITY; - -ENTITY IfcRelDefinesByProperties - SUBTYPE OF (IfcRelDefines); - RelatedObjects : SET [1:?] OF IfcObjectDefinition; - RelatingPropertyDefinition : IfcPropertySetDefinitionSelect; - WHERE - NoRelatedTypeObject : SIZEOF(QUERY(Types <* SELF\IfcRelDefinesByProperties.RelatedObjects | 'IFC4.IFCTYPEOBJECT' IN TYPEOF(Types))) = 0; -END_ENTITY; - -ENTITY IfcRelDefinesByTemplate - SUBTYPE OF (IfcRelDefines); - RelatedPropertySets : SET [1:?] OF IfcPropertySetDefinition; - RelatingTemplate : IfcPropertySetTemplate; -END_ENTITY; - -ENTITY IfcRelDefinesByType - SUBTYPE OF (IfcRelDefines); - RelatedObjects : SET [1:?] OF IfcObject; - RelatingType : IfcTypeObject; -END_ENTITY; - -ENTITY IfcRelFillsElement - SUBTYPE OF (IfcRelConnects); - RelatingOpeningElement : IfcOpeningElement; - RelatedBuildingElement : IfcElement; -END_ENTITY; - -ENTITY IfcRelFlowControlElements - SUBTYPE OF (IfcRelConnects); - RelatedControlElements : SET [1:?] OF IfcDistributionControlElement; - RelatingFlowElement : IfcDistributionFlowElement; -END_ENTITY; - -ENTITY IfcRelInterferesElements - SUBTYPE OF (IfcRelConnects); - RelatingElement : IfcElement; - RelatedElement : IfcElement; - InterferenceGeometry : OPTIONAL IfcConnectionGeometry; - InterferenceType : OPTIONAL IfcIdentifier; - ImpliedOrder : LOGICAL; - WHERE - NotSelfReference : RelatingElement :<>: RelatedElement; -END_ENTITY; - -ENTITY IfcRelNests - SUBTYPE OF (IfcRelDecomposes); - RelatingObject : IfcObjectDefinition; - RelatedObjects : LIST [1:?] OF IfcObjectDefinition; - WHERE - NoSelfReference : SIZEOF(QUERY(Temp <* RelatedObjects | RelatingObject :=: Temp)) = 0; -END_ENTITY; - -ENTITY IfcRelProjectsElement - SUBTYPE OF (IfcRelDecomposes); - RelatingElement : IfcElement; - RelatedFeatureElement : IfcFeatureElementAddition; -END_ENTITY; - -ENTITY IfcRelReferencedInSpatialStructure - SUBTYPE OF (IfcRelConnects); - RelatedElements : SET [1:?] OF IfcProduct; - RelatingStructure : IfcSpatialElement; - WHERE - AllowedRelatedElements : SIZEOF(QUERY(temp <* RelatedElements | ('IFC4.IFCSPATIALSTRUCTUREELEMENT' IN TYPEOF(temp)) AND (NOT ('IFC4.IFCSPACE' IN TYPEOF(temp))) -)) = 0; -END_ENTITY; - -ENTITY IfcRelSequence - SUBTYPE OF (IfcRelConnects); - RelatingProcess : IfcProcess; - RelatedProcess : IfcProcess; - TimeLag : OPTIONAL IfcLagTime; - SequenceType : OPTIONAL IfcSequenceEnum; - UserDefinedSequenceType : OPTIONAL IfcLabel; - WHERE - AvoidInconsistentSequence : RelatingProcess :<>: RelatedProcess; - CorrectSequenceType : (SequenceType <> IfcSequenceEnum.USERDEFINED) OR ((SequenceType = IfcSequenceEnum.USERDEFINED) AND EXISTS(UserDefinedSequenceType)); -END_ENTITY; - -ENTITY IfcRelServicesBuildings - SUBTYPE OF (IfcRelConnects); - RelatingSystem : IfcSystem; - RelatedBuildings : SET [1:?] OF IfcSpatialElement; -END_ENTITY; - -ENTITY IfcRelSpaceBoundary - SUPERTYPE OF (ONEOF - (IfcRelSpaceBoundary1stLevel)) - SUBTYPE OF (IfcRelConnects); - RelatingSpace : IfcSpaceBoundarySelect; - RelatedBuildingElement : IfcElement; - ConnectionGeometry : OPTIONAL IfcConnectionGeometry; - PhysicalOrVirtualBoundary : IfcPhysicalOrVirtualEnum; - InternalOrExternalBoundary : IfcInternalOrExternalEnum; - WHERE - CorrectPhysOrVirt : ((PhysicalOrVirtualBoundary = IfcPhysicalOrVirtualEnum.Physical) - AND (NOT('IFC4.IFCVIRTUALELEMENT' IN TYPEOF(RelatedBuildingElement)))) -OR -((PhysicalOrVirtualBoundary = IfcPhysicalOrVirtualEnum.Virtual) - AND (('IFC4.IFCVIRTUALELEMENT' IN TYPEOF(RelatedBuildingElement)) - OR ('IFC4.IFCOPENINGELEMENT' IN TYPEOF(RelatedBuildingElement)))) -OR -(PhysicalOrVirtualBoundary = IfcPhysicalOrVirtualEnum.NotDefined); -END_ENTITY; - -ENTITY IfcRelSpaceBoundary1stLevel - SUPERTYPE OF (ONEOF - (IfcRelSpaceBoundary2ndLevel)) - SUBTYPE OF (IfcRelSpaceBoundary); - ParentBoundary : OPTIONAL IfcRelSpaceBoundary1stLevel; - INVERSE - InnerBoundaries : SET [0:?] OF IfcRelSpaceBoundary1stLevel FOR ParentBoundary; -END_ENTITY; - -ENTITY IfcRelSpaceBoundary2ndLevel - SUBTYPE OF (IfcRelSpaceBoundary1stLevel); - CorrespondingBoundary : OPTIONAL IfcRelSpaceBoundary2ndLevel; - INVERSE - Corresponds : SET [0:1] OF IfcRelSpaceBoundary2ndLevel FOR CorrespondingBoundary; -END_ENTITY; - -ENTITY IfcRelVoidsElement - SUBTYPE OF (IfcRelDecomposes); - RelatingBuildingElement : IfcElement; - RelatedOpeningElement : IfcFeatureElementSubtraction; -END_ENTITY; - -ENTITY IfcRelationship - ABSTRACT SUPERTYPE OF (ONEOF - (IfcRelAssigns - ,IfcRelAssociates - ,IfcRelConnects - ,IfcRelDeclares - ,IfcRelDecomposes - ,IfcRelDefines)) - SUBTYPE OF (IfcRoot); -END_ENTITY; - -ENTITY IfcReparametrisedCompositeCurveSegment - SUBTYPE OF (IfcCompositeCurveSegment); - ParamLength : IfcParameterValue; - WHERE - PositiveLengthParameter : ParamLength > 0.0; -END_ENTITY; - -ENTITY IfcRepresentation - ABSTRACT SUPERTYPE OF (ONEOF - (IfcShapeModel - ,IfcStyleModel)); - ContextOfItems : IfcRepresentationContext; - RepresentationIdentifier : OPTIONAL IfcLabel; - RepresentationType : OPTIONAL IfcLabel; - Items : SET [1:?] OF IfcRepresentationItem; - INVERSE - RepresentationMap : SET [0:1] OF IfcRepresentationMap FOR MappedRepresentation; - LayerAssignments : SET [0:?] OF IfcPresentationLayerAssignment FOR AssignedItems; - OfProductRepresentation : SET [0:?] OF IfcProductRepresentation FOR Representations; -END_ENTITY; - -ENTITY IfcRepresentationContext - ABSTRACT SUPERTYPE OF (ONEOF - (IfcGeometricRepresentationContext)); - ContextIdentifier : OPTIONAL IfcLabel; - ContextType : OPTIONAL IfcLabel; - INVERSE - RepresentationsInContext : SET [0:?] OF IfcRepresentation FOR ContextOfItems; -END_ENTITY; - -ENTITY IfcRepresentationItem - ABSTRACT SUPERTYPE OF (ONEOF - (IfcGeometricRepresentationItem - ,IfcMappedItem - ,IfcStyledItem - ,IfcTopologicalRepresentationItem)); - INVERSE - LayerAssignment : SET [0:1] OF IfcPresentationLayerAssignment FOR AssignedItems; - StyledByItem : SET [0:1] OF IfcStyledItem FOR Item; -END_ENTITY; - -ENTITY IfcRepresentationMap; - MappingOrigin : IfcAxis2Placement; - MappedRepresentation : IfcRepresentation; - INVERSE - HasShapeAspects : SET [0:?] OF IfcShapeAspect FOR PartOfProductDefinitionShape; - MapUsage : SET [0:?] OF IfcMappedItem FOR MappingSource; - WHERE - ApplicableMappedRepr : 'IFC4.IFCSHAPEMODEL' IN TYPEOF(MappedRepresentation); -END_ENTITY; - -ENTITY IfcResource - ABSTRACT SUPERTYPE OF (ONEOF - (IfcConstructionResource)) - SUBTYPE OF (IfcObject); - Identification : OPTIONAL IfcIdentifier; - LongDescription : OPTIONAL IfcText; - INVERSE - ResourceOf : SET [0:?] OF IfcRelAssignsToResource FOR RelatingResource; -END_ENTITY; - -ENTITY IfcResourceApprovalRelationship - SUBTYPE OF (IfcResourceLevelRelationship); - RelatedResourceObjects : SET [1:?] OF IfcResourceObjectSelect; - RelatingApproval : IfcApproval; -END_ENTITY; - -ENTITY IfcResourceConstraintRelationship - SUBTYPE OF (IfcResourceLevelRelationship); - RelatingConstraint : IfcConstraint; - RelatedResourceObjects : SET [1:?] OF IfcResourceObjectSelect; -END_ENTITY; - -ENTITY IfcResourceLevelRelationship - ABSTRACT SUPERTYPE OF (ONEOF - (IfcApprovalRelationship - ,IfcCurrencyRelationship - ,IfcDocumentInformationRelationship - ,IfcExternalReferenceRelationship - ,IfcMaterialRelationship - ,IfcOrganizationRelationship - ,IfcPropertyDependencyRelationship - ,IfcResourceApprovalRelationship - ,IfcResourceConstraintRelationship)); - Name : OPTIONAL IfcLabel; - Description : OPTIONAL IfcText; -END_ENTITY; - -ENTITY IfcResourceTime - SUBTYPE OF (IfcSchedulingTime); - ScheduleWork : OPTIONAL IfcDuration; - ScheduleUsage : OPTIONAL IfcPositiveRatioMeasure; - ScheduleStart : OPTIONAL IfcDateTime; - ScheduleFinish : OPTIONAL IfcDateTime; - ScheduleContour : OPTIONAL IfcLabel; - LevelingDelay : OPTIONAL IfcDuration; - IsOverAllocated : OPTIONAL IfcBoolean; - StatusTime : OPTIONAL IfcDateTime; - ActualWork : OPTIONAL IfcDuration; - ActualUsage : OPTIONAL IfcPositiveRatioMeasure; - ActualStart : OPTIONAL IfcDateTime; - ActualFinish : OPTIONAL IfcDateTime; - RemainingWork : OPTIONAL IfcDuration; - RemainingUsage : OPTIONAL IfcPositiveRatioMeasure; - Completion : OPTIONAL IfcPositiveRatioMeasure; -END_ENTITY; - -ENTITY IfcRevolvedAreaSolid - SUPERTYPE OF (ONEOF - (IfcRevolvedAreaSolidTapered)) - SUBTYPE OF (IfcSweptAreaSolid); - Axis : IfcAxis1Placement; - Angle : IfcPlaneAngleMeasure; - DERIVE - AxisLine : IfcLine := IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcCurve() || IfcLine(Axis.Location, - IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcVector(Axis.Z,1.0)); - WHERE - AxisStartInXY : Axis.Location.Coordinates[3] = 0.0; - AxisDirectionInXY : Axis.Z.DirectionRatios[3] = 0.0; -END_ENTITY; - -ENTITY IfcRevolvedAreaSolidTapered - SUBTYPE OF (IfcRevolvedAreaSolid); - EndSweptArea : IfcProfileDef; - WHERE - CorrectProfileAssignment : IfcTaperedSweptAreaProfiles(SELF\IfcSweptAreaSolid.SweptArea, SELF.EndSweptArea); -END_ENTITY; - -ENTITY IfcRightCircularCone - SUBTYPE OF (IfcCsgPrimitive3D); - Height : IfcPositiveLengthMeasure; - BottomRadius : IfcPositiveLengthMeasure; -END_ENTITY; - -ENTITY IfcRightCircularCylinder - SUBTYPE OF (IfcCsgPrimitive3D); - Height : IfcPositiveLengthMeasure; - Radius : IfcPositiveLengthMeasure; -END_ENTITY; - -ENTITY IfcRoof - SUBTYPE OF (IfcBuildingElement); - PredefinedType : OPTIONAL IfcRoofTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcRoofTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcRoofTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCROOFTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcRoofType - SUBTYPE OF (IfcBuildingElementType); - PredefinedType : IfcRoofTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcRoofTypeEnum.USERDEFINED) OR -((PredefinedType = IfcRoofTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcRoot - ABSTRACT SUPERTYPE OF (ONEOF - (IfcObjectDefinition - ,IfcPropertyDefinition - ,IfcRelationship)); - GlobalId : IfcGloballyUniqueId; - OwnerHistory : OPTIONAL IfcOwnerHistory; - Name : OPTIONAL IfcLabel; - Description : OPTIONAL IfcText; - UNIQUE - UR1 : GlobalId; -END_ENTITY; - -ENTITY IfcRoundedRectangleProfileDef - SUBTYPE OF (IfcRectangleProfileDef); - RoundingRadius : IfcPositiveLengthMeasure; - WHERE - ValidRadius : ((RoundingRadius <= (SELF\IfcRectangleProfileDef.XDim/2.)) AND - (RoundingRadius <= (SELF\IfcRectangleProfileDef.YDim/2.))); -END_ENTITY; - -ENTITY IfcSIUnit - SUBTYPE OF (IfcNamedUnit); - Prefix : OPTIONAL IfcSIPrefix; - Name : IfcSIUnitName; - DERIVE - SELF\IfcNamedUnit.Dimensions : IfcDimensionalExponents := IfcDimensionsForSiUnit (SELF.Name); -END_ENTITY; - -ENTITY IfcSanitaryTerminal - SUBTYPE OF (IfcFlowTerminal); - PredefinedType : OPTIONAL IfcSanitaryTerminalTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcSanitaryTerminalTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcSanitaryTerminalTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCSANITARYTERMINALTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcSanitaryTerminalType - SUBTYPE OF (IfcFlowTerminalType); - PredefinedType : IfcSanitaryTerminalTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcSanitaryTerminalTypeEnum.USERDEFINED) OR -((PredefinedType = IfcSanitaryTerminalTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcSchedulingTime - ABSTRACT SUPERTYPE OF (ONEOF - (IfcEventTime - ,IfcLagTime - ,IfcResourceTime - ,IfcTaskTime - ,IfcWorkTime)); - Name : OPTIONAL IfcLabel; - DataOrigin : OPTIONAL IfcDataOriginEnum; - UserDefinedDataOrigin : OPTIONAL IfcLabel; -END_ENTITY; - -ENTITY IfcSeamCurve - SUBTYPE OF (IfcSurfaceCurve); - WHERE - TwoPCurves : SIZEOF(SELF\IfcSurfaceCurve.AssociatedGeometry) = 2; - SameSurface : IfcAssociatedSurface(SELF\IfcSurfaceCurve.AssociatedGeometry[1]) = IfcAssociatedSurface(SELF\IfcSurfaceCurve.AssociatedGeometry[2]); -END_ENTITY; - -ENTITY IfcSectionProperties - SUBTYPE OF (IfcPreDefinedProperties); - SectionType : IfcSectionTypeEnum; - StartProfile : IfcProfileDef; - EndProfile : OPTIONAL IfcProfileDef; -END_ENTITY; - -ENTITY IfcSectionReinforcementProperties - SUBTYPE OF (IfcPreDefinedProperties); - LongitudinalStartPosition : IfcLengthMeasure; - LongitudinalEndPosition : IfcLengthMeasure; - TransversePosition : OPTIONAL IfcLengthMeasure; - ReinforcementRole : IfcReinforcingBarRoleEnum; - SectionDefinition : IfcSectionProperties; - CrossSectionReinforcementDefinitions : SET [1:?] OF IfcReinforcementBarProperties; -END_ENTITY; - -ENTITY IfcSectionedSpine - SUBTYPE OF (IfcGeometricRepresentationItem); - SpineCurve : IfcCompositeCurve; - CrossSections : LIST [2:?] OF IfcProfileDef; - CrossSectionPositions : LIST [2:?] OF IfcAxis2Placement3D; - DERIVE - Dim : IfcDimensionCount := 3; - WHERE - CorrespondingSectionPositions : SIZEOF(CrossSections) = SIZEOF(CrossSectionPositions); - ConsistentProfileTypes : SIZEOF(QUERY(temp <* CrossSections | CrossSections[1].ProfileType <> temp.ProfileType)) = 0; - SpineCurveDim : SpineCurve.Dim = 3; -END_ENTITY; - -ENTITY IfcSensor - SUBTYPE OF (IfcDistributionControlElement); - PredefinedType : OPTIONAL IfcSensorTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcSensorTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcSensorTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR -('IFC4.IFCSENSORTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcSensorType - SUBTYPE OF (IfcDistributionControlElementType); - PredefinedType : IfcSensorTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcSensorTypeEnum.USERDEFINED) OR -((PredefinedType = IfcSensorTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcShadingDevice - SUBTYPE OF (IfcBuildingElement); - PredefinedType : OPTIONAL IfcShadingDeviceTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcShadingDeviceTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcShadingDeviceTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCSHADINGDEVICETYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcShadingDeviceType - SUBTYPE OF (IfcBuildingElementType); - PredefinedType : IfcShadingDeviceTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcShadingDeviceTypeEnum.USERDEFINED) OR -((PredefinedType = IfcShadingDeviceTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcShapeAspect; - ShapeRepresentations : LIST [1:?] OF IfcShapeModel; - Name : OPTIONAL IfcLabel; - Description : OPTIONAL IfcText; - ProductDefinitional : IfcLogical; - PartOfProductDefinitionShape : OPTIONAL IfcProductRepresentationSelect; -END_ENTITY; - -ENTITY IfcShapeModel - ABSTRACT SUPERTYPE OF (ONEOF - (IfcShapeRepresentation - ,IfcTopologyRepresentation)) - SUBTYPE OF (IfcRepresentation); - INVERSE - OfShapeAspect : SET [0:1] OF IfcShapeAspect FOR ShapeRepresentations; - WHERE - WR11 : (SIZEOF(SELF\IfcRepresentation.OfProductRepresentation) = 1) XOR -(SIZEOF(SELF\IfcRepresentation.RepresentationMap) = 1) XOR -(SIZEOF(OfShapeAspect) = 1); -END_ENTITY; - -ENTITY IfcShapeRepresentation - SUBTYPE OF (IfcShapeModel); - WHERE - CorrectContext : 'IFC4.IFCGEOMETRICREPRESENTATIONCONTEXT' -IN TYPEOF(SELF\IfcRepresentation.ContextOfItems); - NoTopologicalItem : SIZEOF(QUERY(temp <* Items | - ('IFC4.IFCTOPOLOGICALREPRESENTATIONITEM' IN TYPEOF(temp)) - AND (NOT(SIZEOF( - ['IFC4.IFCVERTEXPOINT', - 'IFC4.IFCEDGECURVE', - 'IFC4.IFCFACESURFACE'] * TYPEOF(temp)) = 1)) -)) = 0; - HasRepresentationType : EXISTS(SELF\IfcRepresentation.RepresentationType); - HasRepresentationIdentifier : EXISTS(SELF\IfcRepresentation.RepresentationIdentifier); - CorrectItemsForType : IfcShapeRepresentationTypes(SELF\IfcRepresentation.RepresentationType, SELF\IfcRepresentation.Items); -END_ENTITY; - -ENTITY IfcShellBasedSurfaceModel - SUBTYPE OF (IfcGeometricRepresentationItem); - SbsmBoundary : SET [1:?] OF IfcShell; - DERIVE - Dim : IfcDimensionCount := 3; -END_ENTITY; - -ENTITY IfcSimpleProperty - ABSTRACT SUPERTYPE OF (ONEOF - (IfcPropertyBoundedValue - ,IfcPropertyEnumeratedValue - ,IfcPropertyListValue - ,IfcPropertyReferenceValue - ,IfcPropertySingleValue - ,IfcPropertyTableValue)) - SUBTYPE OF (IfcProperty); -END_ENTITY; - -ENTITY IfcSimplePropertyTemplate - SUBTYPE OF (IfcPropertyTemplate); - TemplateType : OPTIONAL IfcSimplePropertyTemplateTypeEnum; - PrimaryMeasureType : OPTIONAL IfcLabel; - SecondaryMeasureType : OPTIONAL IfcLabel; - Enumerators : OPTIONAL IfcPropertyEnumeration; - PrimaryUnit : OPTIONAL IfcUnit; - SecondaryUnit : OPTIONAL IfcUnit; - Expression : OPTIONAL IfcLabel; - AccessState : OPTIONAL IfcStateEnum; -END_ENTITY; - -ENTITY IfcSite - SUBTYPE OF (IfcSpatialStructureElement); - RefLatitude : OPTIONAL IfcCompoundPlaneAngleMeasure; - RefLongitude : OPTIONAL IfcCompoundPlaneAngleMeasure; - RefElevation : OPTIONAL IfcLengthMeasure; - LandTitleNumber : OPTIONAL IfcLabel; - SiteAddress : OPTIONAL IfcPostalAddress; -END_ENTITY; - -ENTITY IfcSlab - SUPERTYPE OF (ONEOF - (IfcSlabElementedCase - ,IfcSlabStandardCase)) - SUBTYPE OF (IfcBuildingElement); - PredefinedType : OPTIONAL IfcSlabTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcSlabTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcSlabTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCSLABTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcSlabElementedCase - SUBTYPE OF (IfcSlab); - WHERE - HasDecomposition : HIINDEX(SELF\IfcObjectDefinition.IsDecomposedBy) > 0; -END_ENTITY; - -ENTITY IfcSlabStandardCase - SUBTYPE OF (IfcSlab); - WHERE - HasMaterialLayerSetusage : SIZEOF (QUERY(temp <* USEDIN(SELF, 'IFC4.IFCRELASSOCIATES.RELATEDOBJECTS') | - ('IFC4.IFCRELASSOCIATESMATERIAL' IN TYPEOF(temp)) AND - ('IFC4.IFCMATERIALLAYERSETUSAGE' IN TYPEOF(temp.RelatingMaterial)) - )) = 1; -END_ENTITY; - -ENTITY IfcSlabType - SUBTYPE OF (IfcBuildingElementType); - PredefinedType : IfcSlabTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcSlabTypeEnum.USERDEFINED) OR -((PredefinedType = IfcSlabTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcSlippageConnectionCondition - SUBTYPE OF (IfcStructuralConnectionCondition); - SlippageX : OPTIONAL IfcLengthMeasure; - SlippageY : OPTIONAL IfcLengthMeasure; - SlippageZ : OPTIONAL IfcLengthMeasure; -END_ENTITY; - -ENTITY IfcSolarDevice - SUBTYPE OF (IfcEnergyConversionDevice); - PredefinedType : OPTIONAL IfcSolarDeviceTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcSolarDeviceTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcSolarDeviceTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCSOLARDEVICETYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcSolarDeviceType - SUBTYPE OF (IfcEnergyConversionDeviceType); - PredefinedType : IfcSolarDeviceTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcSolarDeviceTypeEnum.USERDEFINED) OR -((PredefinedType = IfcSolarDeviceTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcSolidModel - ABSTRACT SUPERTYPE OF (ONEOF - (IfcCsgSolid - ,IfcManifoldSolidBrep - ,IfcSweptAreaSolid - ,IfcSweptDiskSolid)) - SUBTYPE OF (IfcGeometricRepresentationItem); - DERIVE - Dim : IfcDimensionCount := 3; -END_ENTITY; - -ENTITY IfcSpace - SUBTYPE OF (IfcSpatialStructureElement); - PredefinedType : OPTIONAL IfcSpaceTypeEnum; - ElevationWithFlooring : OPTIONAL IfcLengthMeasure; - INVERSE - HasCoverings : SET [0:?] OF IfcRelCoversSpaces FOR RelatingSpace; - BoundedBy : SET [0:?] OF IfcRelSpaceBoundary FOR RelatingSpace; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcSpaceTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcSpaceTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCSPACETYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcSpaceHeater - SUBTYPE OF (IfcFlowTerminal); - PredefinedType : OPTIONAL IfcSpaceHeaterTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcSpaceHeaterTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcSpaceHeaterTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCSPACEHEATERTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcSpaceHeaterType - SUBTYPE OF (IfcFlowTerminalType); - PredefinedType : IfcSpaceHeaterTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcSpaceHeaterTypeEnum.USERDEFINED) OR -((PredefinedType = IfcSpaceHeaterTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcSpaceType - SUBTYPE OF (IfcSpatialStructureElementType); - PredefinedType : IfcSpaceTypeEnum; - LongName : OPTIONAL IfcLabel; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcSpaceTypeEnum.USERDEFINED) OR -((PredefinedType = IfcSpaceTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcSpatialElementType.ElementType)); -END_ENTITY; - -ENTITY IfcSpatialElement - ABSTRACT SUPERTYPE OF (ONEOF - (IfcExternalSpatialStructureElement - ,IfcSpatialStructureElement - ,IfcSpatialZone)) - SUBTYPE OF (IfcProduct); - LongName : OPTIONAL IfcLabel; - INVERSE - ContainsElements : SET [0:?] OF IfcRelContainedInSpatialStructure FOR RelatingStructure; - ServicedBySystems : SET [0:?] OF IfcRelServicesBuildings FOR RelatedBuildings; - ReferencesElements : SET [0:?] OF IfcRelReferencedInSpatialStructure FOR RelatingStructure; -END_ENTITY; - -ENTITY IfcSpatialElementType - ABSTRACT SUPERTYPE OF (ONEOF - (IfcSpatialStructureElementType - ,IfcSpatialZoneType)) - SUBTYPE OF (IfcTypeProduct); - ElementType : OPTIONAL IfcLabel; -END_ENTITY; - -ENTITY IfcSpatialStructureElement - ABSTRACT SUPERTYPE OF (ONEOF - (IfcBuilding - ,IfcBuildingStorey - ,IfcSite - ,IfcSpace)) - SUBTYPE OF (IfcSpatialElement); - CompositionType : OPTIONAL IfcElementCompositionEnum; - WHERE - WR41 : (HIINDEX(SELF\IfcObjectDefinition.Decomposes) = 1) -AND -('IFC4.IFCRELAGGREGATES' IN TYPEOF(SELF\IfcObjectDefinition.Decomposes[1])) -AND -(('IFC4.IFCPROJECT' IN TYPEOF (SELF\IfcObjectDefinition.Decomposes[1].RelatingObject)) OR - ('IFC4.IFCSPATIALSTRUCTUREELEMENT' IN TYPEOF (SELF\IfcObjectDefinition.Decomposes[1].RelatingObject)) -); -END_ENTITY; - -ENTITY IfcSpatialStructureElementType - ABSTRACT SUPERTYPE OF (ONEOF - (IfcSpaceType)) - SUBTYPE OF (IfcSpatialElementType); -END_ENTITY; - -ENTITY IfcSpatialZone - SUBTYPE OF (IfcSpatialElement); - PredefinedType : OPTIONAL IfcSpatialZoneTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcSpatialZoneTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcSpatialZoneTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCSPATIALZONETYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcSpatialZoneType - SUBTYPE OF (IfcSpatialElementType); - PredefinedType : IfcSpatialZoneTypeEnum; - LongName : OPTIONAL IfcLabel; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcSpatialZoneTypeEnum.USERDEFINED) OR -((PredefinedType = IfcSpatialZoneTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcSpatialElementType.ElementType)); -END_ENTITY; - -ENTITY IfcSphere - SUBTYPE OF (IfcCsgPrimitive3D); - Radius : IfcPositiveLengthMeasure; -END_ENTITY; - -ENTITY IfcSphericalSurface - SUBTYPE OF (IfcElementarySurface); - Radius : IfcPositiveLengthMeasure; -END_ENTITY; - -ENTITY IfcStackTerminal - SUBTYPE OF (IfcFlowTerminal); - PredefinedType : OPTIONAL IfcStackTerminalTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcStackTerminalTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcStackTerminalTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCSTACKTERMINALTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcStackTerminalType - SUBTYPE OF (IfcFlowTerminalType); - PredefinedType : IfcStackTerminalTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcStackTerminalTypeEnum.USERDEFINED) OR -((PredefinedType = IfcStackTerminalTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcStair - SUBTYPE OF (IfcBuildingElement); - PredefinedType : OPTIONAL IfcStairTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcStairTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcStairTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCSTAIRTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcStairFlight - SUBTYPE OF (IfcBuildingElement); - NumberOfRisers : OPTIONAL IfcInteger; - NumberOfTreads : OPTIONAL IfcInteger; - RiserHeight : OPTIONAL IfcPositiveLengthMeasure; - TreadLength : OPTIONAL IfcPositiveLengthMeasure; - PredefinedType : OPTIONAL IfcStairFlightTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcStairFlightTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcStairFlightTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCSTAIRFLIGHTTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcStairFlightType - SUBTYPE OF (IfcBuildingElementType); - PredefinedType : IfcStairFlightTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcStairFlightTypeEnum.USERDEFINED) OR -((PredefinedType = IfcStairFlightTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcStairType - SUBTYPE OF (IfcBuildingElementType); - PredefinedType : IfcStairTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcStairTypeEnum.USERDEFINED) OR -((PredefinedType = IfcStairTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcStructuralAction - ABSTRACT SUPERTYPE OF (ONEOF - (IfcStructuralCurveAction - ,IfcStructuralPointAction - ,IfcStructuralSurfaceAction)) - SUBTYPE OF (IfcStructuralActivity); - DestabilizingLoad : OPTIONAL IfcBoolean; -END_ENTITY; - -ENTITY IfcStructuralActivity - ABSTRACT SUPERTYPE OF (ONEOF - (IfcStructuralAction - ,IfcStructuralReaction)) - SUBTYPE OF (IfcProduct); - AppliedLoad : IfcStructuralLoad; - GlobalOrLocal : IfcGlobalOrLocalEnum; - INVERSE - AssignedToStructuralItem : SET [0:1] OF IfcRelConnectsStructuralActivity FOR RelatedStructuralActivity; -END_ENTITY; - -ENTITY IfcStructuralAnalysisModel - SUBTYPE OF (IfcSystem); - PredefinedType : IfcAnalysisModelTypeEnum; - OrientationOf2DPlane : OPTIONAL IfcAxis2Placement3D; - LoadedBy : OPTIONAL SET [1:?] OF IfcStructuralLoadGroup; - HasResults : OPTIONAL SET [1:?] OF IfcStructuralResultGroup; - SharedPlacement : OPTIONAL IfcObjectPlacement; - WHERE - HasObjectType : (PredefinedType <> IfcAnalysisModelTypeEnum.USERDEFINED) OR EXISTS(SELF\IfcObject.ObjectType); -END_ENTITY; - -ENTITY IfcStructuralConnection - ABSTRACT SUPERTYPE OF (ONEOF - (IfcStructuralCurveConnection - ,IfcStructuralPointConnection - ,IfcStructuralSurfaceConnection)) - SUBTYPE OF (IfcStructuralItem); - AppliedCondition : OPTIONAL IfcBoundaryCondition; - INVERSE - ConnectsStructuralMembers : SET [1:?] OF IfcRelConnectsStructuralMember FOR RelatedStructuralConnection; -END_ENTITY; - -ENTITY IfcStructuralConnectionCondition - ABSTRACT SUPERTYPE OF (ONEOF - (IfcFailureConnectionCondition - ,IfcSlippageConnectionCondition)); - Name : OPTIONAL IfcLabel; -END_ENTITY; - -ENTITY IfcStructuralCurveAction - SUPERTYPE OF (ONEOF - (IfcStructuralLinearAction)) - SUBTYPE OF (IfcStructuralAction); - ProjectedOrTrue : OPTIONAL IfcProjectedOrTrueLengthEnum; - PredefinedType : IfcStructuralCurveActivityTypeEnum; - WHERE - ProjectedIsGlobal : (NOT EXISTS(ProjectedOrTrue)) OR -((ProjectedOrTrue <> PROJECTED_LENGTH) OR - (SELF\IfcStructuralActivity.GlobalOrLocal = GLOBAL_COORDS)); - HasObjectType : (PredefinedType <> IfcStructuralCurveActivityTypeEnum.USERDEFINED) OR EXISTS(SELF\IfcObject.ObjectType); - SuitablePredefinedType : PredefinedType <> IfcStructuralCurveActivityTypeEnum.EQUIDISTANT; -END_ENTITY; - -ENTITY IfcStructuralCurveConnection - SUBTYPE OF (IfcStructuralConnection); - Axis : IfcDirection; -END_ENTITY; - -ENTITY IfcStructuralCurveMember - SUPERTYPE OF (ONEOF - (IfcStructuralCurveMemberVarying)) - SUBTYPE OF (IfcStructuralMember); - PredefinedType : IfcStructuralCurveMemberTypeEnum; - Axis : IfcDirection; - WHERE - HasObjectType : (PredefinedType <> IfcStructuralCurveMemberTypeEnum.USERDEFINED) OR EXISTS(SELF\IfcObject.ObjectType); -END_ENTITY; - -ENTITY IfcStructuralCurveMemberVarying - SUBTYPE OF (IfcStructuralCurveMember); -END_ENTITY; - -ENTITY IfcStructuralCurveReaction - SUBTYPE OF (IfcStructuralReaction); - PredefinedType : IfcStructuralCurveActivityTypeEnum; - WHERE - HasObjectType : (PredefinedType <> IfcStructuralCurveActivityTypeEnum.USERDEFINED) OR EXISTS(SELF\IfcObject.ObjectType); - SuitablePredefinedType : (PredefinedType <> IfcStructuralCurveActivityTypeEnum.SINUS) AND (PredefinedType <> IfcStructuralCurveActivityTypeEnum.PARABOLA); -END_ENTITY; - -ENTITY IfcStructuralItem - ABSTRACT SUPERTYPE OF (ONEOF - (IfcStructuralConnection - ,IfcStructuralMember)) - SUBTYPE OF (IfcProduct); - INVERSE - AssignedStructuralActivity : SET [0:?] OF IfcRelConnectsStructuralActivity FOR RelatingElement; -END_ENTITY; - -ENTITY IfcStructuralLinearAction - SUBTYPE OF (IfcStructuralCurveAction); - WHERE - SuitableLoadType : SIZEOF(['IFC4.IFCSTRUCTURALLOADLINEARFORCE', 'IFC4.IFCSTRUCTURALLOADTEMPERATURE'] * TYPEOF(SELF\IfcStructuralActivity.AppliedLoad)) = 1; - ConstPredefinedType : SELF\IfcStructuralCurveAction.PredefinedType = IfcStructuralCurveActivityTypeEnum.CONST; -END_ENTITY; - -ENTITY IfcStructuralLoad - ABSTRACT SUPERTYPE OF (ONEOF - (IfcStructuralLoadConfiguration - ,IfcStructuralLoadOrResult)); - Name : OPTIONAL IfcLabel; -END_ENTITY; - -ENTITY IfcStructuralLoadCase - SUBTYPE OF (IfcStructuralLoadGroup); - SelfWeightCoefficients : OPTIONAL LIST [3:3] OF IfcRatioMeasure; - WHERE - IsLoadCasePredefinedType : SELF\IfcStructuralLoadGroup.PredefinedType = IfcLoadGroupTypeEnum.LOAD_CASE; -END_ENTITY; - -ENTITY IfcStructuralLoadConfiguration - SUBTYPE OF (IfcStructuralLoad); - Values : LIST [1:?] OF IfcStructuralLoadOrResult; - Locations : OPTIONAL LIST [1:?] OF UNIQUE LIST [1:2] OF IfcLengthMeasure; - WHERE - ValidListSize : NOT EXISTS(Locations) OR (SIZEOF(Locations) = SIZEOF(Values)); -END_ENTITY; - -ENTITY IfcStructuralLoadGroup - SUPERTYPE OF (ONEOF - (IfcStructuralLoadCase)) - SUBTYPE OF (IfcGroup); - PredefinedType : IfcLoadGroupTypeEnum; - ActionType : IfcActionTypeEnum; - ActionSource : IfcActionSourceTypeEnum; - Coefficient : OPTIONAL IfcRatioMeasure; - Purpose : OPTIONAL IfcLabel; - INVERSE - SourceOfResultGroup : SET [0:1] OF IfcStructuralResultGroup FOR ResultForLoadGroup; - LoadGroupFor : SET [0:?] OF IfcStructuralAnalysisModel FOR LoadedBy; - WHERE - HasObjectType : ( - (PredefinedType <> IfcLoadGroupTypeEnum.USERDEFINED) AND - (ActionType <> IfcActionTypeEnum.USERDEFINED) AND - (ActionSource <> IfcActionSourceTypeEnum.USERDEFINED) -) OR EXISTS(SELF\IfcObject.ObjectType); -END_ENTITY; - -ENTITY IfcStructuralLoadLinearForce - SUBTYPE OF (IfcStructuralLoadStatic); - LinearForceX : OPTIONAL IfcLinearForceMeasure; - LinearForceY : OPTIONAL IfcLinearForceMeasure; - LinearForceZ : OPTIONAL IfcLinearForceMeasure; - LinearMomentX : OPTIONAL IfcLinearMomentMeasure; - LinearMomentY : OPTIONAL IfcLinearMomentMeasure; - LinearMomentZ : OPTIONAL IfcLinearMomentMeasure; -END_ENTITY; - -ENTITY IfcStructuralLoadOrResult - ABSTRACT SUPERTYPE OF (ONEOF - (IfcStructuralLoadStatic - ,IfcSurfaceReinforcementArea)) - SUBTYPE OF (IfcStructuralLoad); -END_ENTITY; - -ENTITY IfcStructuralLoadPlanarForce - SUBTYPE OF (IfcStructuralLoadStatic); - PlanarForceX : OPTIONAL IfcPlanarForceMeasure; - PlanarForceY : OPTIONAL IfcPlanarForceMeasure; - PlanarForceZ : OPTIONAL IfcPlanarForceMeasure; -END_ENTITY; - -ENTITY IfcStructuralLoadSingleDisplacement - SUPERTYPE OF (ONEOF - (IfcStructuralLoadSingleDisplacementDistortion)) - SUBTYPE OF (IfcStructuralLoadStatic); - DisplacementX : OPTIONAL IfcLengthMeasure; - DisplacementY : OPTIONAL IfcLengthMeasure; - DisplacementZ : OPTIONAL IfcLengthMeasure; - RotationalDisplacementRX : OPTIONAL IfcPlaneAngleMeasure; - RotationalDisplacementRY : OPTIONAL IfcPlaneAngleMeasure; - RotationalDisplacementRZ : OPTIONAL IfcPlaneAngleMeasure; -END_ENTITY; - -ENTITY IfcStructuralLoadSingleDisplacementDistortion - SUBTYPE OF (IfcStructuralLoadSingleDisplacement); - Distortion : OPTIONAL IfcCurvatureMeasure; -END_ENTITY; - -ENTITY IfcStructuralLoadSingleForce - SUPERTYPE OF (ONEOF - (IfcStructuralLoadSingleForceWarping)) - SUBTYPE OF (IfcStructuralLoadStatic); - ForceX : OPTIONAL IfcForceMeasure; - ForceY : OPTIONAL IfcForceMeasure; - ForceZ : OPTIONAL IfcForceMeasure; - MomentX : OPTIONAL IfcTorqueMeasure; - MomentY : OPTIONAL IfcTorqueMeasure; - MomentZ : OPTIONAL IfcTorqueMeasure; -END_ENTITY; - -ENTITY IfcStructuralLoadSingleForceWarping - SUBTYPE OF (IfcStructuralLoadSingleForce); - WarpingMoment : OPTIONAL IfcWarpingMomentMeasure; -END_ENTITY; - -ENTITY IfcStructuralLoadStatic - ABSTRACT SUPERTYPE OF (ONEOF - (IfcStructuralLoadLinearForce - ,IfcStructuralLoadPlanarForce - ,IfcStructuralLoadSingleDisplacement - ,IfcStructuralLoadSingleForce - ,IfcStructuralLoadTemperature)) - SUBTYPE OF (IfcStructuralLoadOrResult); -END_ENTITY; - -ENTITY IfcStructuralLoadTemperature - SUBTYPE OF (IfcStructuralLoadStatic); - DeltaTConstant : OPTIONAL IfcThermodynamicTemperatureMeasure; - DeltaTY : OPTIONAL IfcThermodynamicTemperatureMeasure; - DeltaTZ : OPTIONAL IfcThermodynamicTemperatureMeasure; -END_ENTITY; - -ENTITY IfcStructuralMember - ABSTRACT SUPERTYPE OF (ONEOF - (IfcStructuralCurveMember - ,IfcStructuralSurfaceMember)) - SUBTYPE OF (IfcStructuralItem); - INVERSE - ConnectedBy : SET [0:?] OF IfcRelConnectsStructuralMember FOR RelatingStructuralMember; -END_ENTITY; - -ENTITY IfcStructuralPlanarAction - SUBTYPE OF (IfcStructuralSurfaceAction); - WHERE - SuitableLoadType : SIZEOF(['IFC4.IFCSTRUCTURALLOADPLANARFORCE', 'IFC4.IFCSTRUCTURALLOADTEMPERATURE'] * TYPEOF(SELF\IfcStructuralActivity.AppliedLoad)) = 1; - ConstPredefinedType : SELF\IfcStructuralSurfaceAction.PredefinedType = IfcStructuralSurfaceActivityTypeEnum.CONST; -END_ENTITY; - -ENTITY IfcStructuralPointAction - SUBTYPE OF (IfcStructuralAction); - WHERE - SuitableLoadType : SIZEOF(['IFC4.IFCSTRUCTURALLOADSINGLEFORCE', 'IFC4.IFCSTRUCTURALLOADSINGLEDISPLACEMENT'] * TYPEOF(SELF\IfcStructuralActivity.AppliedLoad)) = 1; -END_ENTITY; - -ENTITY IfcStructuralPointConnection - SUBTYPE OF (IfcStructuralConnection); - ConditionCoordinateSystem : OPTIONAL IfcAxis2Placement3D; -END_ENTITY; - -ENTITY IfcStructuralPointReaction - SUBTYPE OF (IfcStructuralReaction); - WHERE - SuitableLoadType : SIZEOF(['IFC4.IFCSTRUCTURALLOADSINGLEFORCE', 'IFC4.IFCSTRUCTURALLOADSINGLEDISPLACEMENT'] * TYPEOF(SELF\IfcStructuralActivity.AppliedLoad)) = 1; -END_ENTITY; - -ENTITY IfcStructuralReaction - ABSTRACT SUPERTYPE OF (ONEOF - (IfcStructuralCurveReaction - ,IfcStructuralPointReaction - ,IfcStructuralSurfaceReaction)) - SUBTYPE OF (IfcStructuralActivity); -END_ENTITY; - -ENTITY IfcStructuralResultGroup - SUBTYPE OF (IfcGroup); - TheoryType : IfcAnalysisTheoryTypeEnum; - ResultForLoadGroup : OPTIONAL IfcStructuralLoadGroup; - IsLinear : IfcBoolean; - INVERSE - ResultGroupFor : SET [0:1] OF IfcStructuralAnalysisModel FOR HasResults; - WHERE - HasObjectType : (TheoryType <> IfcAnalysisTheoryTypeEnum.USERDEFINED) OR EXISTS(SELF\IfcObject.ObjectType); -END_ENTITY; - -ENTITY IfcStructuralSurfaceAction - SUPERTYPE OF (ONEOF - (IfcStructuralPlanarAction)) - SUBTYPE OF (IfcStructuralAction); - ProjectedOrTrue : OPTIONAL IfcProjectedOrTrueLengthEnum; - PredefinedType : IfcStructuralSurfaceActivityTypeEnum; - WHERE - ProjectedIsGlobal : (NOT EXISTS(ProjectedOrTrue)) OR -((ProjectedOrTrue <> PROJECTED_LENGTH) OR - (SELF\IfcStructuralActivity.GlobalOrLocal = GLOBAL_COORDS)); - HasObjectType : (PredefinedType <> IfcStructuralSurfaceActivityTypeEnum.USERDEFINED) OR EXISTS(SELF\IfcObject.ObjectType); -END_ENTITY; - -ENTITY IfcStructuralSurfaceConnection - SUBTYPE OF (IfcStructuralConnection); -END_ENTITY; - -ENTITY IfcStructuralSurfaceMember - SUPERTYPE OF (ONEOF - (IfcStructuralSurfaceMemberVarying)) - SUBTYPE OF (IfcStructuralMember); - PredefinedType : IfcStructuralSurfaceMemberTypeEnum; - Thickness : OPTIONAL IfcPositiveLengthMeasure; - WHERE - HasObjectType : (PredefinedType <> IfcStructuralSurfaceMemberTypeEnum.USERDEFINED) OR EXISTS(SELF\IfcObject.ObjectType); -END_ENTITY; - -ENTITY IfcStructuralSurfaceMemberVarying - SUBTYPE OF (IfcStructuralSurfaceMember); -END_ENTITY; - -ENTITY IfcStructuralSurfaceReaction - SUBTYPE OF (IfcStructuralReaction); - PredefinedType : IfcStructuralSurfaceActivityTypeEnum; - WHERE - HasPredefinedType : (PredefinedType <> IfcStructuralSurfaceActivityTypeEnum.USERDEFINED) OR EXISTS(SELF\IfcObject.ObjectType); -END_ENTITY; - -ENTITY IfcStyleModel - ABSTRACT SUPERTYPE OF (ONEOF - (IfcStyledRepresentation)) - SUBTYPE OF (IfcRepresentation); -END_ENTITY; - -ENTITY IfcStyledItem - SUBTYPE OF (IfcRepresentationItem); - Item : OPTIONAL IfcRepresentationItem; - Styles : SET [1:?] OF IfcStyleAssignmentSelect; - Name : OPTIONAL IfcLabel; - WHERE - ApplicableItem : NOT('IFC4.IFCSTYLEDITEM' IN TYPEOF(Item)); -END_ENTITY; - -ENTITY IfcStyledRepresentation - SUBTYPE OF (IfcStyleModel); - WHERE - OnlyStyledItems : SIZEOF(QUERY(temp <* SELF\IfcRepresentation.Items | - (NOT('IFC4.IFCSTYLEDITEM' IN TYPEOF(temp))) -)) = 0; -END_ENTITY; - -ENTITY IfcSubContractResource - SUBTYPE OF (IfcConstructionResource); - PredefinedType : OPTIONAL IfcSubContractResourceTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcSubContractResourceTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcSubContractResourceTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); -END_ENTITY; - -ENTITY IfcSubContractResourceType - SUBTYPE OF (IfcConstructionResourceType); - PredefinedType : IfcSubContractResourceTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcSubContractResourceTypeEnum.USERDEFINED) OR -((PredefinedType = IfcSubContractResourceTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcTypeResource.ResourceType)); -END_ENTITY; - -ENTITY IfcSubedge - SUBTYPE OF (IfcEdge); - ParentEdge : IfcEdge; -END_ENTITY; - -ENTITY IfcSurface - ABSTRACT SUPERTYPE OF (ONEOF - (IfcBoundedSurface - ,IfcElementarySurface - ,IfcSweptSurface)) - SUBTYPE OF (IfcGeometricRepresentationItem); - DERIVE - Dim : IfcDimensionCount := 3; -END_ENTITY; - -ENTITY IfcSurfaceCurve - SUPERTYPE OF (ONEOF - (IfcIntersectionCurve - ,IfcSeamCurve)) - SUBTYPE OF (IfcCurve); - Curve3D : IfcCurve; - AssociatedGeometry : LIST [1:2] OF IfcPcurve; - MasterRepresentation : IfcPreferredSurfaceCurveRepresentation; - DERIVE - BasisSurface : SET [1:2] OF IfcSurface := IfcGetBasisSurface(SELF); - WHERE - CurveIs3D : Curve3D.Dim = 3; - CurveIsNotPcurve : NOT ('IFC4.IFCPCURVE' IN TYPEOF(Curve3D)); -END_ENTITY; - -ENTITY IfcSurfaceCurveSweptAreaSolid - SUBTYPE OF (IfcSweptAreaSolid); - Directrix : IfcCurve; - StartParam : OPTIONAL IfcParameterValue; - EndParam : OPTIONAL IfcParameterValue; - ReferenceSurface : IfcSurface; - WHERE - DirectrixBounded : (EXISTS(StartParam) AND EXISTS(EndParam)) OR -(SIZEOF(['IFC4.IFCCONIC', 'IFC4.IFCBOUNDEDCURVE'] * TYPEOF(Directrix)) = 1); -END_ENTITY; - -ENTITY IfcSurfaceFeature - SUBTYPE OF (IfcFeatureElement); - PredefinedType : OPTIONAL IfcSurfaceFeatureTypeEnum; - WHERE - HasObjectType : NOT EXISTS(PredefinedType) OR (PredefinedType <> IfcSurfaceFeatureTypeEnum.USERDEFINED) OR EXISTS(SELF\IfcObject.ObjectType); -END_ENTITY; - -ENTITY IfcSurfaceOfLinearExtrusion - SUBTYPE OF (IfcSweptSurface); - ExtrudedDirection : IfcDirection; - Depth : IfcLengthMeasure; - DERIVE - ExtrusionAxis : IfcVector := IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcVector (ExtrudedDirection, Depth); - WHERE - DepthGreaterZero : Depth > 0.; -END_ENTITY; - -ENTITY IfcSurfaceOfRevolution - SUBTYPE OF (IfcSweptSurface); - AxisPosition : IfcAxis1Placement; - DERIVE - AxisLine : IfcLine := IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcCurve() || IfcLine(AxisPosition.Location, - IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcVector(AxisPosition.Z,1.0)); -END_ENTITY; - -ENTITY IfcSurfaceReinforcementArea - SUBTYPE OF (IfcStructuralLoadOrResult); - SurfaceReinforcement1 : OPTIONAL LIST [2:3] OF IfcLengthMeasure; - SurfaceReinforcement2 : OPTIONAL LIST [2:3] OF IfcLengthMeasure; - ShearReinforcement : OPTIONAL IfcRatioMeasure; - WHERE - SurfaceAndOrShearAreaSpecified : EXISTS(SurfaceReinforcement1) OR EXISTS(SurfaceReinforcement2) OR EXISTS(ShearReinforcement); - NonnegativeArea1 : (NOT EXISTS(SurfaceReinforcement1)) OR ( - (SurfaceReinforcement1[1] >= 0.) AND - (SurfaceReinforcement1[2] >= 0.) AND - ((SIZEOF(SurfaceReinforcement1) = 1) OR (SurfaceReinforcement1[1] >= 0.)) -); - NonnegativeArea2 : (NOT EXISTS(SurfaceReinforcement2)) OR ( - (SurfaceReinforcement2[1] >= 0.) AND - (SurfaceReinforcement2[2] >= 0.) AND - ((SIZEOF(SurfaceReinforcement2) = 1) OR (SurfaceReinforcement2[1] >= 0.)) -); - NonnegativeArea3 : (NOT EXISTS(ShearReinforcement)) OR (ShearReinforcement >= 0.); -END_ENTITY; - -ENTITY IfcSurfaceStyle - SUBTYPE OF (IfcPresentationStyle); - Side : IfcSurfaceSide; - Styles : SET [1:5] OF IfcSurfaceStyleElementSelect; - WHERE - MaxOneShading : SIZEOF(QUERY(Style <* SELF.Styles | - 'IFC4.IFCSURFACESTYLESHADING' IN - TYPEOF(Style) - )) <= 1; - MaxOneLighting : SIZEOF(QUERY(Style <* SELF.Styles | - 'IFC4.IFCSURFACESTYLELIGHTING' IN - TYPEOF(Style) - )) <= 1; - MaxOneRefraction : SIZEOF(QUERY(Style <* SELF.Styles | - 'IFC4.IFCSURFACESTYLEREFRACTION' IN - TYPEOF(Style) - )) <= 1; - MaxOneTextures : SIZEOF(QUERY(Style <* SELF.Styles | - 'IFC4.IFCSURFACESTYLEWITHTEXTURES' IN - TYPEOF(Style) - )) <= 1; - MaxOneExtDefined : SIZEOF(QUERY(Style <* SELF.Styles | - 'IFC4.IFCEXTERNALLYDEFINEDSURFACESTYLE' IN - TYPEOF(Style) - )) <= 1; -END_ENTITY; - -ENTITY IfcSurfaceStyleLighting - SUBTYPE OF (IfcPresentationItem); - DiffuseTransmissionColour : IfcColourRgb; - DiffuseReflectionColour : IfcColourRgb; - TransmissionColour : IfcColourRgb; - ReflectanceColour : IfcColourRgb; -END_ENTITY; - -ENTITY IfcSurfaceStyleRefraction - SUBTYPE OF (IfcPresentationItem); - RefractionIndex : OPTIONAL IfcReal; - DispersionFactor : OPTIONAL IfcReal; -END_ENTITY; - -ENTITY IfcSurfaceStyleRendering - SUBTYPE OF (IfcSurfaceStyleShading); - DiffuseColour : OPTIONAL IfcColourOrFactor; - TransmissionColour : OPTIONAL IfcColourOrFactor; - DiffuseTransmissionColour : OPTIONAL IfcColourOrFactor; - ReflectionColour : OPTIONAL IfcColourOrFactor; - SpecularColour : OPTIONAL IfcColourOrFactor; - SpecularHighlight : OPTIONAL IfcSpecularHighlightSelect; - ReflectanceMethod : IfcReflectanceMethodEnum; -END_ENTITY; - -ENTITY IfcSurfaceStyleShading - SUPERTYPE OF (ONEOF - (IfcSurfaceStyleRendering)) - SUBTYPE OF (IfcPresentationItem); - SurfaceColour : IfcColourRgb; - Transparency : OPTIONAL IfcNormalisedRatioMeasure; -END_ENTITY; - -ENTITY IfcSurfaceStyleWithTextures - SUBTYPE OF (IfcPresentationItem); - Textures : LIST [1:?] OF IfcSurfaceTexture; -END_ENTITY; - -ENTITY IfcSurfaceTexture - ABSTRACT SUPERTYPE OF (ONEOF - (IfcBlobTexture - ,IfcImageTexture - ,IfcPixelTexture)) - SUBTYPE OF (IfcPresentationItem); - RepeatS : IfcBoolean; - RepeatT : IfcBoolean; - Mode : OPTIONAL IfcIdentifier; - TextureTransform : OPTIONAL IfcCartesianTransformationOperator2D; - Parameter : OPTIONAL LIST [1:?] OF IfcIdentifier; - INVERSE - IsMappedBy : SET [0:?] OF IfcTextureCoordinate FOR Maps; - UsedInStyles : SET [0:?] OF IfcSurfaceStyleWithTextures FOR Textures; -END_ENTITY; - -ENTITY IfcSweptAreaSolid - ABSTRACT SUPERTYPE OF (ONEOF - (IfcExtrudedAreaSolid - ,IfcFixedReferenceSweptAreaSolid - ,IfcRevolvedAreaSolid - ,IfcSurfaceCurveSweptAreaSolid)) - SUBTYPE OF (IfcSolidModel); - SweptArea : IfcProfileDef; - Position : OPTIONAL IfcAxis2Placement3D; - WHERE - SweptAreaType : SweptArea.ProfileType = IfcProfileTypeEnum.Area; -END_ENTITY; - -ENTITY IfcSweptDiskSolid - SUPERTYPE OF (ONEOF - (IfcSweptDiskSolidPolygonal)) - SUBTYPE OF (IfcSolidModel); - Directrix : IfcCurve; - Radius : IfcPositiveLengthMeasure; - InnerRadius : OPTIONAL IfcPositiveLengthMeasure; - StartParam : OPTIONAL IfcParameterValue; - EndParam : OPTIONAL IfcParameterValue; - WHERE - DirectrixDim : Directrix.Dim = 3; - InnerRadiusSize : (NOT EXISTS(InnerRadius)) OR (Radius > InnerRadius); - DirectrixBounded : (EXISTS(StartParam) AND EXISTS(EndParam)) OR -(SIZEOF(['IFC4.IFCCONIC', 'IFC4.IFCBOUNDEDCURVE'] * TYPEOF(Directrix)) = 1); -END_ENTITY; - -ENTITY IfcSweptDiskSolidPolygonal - SUBTYPE OF (IfcSweptDiskSolid); - FilletRadius : OPTIONAL IfcPositiveLengthMeasure; - WHERE - CorrectRadii : NOT(EXISTS(FilletRadius)) OR (FilletRadius >= SELF\IfcSweptDiskSolid.Radius); - DirectrixIsPolyline : ('IFC4.IFCPOLYLINE' IN TYPEOF(SELF\IfcSweptDiskSolid.Directrix)) OR -(('IFC4.IFCINDEXEDPOLYCURVE' IN TYPEOF(SELF\IfcSweptDiskSolid.Directrix)) AND NOT(EXISTS(SELF\IfcSweptDiskSolid.Directrix.Segments))); -END_ENTITY; - -ENTITY IfcSweptSurface - ABSTRACT SUPERTYPE OF (ONEOF - (IfcSurfaceOfLinearExtrusion - ,IfcSurfaceOfRevolution)) - SUBTYPE OF (IfcSurface); - SweptCurve : IfcProfileDef; - Position : OPTIONAL IfcAxis2Placement3D; - WHERE - SweptCurveType : SweptCurve.ProfileType = IfcProfileTypeEnum.Curve; -END_ENTITY; - -ENTITY IfcSwitchingDevice - SUBTYPE OF (IfcFlowController); - PredefinedType : OPTIONAL IfcSwitchingDeviceTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcSwitchingDeviceTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcSwitchingDeviceTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCSWITCHINGDEVICETYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcSwitchingDeviceType - SUBTYPE OF (IfcFlowControllerType); - PredefinedType : IfcSwitchingDeviceTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcSwitchingDeviceTypeEnum.USERDEFINED) OR -((PredefinedType = IfcSwitchingDeviceTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcSystem - SUPERTYPE OF (ONEOF - (IfcBuildingSystem - ,IfcDistributionSystem - ,IfcStructuralAnalysisModel - ,IfcZone)) - SUBTYPE OF (IfcGroup); - INVERSE - ServicesBuildings : SET [0:1] OF IfcRelServicesBuildings FOR RelatingSystem; -END_ENTITY; - -ENTITY IfcSystemFurnitureElement - SUBTYPE OF (IfcFurnishingElement); - PredefinedType : OPTIONAL IfcSystemFurnitureElementTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcSystemFurnitureElementTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcSystemFurnitureElementTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCSYSTEMFURNITUREELEMENTTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcSystemFurnitureElementType - SUBTYPE OF (IfcFurnishingElementType); - PredefinedType : OPTIONAL IfcSystemFurnitureElementTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcSystemFurnitureElementTypeEnum.USERDEFINED) OR -((PredefinedType = IfcSystemFurnitureElementTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcTShapeProfileDef - SUBTYPE OF (IfcParameterizedProfileDef); - Depth : IfcPositiveLengthMeasure; - FlangeWidth : IfcPositiveLengthMeasure; - WebThickness : IfcPositiveLengthMeasure; - FlangeThickness : IfcPositiveLengthMeasure; - FilletRadius : OPTIONAL IfcNonNegativeLengthMeasure; - FlangeEdgeRadius : OPTIONAL IfcNonNegativeLengthMeasure; - WebEdgeRadius : OPTIONAL IfcNonNegativeLengthMeasure; - WebSlope : OPTIONAL IfcPlaneAngleMeasure; - FlangeSlope : OPTIONAL IfcPlaneAngleMeasure; - WHERE - ValidFlangeThickness : FlangeThickness < Depth; - ValidWebThickness : WebThickness < FlangeWidth; -END_ENTITY; - -ENTITY IfcTable; - Name : OPTIONAL IfcLabel; - Rows : OPTIONAL LIST [1:?] OF IfcTableRow; - Columns : OPTIONAL LIST [1:?] OF IfcTableColumn; - DERIVE - NumberOfCellsInRow : IfcInteger := HIINDEX(Rows[1].RowCells); - NumberOfHeadings : IfcInteger := SIZEOF(QUERY( Temp <* Rows | Temp.IsHeading)); - NumberOfDataRows : IfcInteger := SIZEOF(QUERY( Temp <* Rows | NOT(Temp.IsHeading))); - WHERE - WR1 : SIZEOF(QUERY( Temp <* Rows | HIINDEX(Temp.RowCells) <> HIINDEX(Rows[1].RowCells))) = 0; - WR2 : { 0 <= NumberOfHeadings <= 1 }; -END_ENTITY; - -ENTITY IfcTableColumn; - Identifier : OPTIONAL IfcIdentifier; - Name : OPTIONAL IfcLabel; - Description : OPTIONAL IfcText; - Unit : OPTIONAL IfcUnit; - ReferencePath : OPTIONAL IfcReference; -END_ENTITY; - -ENTITY IfcTableRow; - RowCells : OPTIONAL LIST [1:?] OF IfcValue; - IsHeading : OPTIONAL IfcBoolean; -END_ENTITY; - -ENTITY IfcTank - SUBTYPE OF (IfcFlowStorageDevice); - PredefinedType : OPTIONAL IfcTankTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcTankTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcTankTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCTANKTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcTankType - SUBTYPE OF (IfcFlowStorageDeviceType); - PredefinedType : IfcTankTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcTankTypeEnum.USERDEFINED) OR -((PredefinedType = IfcTankTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcTask - SUBTYPE OF (IfcProcess); - Status : OPTIONAL IfcLabel; - WorkMethod : OPTIONAL IfcLabel; - IsMilestone : IfcBoolean; - Priority : OPTIONAL IfcInteger; - TaskTime : OPTIONAL IfcTaskTime; - PredefinedType : OPTIONAL IfcTaskTypeEnum; - WHERE - HasName : EXISTS(SELF\IfcRoot.Name); - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR (PredefinedType <> IfcTaskTypeEnum.USERDEFINED) OR ((PredefinedType = IfcTaskTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcObject.ObjectType)); -END_ENTITY; - -ENTITY IfcTaskTime - SUPERTYPE OF (ONEOF - (IfcTaskTimeRecurring)) - SUBTYPE OF (IfcSchedulingTime); - DurationType : OPTIONAL IfcTaskDurationEnum; - ScheduleDuration : OPTIONAL IfcDuration; - ScheduleStart : OPTIONAL IfcDateTime; - ScheduleFinish : OPTIONAL IfcDateTime; - EarlyStart : OPTIONAL IfcDateTime; - EarlyFinish : OPTIONAL IfcDateTime; - LateStart : OPTIONAL IfcDateTime; - LateFinish : OPTIONAL IfcDateTime; - FreeFloat : OPTIONAL IfcDuration; - TotalFloat : OPTIONAL IfcDuration; - IsCritical : OPTIONAL IfcBoolean; - StatusTime : OPTIONAL IfcDateTime; - ActualDuration : OPTIONAL IfcDuration; - ActualStart : OPTIONAL IfcDateTime; - ActualFinish : OPTIONAL IfcDateTime; - RemainingTime : OPTIONAL IfcDuration; - Completion : OPTIONAL IfcPositiveRatioMeasure; -END_ENTITY; - -ENTITY IfcTaskTimeRecurring - SUBTYPE OF (IfcTaskTime); - Recurrence : IfcRecurrencePattern; -END_ENTITY; - -ENTITY IfcTaskType - SUBTYPE OF (IfcTypeProcess); - PredefinedType : IfcTaskTypeEnum; - WorkMethod : OPTIONAL IfcLabel; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcTaskTypeEnum.USERDEFINED) OR ((PredefinedType = IfcTaskTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcTypeProcess.ProcessType)); -END_ENTITY; - -ENTITY IfcTelecomAddress - SUBTYPE OF (IfcAddress); - TelephoneNumbers : OPTIONAL LIST [1:?] OF IfcLabel; - FacsimileNumbers : OPTIONAL LIST [1:?] OF IfcLabel; - PagerNumber : OPTIONAL IfcLabel; - ElectronicMailAddresses : OPTIONAL LIST [1:?] OF IfcLabel; - WWWHomePageURL : OPTIONAL IfcURIReference; - MessagingIDs : OPTIONAL LIST [1:?] OF IfcURIReference; - WHERE - MinimumDataProvided : EXISTS (TelephoneNumbers) OR -EXISTS (FacsimileNumbers) OR -EXISTS (PagerNumber) OR -EXISTS (ElectronicMailAddresses) OR -EXISTS (WWWHomePageURL) OR -EXISTS (MessagingIDs); -END_ENTITY; - -ENTITY IfcTendon - SUBTYPE OF (IfcReinforcingElement); - PredefinedType : OPTIONAL IfcTendonTypeEnum; - NominalDiameter : OPTIONAL IfcPositiveLengthMeasure; - CrossSectionArea : OPTIONAL IfcAreaMeasure; - TensionForce : OPTIONAL IfcForceMeasure; - PreStress : OPTIONAL IfcPressureMeasure; - FrictionCoefficient : OPTIONAL IfcNormalisedRatioMeasure; - AnchorageSlip : OPTIONAL IfcPositiveLengthMeasure; - MinCurvatureRadius : OPTIONAL IfcPositiveLengthMeasure; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR -(PredefinedType <> IfcTendonTypeEnum.USERDEFINED) OR -((PredefinedType = IfcTendonTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR -('IFC4.IFCTENDONTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcTendonAnchor - SUBTYPE OF (IfcReinforcingElement); - PredefinedType : OPTIONAL IfcTendonAnchorTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR -(PredefinedType <> IfcTendonAnchorTypeEnum.USERDEFINED) OR -((PredefinedType = IfcTendonAnchorTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR -('IFC4.IFCTENDONANCHORTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcTendonAnchorType - SUBTYPE OF (IfcReinforcingElementType); - PredefinedType : IfcTendonAnchorTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcTendonAnchorTypeEnum.USERDEFINED) OR -((PredefinedType = IfcTendonAnchorTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcTendonType - SUBTYPE OF (IfcReinforcingElementType); - PredefinedType : IfcTendonTypeEnum; - NominalDiameter : OPTIONAL IfcPositiveLengthMeasure; - CrossSectionArea : OPTIONAL IfcAreaMeasure; - SheathDiameter : OPTIONAL IfcPositiveLengthMeasure; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcTendonTypeEnum.USERDEFINED) OR -((PredefinedType = IfcTendonTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcTessellatedFaceSet - ABSTRACT SUPERTYPE OF (ONEOF - (IfcPolygonalFaceSet - ,IfcTriangulatedFaceSet)) - SUBTYPE OF (IfcTessellatedItem); - Coordinates : IfcCartesianPointList3D; - DERIVE - Dim : IfcDimensionCount := 3; - INVERSE - HasColours : SET [0:1] OF IfcIndexedColourMap FOR MappedTo; - HasTextures : SET [0:?] OF IfcIndexedTextureMap FOR MappedTo; -END_ENTITY; - -ENTITY IfcTessellatedItem - ABSTRACT SUPERTYPE OF (ONEOF - (IfcIndexedPolygonalFace - ,IfcTessellatedFaceSet)) - SUBTYPE OF (IfcGeometricRepresentationItem); -END_ENTITY; - -ENTITY IfcTextLiteral - SUPERTYPE OF (ONEOF - (IfcTextLiteralWithExtent)) - SUBTYPE OF (IfcGeometricRepresentationItem); - Literal : IfcPresentableText; - Placement : IfcAxis2Placement; - Path : IfcTextPath; -END_ENTITY; - -ENTITY IfcTextLiteralWithExtent - SUBTYPE OF (IfcTextLiteral); - Extent : IfcPlanarExtent; - BoxAlignment : IfcBoxAlignment; - WHERE - WR31 : NOT('IFC4.IFCPLANARBOX' IN TYPEOF(Extent)); -END_ENTITY; - -ENTITY IfcTextStyle - SUBTYPE OF (IfcPresentationStyle); - TextCharacterAppearance : OPTIONAL IfcTextStyleForDefinedFont; - TextStyle : OPTIONAL IfcTextStyleTextModel; - TextFontStyle : IfcTextFontSelect; - ModelOrDraughting : OPTIONAL IfcBoolean; -END_ENTITY; - -ENTITY IfcTextStyleFontModel - SUBTYPE OF (IfcPreDefinedTextFont); - FontFamily : LIST [1:?] OF IfcTextFontName; - FontStyle : OPTIONAL IfcFontStyle; - FontVariant : OPTIONAL IfcFontVariant; - FontWeight : OPTIONAL IfcFontWeight; - FontSize : IfcSizeSelect; - WHERE - MeasureOfFontSize : ('IFC4.IFCLENGTHMEASURE' IN TYPEOF(SELF.FontSize)) AND -(SELF.FontSize > 0.); -END_ENTITY; - -ENTITY IfcTextStyleForDefinedFont - SUBTYPE OF (IfcPresentationItem); - Colour : IfcColour; - BackgroundColour : OPTIONAL IfcColour; -END_ENTITY; - -ENTITY IfcTextStyleTextModel - SUBTYPE OF (IfcPresentationItem); - TextIndent : OPTIONAL IfcSizeSelect; - TextAlign : OPTIONAL IfcTextAlignment; - TextDecoration : OPTIONAL IfcTextDecoration; - LetterSpacing : OPTIONAL IfcSizeSelect; - WordSpacing : OPTIONAL IfcSizeSelect; - TextTransform : OPTIONAL IfcTextTransformation; - LineHeight : OPTIONAL IfcSizeSelect; -END_ENTITY; - -ENTITY IfcTextureCoordinate - ABSTRACT SUPERTYPE OF (ONEOF - (IfcIndexedTextureMap - ,IfcTextureCoordinateGenerator - ,IfcTextureMap)) - SUBTYPE OF (IfcPresentationItem); - Maps : LIST [1:?] OF IfcSurfaceTexture; -END_ENTITY; - -ENTITY IfcTextureCoordinateGenerator - SUBTYPE OF (IfcTextureCoordinate); - Mode : IfcLabel; - Parameter : OPTIONAL LIST [1:?] OF IfcReal; -END_ENTITY; - -ENTITY IfcTextureMap - SUBTYPE OF (IfcTextureCoordinate); - Vertices : LIST [3:?] OF IfcTextureVertex; - MappedTo : IfcFace; -END_ENTITY; - -ENTITY IfcTextureVertex - SUBTYPE OF (IfcPresentationItem); - Coordinates : LIST [2:2] OF IfcParameterValue; -END_ENTITY; - -ENTITY IfcTextureVertexList - SUBTYPE OF (IfcPresentationItem); - TexCoordsList : LIST [1:?] OF LIST [2:2] OF IfcParameterValue; -END_ENTITY; - -ENTITY IfcTimePeriod; - StartTime : IfcTime; - EndTime : IfcTime; -END_ENTITY; - -ENTITY IfcTimeSeries - ABSTRACT SUPERTYPE OF (ONEOF - (IfcIrregularTimeSeries - ,IfcRegularTimeSeries)); - Name : IfcLabel; - Description : OPTIONAL IfcText; - StartTime : IfcDateTime; - EndTime : IfcDateTime; - TimeSeriesDataType : IfcTimeSeriesDataTypeEnum; - DataOrigin : IfcDataOriginEnum; - UserDefinedDataOrigin : OPTIONAL IfcLabel; - Unit : OPTIONAL IfcUnit; - INVERSE - HasExternalReference : SET [1:?] OF IfcExternalReferenceRelationship FOR RelatedResourceObjects; -END_ENTITY; - -ENTITY IfcTimeSeriesValue; - ListValues : LIST [1:?] OF IfcValue; -END_ENTITY; - -ENTITY IfcTopologicalRepresentationItem - ABSTRACT SUPERTYPE OF (ONEOF - (IfcConnectedFaceSet - ,IfcEdge - ,IfcFace - ,IfcFaceBound - ,IfcLoop - ,IfcPath - ,IfcVertex)) - SUBTYPE OF (IfcRepresentationItem); -END_ENTITY; - -ENTITY IfcTopologyRepresentation - SUBTYPE OF (IfcShapeModel); - WHERE - WR21 : SIZEOF(QUERY(temp <* SELF\IfcRepresentation.Items | - NOT('IFC4.IFCTOPOLOGICALREPRESENTATIONITEM' IN TYPEOF(temp)) -)) = 0; - WR22 : EXISTS(SELF\IfcRepresentation.RepresentationType); - WR23 : IfcTopologyRepresentationTypes(SELF\IfcRepresentation.RepresentationType, SELF\IfcRepresentation.Items); -END_ENTITY; - -ENTITY IfcToroidalSurface - SUBTYPE OF (IfcElementarySurface); - MajorRadius : IfcPositiveLengthMeasure; - MinorRadius : IfcPositiveLengthMeasure; - WHERE - MajorLargerMinor : MinorRadius < MajorRadius; -END_ENTITY; - -ENTITY IfcTransformer - SUBTYPE OF (IfcEnergyConversionDevice); - PredefinedType : OPTIONAL IfcTransformerTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcTransformerTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcTransformerTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCTRANFORMERTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcTransformerType - SUBTYPE OF (IfcEnergyConversionDeviceType); - PredefinedType : IfcTransformerTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcTransformerTypeEnum.USERDEFINED) OR -((PredefinedType = IfcTransformerTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcTransportElement - SUBTYPE OF (IfcElement); - PredefinedType : OPTIONAL IfcTransportElementTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcTransportElementTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcTransportElementTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCTRANSPORTELEMENTTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcTransportElementType - SUBTYPE OF (IfcElementType); - PredefinedType : IfcTransportElementTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcTransportElementTypeEnum.USERDEFINED) OR -((PredefinedType = IfcTransportElementTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcTrapeziumProfileDef - SUBTYPE OF (IfcParameterizedProfileDef); - BottomXDim : IfcPositiveLengthMeasure; - TopXDim : IfcPositiveLengthMeasure; - YDim : IfcPositiveLengthMeasure; - TopXOffset : IfcLengthMeasure; -END_ENTITY; - -ENTITY IfcTriangulatedFaceSet - SUBTYPE OF (IfcTessellatedFaceSet); - Normals : OPTIONAL LIST [1:?] OF LIST [3:3] OF IfcParameterValue; - Closed : OPTIONAL IfcBoolean; - CoordIndex : LIST [1:?] OF LIST [3:3] OF IfcPositiveInteger; - PnIndex : OPTIONAL LIST [1:?] OF IfcPositiveInteger; - DERIVE - NumberOfTriangles : IfcInteger := SIZEOF(CoordIndex); -END_ENTITY; - -ENTITY IfcTrimmedCurve - SUBTYPE OF (IfcBoundedCurve); - BasisCurve : IfcCurve; - Trim1 : SET [1:2] OF IfcTrimmingSelect; - Trim2 : SET [1:2] OF IfcTrimmingSelect; - SenseAgreement : IfcBoolean; - MasterRepresentation : IfcTrimmingPreference; - WHERE - Trim1ValuesConsistent : (HIINDEX(Trim1) = 1) OR (TYPEOF(Trim1[1]) <> TYPEOF(Trim1[2])); - Trim2ValuesConsistent : (HIINDEX(Trim2) = 1) OR (TYPEOF(Trim2[1]) <> TYPEOF(Trim2[2])); - NoTrimOfBoundedCurves : NOT('IFC4.IFCBOUNDEDCURVE' IN TYPEOF(BasisCurve)); -END_ENTITY; - -ENTITY IfcTubeBundle - SUBTYPE OF (IfcEnergyConversionDevice); - PredefinedType : OPTIONAL IfcTubeBundleTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcTubeBundleTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcTubeBundleTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCTUBEBUNDLETYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcTubeBundleType - SUBTYPE OF (IfcEnergyConversionDeviceType); - PredefinedType : IfcTubeBundleTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcTubeBundleTypeEnum.USERDEFINED) OR -((PredefinedType = IfcTubeBundleTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcTypeObject - SUPERTYPE OF (ONEOF - (IfcTypeProcess - ,IfcTypeProduct - ,IfcTypeResource)) - SUBTYPE OF (IfcObjectDefinition); - ApplicableOccurrence : OPTIONAL IfcIdentifier; - HasPropertySets : OPTIONAL SET [1:?] OF IfcPropertySetDefinition; - INVERSE - Types : SET [0:1] OF IfcRelDefinesByType FOR RelatingType; - WHERE - NameRequired : EXISTS(SELF\IfcRoot.Name); - UniquePropertySetNames : (NOT(EXISTS(HasPropertySets))) OR IfcUniquePropertySetNames(HasPropertySets); -END_ENTITY; - -ENTITY IfcTypeProcess - ABSTRACT SUPERTYPE OF (ONEOF - (IfcEventType - ,IfcProcedureType - ,IfcTaskType)) - SUBTYPE OF (IfcTypeObject); - Identification : OPTIONAL IfcIdentifier; - LongDescription : OPTIONAL IfcText; - ProcessType : OPTIONAL IfcLabel; - INVERSE - OperatesOn : SET [0:?] OF IfcRelAssignsToProcess FOR RelatingProcess; -END_ENTITY; - -ENTITY IfcTypeProduct - SUPERTYPE OF (ONEOF - (IfcDoorStyle - ,IfcElementType - ,IfcSpatialElementType - ,IfcWindowStyle)) - SUBTYPE OF (IfcTypeObject); - RepresentationMaps : OPTIONAL LIST [1:?] OF UNIQUE IfcRepresentationMap; - Tag : OPTIONAL IfcLabel; - INVERSE - ReferencedBy : SET [0:?] OF IfcRelAssignsToProduct FOR RelatingProduct; - WHERE - ApplicableOccurrence : NOT(EXISTS(SELF\IfcTypeObject.Types[1])) OR -(SIZEOF(QUERY(temp <* SELF\IfcTypeObject.Types[1].RelatedObjects | - NOT('IFC4.IFCPRODUCT' IN TYPEOF(temp))) -) = 0); -END_ENTITY; - -ENTITY IfcTypeResource - ABSTRACT SUPERTYPE OF (ONEOF - (IfcConstructionResourceType)) - SUBTYPE OF (IfcTypeObject); - Identification : OPTIONAL IfcIdentifier; - LongDescription : OPTIONAL IfcText; - ResourceType : OPTIONAL IfcLabel; - INVERSE - ResourceOf : SET [0:?] OF IfcRelAssignsToResource FOR RelatingResource; -END_ENTITY; - -ENTITY IfcUShapeProfileDef - SUBTYPE OF (IfcParameterizedProfileDef); - Depth : IfcPositiveLengthMeasure; - FlangeWidth : IfcPositiveLengthMeasure; - WebThickness : IfcPositiveLengthMeasure; - FlangeThickness : IfcPositiveLengthMeasure; - FilletRadius : OPTIONAL IfcNonNegativeLengthMeasure; - EdgeRadius : OPTIONAL IfcNonNegativeLengthMeasure; - FlangeSlope : OPTIONAL IfcPlaneAngleMeasure; - WHERE - ValidFlangeThickness : FlangeThickness < (Depth / 2.); - ValidWebThickness : WebThickness < FlangeWidth; -END_ENTITY; - -ENTITY IfcUnitAssignment; - Units : SET [1:?] OF IfcUnit; - WHERE - WR01 : IfcCorrectUnitAssignment(Units); -END_ENTITY; - -ENTITY IfcUnitaryControlElement - SUBTYPE OF (IfcDistributionControlElement); - PredefinedType : OPTIONAL IfcUnitaryControlElementTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcUnitaryControlElementTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcUnitaryControlElementTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR -('IFC4.IFCUNITARYCONTROLELEMENTTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcUnitaryControlElementType - SUBTYPE OF (IfcDistributionControlElementType); - PredefinedType : IfcUnitaryControlElementTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcUnitaryControlElementTypeEnum.USERDEFINED) OR -((PredefinedType = IfcUnitaryControlElementTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcUnitaryEquipment - SUBTYPE OF (IfcEnergyConversionDevice); - PredefinedType : OPTIONAL IfcUnitaryEquipmentTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcUnitaryEquipmentTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcUnitaryEquipmentTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCUNITARYEQUIPMENTTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcUnitaryEquipmentType - SUBTYPE OF (IfcEnergyConversionDeviceType); - PredefinedType : IfcUnitaryEquipmentTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcUnitaryEquipmentTypeEnum.USERDEFINED) OR -((PredefinedType = IfcUnitaryEquipmentTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcValve - SUBTYPE OF (IfcFlowController); - PredefinedType : OPTIONAL IfcValveTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcValveTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcValveTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCVALVETYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcValveType - SUBTYPE OF (IfcFlowControllerType); - PredefinedType : IfcValveTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcValveTypeEnum.USERDEFINED) OR -((PredefinedType = IfcValveTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcVector - SUBTYPE OF (IfcGeometricRepresentationItem); - Orientation : IfcDirection; - Magnitude : IfcLengthMeasure; - DERIVE - Dim : IfcDimensionCount := Orientation.Dim; - WHERE - MagGreaterOrEqualZero : Magnitude >= 0.0; -END_ENTITY; - -ENTITY IfcVertex - SUPERTYPE OF (ONEOF - (IfcVertexPoint)) - SUBTYPE OF (IfcTopologicalRepresentationItem); -END_ENTITY; - -ENTITY IfcVertexLoop - SUBTYPE OF (IfcLoop); - LoopVertex : IfcVertex; -END_ENTITY; - -ENTITY IfcVertexPoint - SUBTYPE OF (IfcVertex); - VertexGeometry : IfcPoint; -END_ENTITY; - -ENTITY IfcVibrationIsolator - SUBTYPE OF (IfcElementComponent); - PredefinedType : OPTIONAL IfcVibrationIsolatorTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcVibrationIsolatorTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcVibrationIsolatorTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCVIBRATIONISOLATORTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcVibrationIsolatorType - SUBTYPE OF (IfcElementComponentType); - PredefinedType : IfcVibrationIsolatorTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcVibrationIsolatorTypeEnum.USERDEFINED) OR -((PredefinedType = IfcVibrationIsolatorTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcVirtualElement - SUBTYPE OF (IfcElement); -END_ENTITY; - -ENTITY IfcVirtualGridIntersection; - IntersectingAxes : LIST [2:2] OF UNIQUE IfcGridAxis; - OffsetDistances : LIST [2:3] OF IfcLengthMeasure; -END_ENTITY; - -ENTITY IfcVoidingFeature - SUBTYPE OF (IfcFeatureElementSubtraction); - PredefinedType : OPTIONAL IfcVoidingFeatureTypeEnum; - WHERE - HasObjectType : NOT EXISTS(PredefinedType) OR (PredefinedType <> IfcVoidingFeatureTypeEnum.USERDEFINED) OR EXISTS(SELF\IfcObject.ObjectType); -END_ENTITY; - -ENTITY IfcWall - SUPERTYPE OF (ONEOF - (IfcWallElementedCase - ,IfcWallStandardCase)) - SUBTYPE OF (IfcBuildingElement); - PredefinedType : OPTIONAL IfcWallTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcWallTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcWallTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCWALLTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcWallElementedCase - SUBTYPE OF (IfcWall); - WHERE - HasDecomposition : HIINDEX(SELF\IfcObjectDefinition.IsDecomposedBy) > 0; -END_ENTITY; - -ENTITY IfcWallStandardCase - SUBTYPE OF (IfcWall); - WHERE - HasMaterialLayerSetUsage : SIZEOF (QUERY(temp <* USEDIN(SELF, 'IFC4.IFCRELASSOCIATES.RELATEDOBJECTS') | - ('IFC4.IFCRELASSOCIATESMATERIAL' IN TYPEOF(temp)) AND - ('IFC4.IFCMATERIALLAYERSETUSAGE' IN TYPEOF(temp.RelatingMaterial)) - )) = 1; -END_ENTITY; - -ENTITY IfcWallType - SUBTYPE OF (IfcBuildingElementType); - PredefinedType : IfcWallTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcWallTypeEnum.USERDEFINED) OR -((PredefinedType = IfcWallTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcWasteTerminal - SUBTYPE OF (IfcFlowTerminal); - PredefinedType : OPTIONAL IfcWasteTerminalTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR - (PredefinedType <> IfcWasteTerminalTypeEnum.USERDEFINED) OR - ((PredefinedType = IfcWasteTerminalTypeEnum.USERDEFINED) AND EXISTS (SELF\IfcObject.ObjectType)); - CorrectTypeAssigned : (SIZEOF(IsTypedBy) = 0) OR - ('IFC4.IFCWASTETERMINALTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcWasteTerminalType - SUBTYPE OF (IfcFlowTerminalType); - PredefinedType : IfcWasteTerminalTypeEnum; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcWasteTerminalTypeEnum.USERDEFINED) OR -((PredefinedType = IfcWasteTerminalTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcWindow - SUPERTYPE OF (ONEOF - (IfcWindowStandardCase)) - SUBTYPE OF (IfcBuildingElement); - OverallHeight : OPTIONAL IfcPositiveLengthMeasure; - OverallWidth : OPTIONAL IfcPositiveLengthMeasure; - PredefinedType : OPTIONAL IfcWindowTypeEnum; - PartitioningType : OPTIONAL IfcWindowTypePartitioningEnum; - UserDefinedPartitioningType : OPTIONAL IfcLabel; - WHERE - CorrectStyleAssigned : (SIZEOF(IsTypedBy) = 0) -OR ('IFC4.IFCWINDOWTYPE' IN TYPEOF(SELF\IfcObject.IsTypedBy[1].RelatingType)); -END_ENTITY; - -ENTITY IfcWindowLiningProperties - SUBTYPE OF (IfcPreDefinedPropertySet); - LiningDepth : OPTIONAL IfcPositiveLengthMeasure; - LiningThickness : OPTIONAL IfcNonNegativeLengthMeasure; - TransomThickness : OPTIONAL IfcNonNegativeLengthMeasure; - MullionThickness : OPTIONAL IfcNonNegativeLengthMeasure; - FirstTransomOffset : OPTIONAL IfcNormalisedRatioMeasure; - SecondTransomOffset : OPTIONAL IfcNormalisedRatioMeasure; - FirstMullionOffset : OPTIONAL IfcNormalisedRatioMeasure; - SecondMullionOffset : OPTIONAL IfcNormalisedRatioMeasure; - ShapeAspectStyle : OPTIONAL IfcShapeAspect; - LiningOffset : OPTIONAL IfcLengthMeasure; - LiningToPanelOffsetX : OPTIONAL IfcLengthMeasure; - LiningToPanelOffsetY : OPTIONAL IfcLengthMeasure; - WHERE - WR31 : NOT(EXISTS(LiningDepth) AND NOT(EXISTS(LiningThickness))); - WR32 : NOT(NOT(EXISTS(FirstTransomOffset)) AND EXISTS(SecondTransomOffset)); - WR33 : NOT(NOT(EXISTS(FirstMullionOffset)) AND EXISTS(SecondMullionOffset)); - WR34 : (EXISTS(SELF\IfcPropertySetDefinition.DefinesType[1])) -AND -( - ('IFC4.IFCWINDOWTYPE' IN TYPEOF(SELF\IfcPropertySetDefinition.DefinesType[1])) - OR - ('IFC4.IFCWINDOWSTYLE' IN TYPEOF(SELF\IfcPropertySetDefinition.DefinesType[1])) -); -END_ENTITY; - -ENTITY IfcWindowPanelProperties - SUBTYPE OF (IfcPreDefinedPropertySet); - OperationType : IfcWindowPanelOperationEnum; - PanelPosition : IfcWindowPanelPositionEnum; - FrameDepth : OPTIONAL IfcPositiveLengthMeasure; - FrameThickness : OPTIONAL IfcPositiveLengthMeasure; - ShapeAspectStyle : OPTIONAL IfcShapeAspect; - WHERE - ApplicableToType : (EXISTS(SELF\IfcPropertySetDefinition.DefinesType[1])) -AND -( - ('IFC4.IFCWINDOWTYPE' IN TYPEOF(SELF\IfcPropertySetDefinition.DefinesType[1])) - OR - ('IFC4.IFCWINDOWSTYLE' IN TYPEOF(SELF\IfcPropertySetDefinition.DefinesType[1])) -); -END_ENTITY; - -ENTITY IfcWindowStandardCase - SUBTYPE OF (IfcWindow); -END_ENTITY; - -ENTITY IfcWindowStyle - SUBTYPE OF (IfcTypeProduct); - ConstructionType : IfcWindowStyleConstructionEnum; - OperationType : IfcWindowStyleOperationEnum; - ParameterTakesPrecedence : IfcBoolean; - Sizeable : IfcBoolean; -END_ENTITY; - -ENTITY IfcWindowType - SUBTYPE OF (IfcBuildingElementType); - PredefinedType : IfcWindowTypeEnum; - PartitioningType : IfcWindowTypePartitioningEnum; - ParameterTakesPrecedence : OPTIONAL IfcBoolean; - UserDefinedPartitioningType : OPTIONAL IfcLabel; - WHERE - CorrectPredefinedType : (PredefinedType <> IfcWindowTypeEnum.USERDEFINED) OR -((PredefinedType = IfcWindowTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcElementType.ElementType)); -END_ENTITY; - -ENTITY IfcWorkCalendar - SUBTYPE OF (IfcControl); - WorkingTimes : OPTIONAL SET [1:?] OF IfcWorkTime; - ExceptionTimes : OPTIONAL SET [1:?] OF IfcWorkTime; - PredefinedType : OPTIONAL IfcWorkCalendarTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR (PredefinedType <> IfcWorkCalendarTypeEnum.USERDEFINED) OR -((PredefinedType = IfcWorkCalendarTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcObject.ObjectType)); -END_ENTITY; - -ENTITY IfcWorkControl - ABSTRACT SUPERTYPE OF (ONEOF - (IfcWorkPlan - ,IfcWorkSchedule)) - SUBTYPE OF (IfcControl); - CreationDate : IfcDateTime; - Creators : OPTIONAL SET [1:?] OF IfcPerson; - Purpose : OPTIONAL IfcLabel; - Duration : OPTIONAL IfcDuration; - TotalFloat : OPTIONAL IfcDuration; - StartTime : IfcDateTime; - FinishTime : OPTIONAL IfcDateTime; -END_ENTITY; - -ENTITY IfcWorkPlan - SUBTYPE OF (IfcWorkControl); - PredefinedType : OPTIONAL IfcWorkPlanTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR (PredefinedType <> IfcWorkPlanTypeEnum.USERDEFINED) OR -((PredefinedType = IfcWorkPlanTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcObject.ObjectType)); -END_ENTITY; - -ENTITY IfcWorkSchedule - SUBTYPE OF (IfcWorkControl); - PredefinedType : OPTIONAL IfcWorkScheduleTypeEnum; - WHERE - CorrectPredefinedType : NOT(EXISTS(PredefinedType)) OR (PredefinedType <> IfcWorkScheduleTypeEnum.USERDEFINED) OR -((PredefinedType = IfcWorkScheduleTypeEnum.USERDEFINED) AND EXISTS(SELF\IfcObject.ObjectType)); -END_ENTITY; - -ENTITY IfcWorkTime - SUBTYPE OF (IfcSchedulingTime); - RecurrencePattern : OPTIONAL IfcRecurrencePattern; - Start : OPTIONAL IfcDate; - Finish : OPTIONAL IfcDate; -END_ENTITY; - -ENTITY IfcZShapeProfileDef - SUBTYPE OF (IfcParameterizedProfileDef); - Depth : IfcPositiveLengthMeasure; - FlangeWidth : IfcPositiveLengthMeasure; - WebThickness : IfcPositiveLengthMeasure; - FlangeThickness : IfcPositiveLengthMeasure; - FilletRadius : OPTIONAL IfcNonNegativeLengthMeasure; - EdgeRadius : OPTIONAL IfcNonNegativeLengthMeasure; - WHERE - ValidFlangeThickness : FlangeThickness < (Depth / 2.); -END_ENTITY; - -ENTITY IfcZone - SUBTYPE OF (IfcSystem); - LongName : OPTIONAL IfcLabel; - WHERE - WR1 : (SIZEOF(SELF\IfcGroup.IsGroupedBy) = 0) OR - (SIZEOF (QUERY (temp <* SELF\IfcGroup.IsGroupedBy[1].RelatedObjects | - NOT(('IFC4.IFCZONE' IN TYPEOF(temp)) OR - ('IFC4.IFCSPACE' IN TYPEOF(temp)) OR - ('IFC4.IFCSPATIALZONE' IN TYPEOF(temp)) - ))) = 0); -END_ENTITY; - -FUNCTION IfcAssociatedSurface -(Arg : IfcPcurve) : IfcSurface; - - LOCAL - Surf : IfcSurface; - END_LOCAL; - - Surf := Arg\IfcPcurve.BasisSurface; - - RETURN(Surf); -END_FUNCTION; - -FUNCTION IfcBaseAxis -(Dim : INTEGER; - Axis1, Axis2, Axis3 : IfcDirection) - : LIST [2:3] OF IfcDirection; - -LOCAL - U : LIST [2:3] OF IfcDirection; - Factor : REAL; - D1, D2 : IfcDirection; -END_LOCAL; - - IF (Dim = 3) THEN - D1 := NVL(IfcNormalise(Axis3), IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcDirection([0.0,0.0,1.0])); - D2 := IfcFirstProjAxis(D1, Axis1); - U := [D2, IfcSecondProjAxis(D1, D2, Axis2), D1]; - ELSE - IF EXISTS(Axis1) THEN - D1 := IfcNormalise(Axis1); - U := [D1, IfcOrthogonalComplement(D1)]; - IF EXISTS(Axis2) THEN - Factor := IfcDotProduct(Axis2, U[2]); - IF (Factor < 0.0) THEN - U[2].DirectionRatios[1] := -U[2].DirectionRatios[1]; - U[2].DirectionRatios[2] := -U[2].DirectionRatios[2]; - END_IF; - END_IF; - ELSE - IF EXISTS(Axis2) THEN - D1 := IfcNormalise(Axis2); - U := [IfcOrthogonalComplement(D1), D1]; - U[1].DirectionRatios[1] := -U[1].DirectionRatios[1]; - U[1].DirectionRatios[2] := -U[1].DirectionRatios[2]; - ELSE - U := [IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcDirection([1.0, 0.0]), - IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcDirection([0.0, 1.0])]; - END_IF; - END_IF; - END_IF; - RETURN(U); -END_FUNCTION; - -FUNCTION IfcBooleanChoose -(B : BOOLEAN ; - Choice1, Choice2 : GENERIC : Item) : GENERIC : Item; - IF B THEN - RETURN (Choice1); - ELSE - RETURN (Choice2); - END_IF; -END_FUNCTION; - -FUNCTION IfcBuild2Axes -(RefDirection : IfcDirection) - : LIST [2:2] OF IfcDirection; -LOCAL - D : IfcDirection := NVL(IfcNormalise(RefDirection), - IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcDirection([1.0,0.0])); -END_LOCAL; - RETURN([D, IfcOrthogonalComplement(D)]); -END_FUNCTION; - -FUNCTION IfcBuildAxes -(Axis, RefDirection : IfcDirection) - : LIST [3:3] OF IfcDirection; -LOCAL - D1, D2 : IfcDirection; -END_LOCAL; - D1 := NVL(IfcNormalise(Axis), IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcDirection([0.0,0.0,1.0])); - D2 := IfcFirstProjAxis(D1, RefDirection); - RETURN ([D2, IfcNormalise(IfcCrossProduct(D1,D2))\IfcVector.Orientation, D1]); -END_FUNCTION; - -FUNCTION IfcConsecutiveSegments -(Segments : LIST [1:?] OF IfcSegmentIndexSelect) - : BOOLEAN; - - LOCAL - Result : BOOLEAN := TRUE; - END_LOCAL; - - REPEAT i := 1 TO (HIINDEX(Segments)-1); - IF Segments[i][HIINDEX(Segments[i])] <> Segments[i+1][1] THEN - BEGIN - Result := FALSE; - ESCAPE; - END; - END_IF; - END_REPEAT; - - RETURN (Result); -END_FUNCTION; - -FUNCTION IfcConstraintsParamBSpline -( Degree, UpKnots, UpCp : INTEGER; - KnotMult : LIST OF INTEGER; - Knots : LIST OF IfcParameterValue ) -: BOOLEAN; - - - LOCAL - Result : BOOLEAN := TRUE; - K, Sum : INTEGER; - END_LOCAL; - - (* Find sum of knot multiplicities. *) - Sum := KnotMult[1]; - REPEAT i := 2 TO UpKnots; - Sum := Sum + KnotMult[i]; - END_REPEAT; - - (* Check limits holding for all B-spline parametrisations *) - IF (Degree < 1) OR (UpKnots < 2) OR (UpCp < Degree) OR - (Sum <> (Degree + UpCp + 2)) THEN - Result := FALSE; - RETURN(Result); - END_IF; - - K := KnotMult[1]; - IF (K < 1) OR (K > Degree + 1) THEN - Result := FALSE; - RETURN(Result); - END_IF; - - REPEAT i := 2 TO UpKnots; - IF (KnotMult[i] < 1) OR (Knots[i] <= Knots[i-1]) THEN - Result := FALSE; - RETURN(Result); - END_IF; - K := KnotMult[i]; - IF (i < UpKnots) AND (K > Degree) THEN - Result := FALSE; - RETURN(Result); - END_IF; - IF (i = UpKnots) AND (K > Degree + 1) THEN - Result := FALSE; - RETURN(Result); - END_IF; - END_REPEAT; - - RETURN(result); -END_FUNCTION; - -FUNCTION IfcConvertDirectionInto2D -(Direction : IfcDirection) - : IfcDirection; - - LOCAL - Direction2D : IfcDirection := IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcDirection([0.,1.]); - END_LOCAL; - - Direction2D.DirectionRatios[1] := Direction.DirectionRatios[1]; - Direction2D.DirectionRatios[2] := Direction.DirectionRatios[2]; - - RETURN (Direction2D); -END_FUNCTION; - -FUNCTION IfcCorrectDimensions -(m : IfcUnitEnum; Dim : IfcDimensionalExponents) : LOGICAL; -CASE m OF - LENGTHUNIT : IF - Dim = (IfcDimensionalExponents (1, 0, 0, 0, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - MASSUNIT : IF - Dim = (IfcDimensionalExponents (0, 1, 0, 0, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - TIMEUNIT : IF - Dim = (IfcDimensionalExponents (0, 0, 1, 0, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - ELECTRICCURRENTUNIT : IF - Dim = (IfcDimensionalExponents (0, 0, 0, 1, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - THERMODYNAMICTEMPERATUREUNIT : IF - Dim = (IfcDimensionalExponents (0, 0, 0, 0, 1, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - AMOUNTOFSUBSTANCEUNIT : IF - Dim = (IfcDimensionalExponents (0, 0, 0, 0, 0, 1, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - LUMINOUSINTENSITYUNIT : IF - Dim = (IfcDimensionalExponents (0, 0, 0, 0, 0, 0, 1)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - PLANEANGLEUNIT : IF - Dim = (IfcDimensionalExponents (0, 0, 0, 0, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - SOLIDANGLEUNIT : IF - Dim = (IfcDimensionalExponents (0, 0, 0, 0, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - AREAUNIT : IF - Dim = (IfcDimensionalExponents (2, 0, 0, 0, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - VOLUMEUNIT : IF - Dim = (IfcDimensionalExponents (3, 0, 0, 0, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - - ABSORBEDDOSEUNIT : IF - Dim = (IfcDimensionalExponents (2, 0, -2, 0, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - RADIOACTIVITYUNIT : IF - Dim = (IfcDimensionalExponents (0, 0, -1, 0, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - ELECTRICCAPACITANCEUNIT : IF - Dim = (IfcDimensionalExponents (-2, -1, 4, 2, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - DOSEEQUIVALENTUNIT : IF - Dim = (IfcDimensionalExponents (2, 0, -2, 0, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - ELECTRICCHARGEUNIT : IF - Dim = (IfcDimensionalExponents (0, 0, 1, 1, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - ELECTRICCONDUCTANCEUNIT : IF - Dim = (IfcDimensionalExponents (-2, -1, 3, 2, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - ELECTRICVOLTAGEUNIT : IF - Dim = (IfcDimensionalExponents (2, 1, -3, -1, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - ELECTRICRESISTANCEUNIT : IF - Dim = (IfcDimensionalExponents (2, 1, -3, -2, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - ENERGYUNIT : IF - Dim = (IfcDimensionalExponents (2, 1, -2, 0, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - FORCEUNIT : IF - Dim = (IfcDimensionalExponents (1, 1, -2, 0, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - FREQUENCYUNIT : IF - Dim = (IfcDimensionalExponents (0, 0, -1, 0, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - INDUCTANCEUNIT : IF - Dim = (IfcDimensionalExponents (2, 1, -2, -2, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - ILLUMINANCEUNIT : IF - Dim = (IfcDimensionalExponents (-2, 0, 0, 0, 0, 0, 1)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - LUMINOUSFLUXUNIT : IF - Dim = (IfcDimensionalExponents (0, 0, 0, 0, 0, 0, 1)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - MAGNETICFLUXUNIT : IF - Dim = (IfcDimensionalExponents (2, 1, -2, -1, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - MAGNETICFLUXDENSITYUNIT : IF - Dim = (IfcDimensionalExponents (0, 1, -2, -1, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - POWERUNIT : IF - Dim = (IfcDimensionalExponents (2, 1, -3, 0, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - PRESSUREUNIT : IF - Dim = (IfcDimensionalExponents (-1, 1, -2, 0, 0, 0, 0)) - THEN RETURN(TRUE); - ELSE RETURN(FALSE); - END_IF; - - OTHERWISE : - RETURN (UNKNOWN); -END_CASE; -END_FUNCTION; - -FUNCTION IfcCorrectFillAreaStyle -(Styles : SET[1:?] OF IfcFillStyleSelect) - :LOGICAL; - -LOCAL - Hatching : INTEGER := 0; - Tiles : INTEGER := 0; - Colour : INTEGER := 0; - External : INTEGER := 0; -END_LOCAL; - - -External := SIZEOF(QUERY(Style <* Styles | - 'IFC4.IFCEXTERNALLYDEFINEDHATCHSTYLE' IN - TYPEOF(Style))); - -Hatching := SIZEOF(QUERY(Style <* Styles | - 'IFC4.IFCFILLAREASTYLEHATCHING' IN - TYPEOF(Style))); - -Tiles := SIZEOF(QUERY(Style <* Styles | - 'IFC4.IFCFILLAREASTYLETILES' IN - TYPEOF(Style))); - -Colour := SIZEOF(QUERY(Style <* Styles | - 'IFC4.IFCCOLOUR' IN - TYPEOF(Style))); - - -IF (External > 1) THEN - RETURN (FALSE); -END_IF; - - -IF ((External = 1) AND ((Hatching > 0) OR (Tiles > 0) OR (Colour > 0))) THEN - RETURN (FALSE); -END_IF; - - -IF (Colour > 1) THEN - RETURN (FALSE); -END_IF; - -IF ((Hatching > 0) AND (Tiles >0)) THEN - RETURN (FALSE); -END_IF; - -RETURN(TRUE); -END_FUNCTION; - -FUNCTION IfcCorrectLocalPlacement -(AxisPlacement:IfcAxis2Placement; - RelPlacement : IfcObjectPlacement):LOGICAL; - - IF (EXISTS(RelPlacement)) THEN - IF ('IFC4.IFCGRIDPLACEMENT' IN TYPEOF(RelPlacement)) THEN - RETURN(?); - END_IF; - IF ('IFC4.IFCLOCALPLACEMENT' IN TYPEOF(RelPlacement)) THEN - IF ('IFC4.IFCAXIS2PLACEMENT2D' IN TYPEOF(AxisPlacement)) THEN - RETURN(TRUE); - END_IF; - IF ('IFC4.IFCAXIS2PLACEMENT3D' IN TYPEOF(AxisPlacement)) THEN - IF (RelPlacement\IfcLocalPlacement.RelativePlacement.Dim = 3) THEN - RETURN(TRUE); - ELSE - RETURN(FALSE); - END_IF; - END_IF; - END_IF; - ELSE - RETURN(TRUE); - END_IF; - RETURN(?); -END_FUNCTION; - -FUNCTION IfcCorrectObjectAssignment -(Constraint: IfcObjectTypeEnum; Objects : SET[1:?] OF IfcObjectDefinition) - : LOGICAL ; - -LOCAL - Count : INTEGER := 0; -END_LOCAL; - - IF NOT(EXISTS(Constraint)) THEN - RETURN(TRUE); - END_IF; - - CASE Constraint OF - IfcObjectTypeEnum.NOTDEFINED : RETURN(TRUE); - IfcObjectTypeEnum.PRODUCT : - BEGIN - Count := SIZEOF(QUERY(temp <* Objects | NOT('IFC4.IFCPRODUCT' IN TYPEOF(temp)))); - RETURN(Count = 0); - END; - IfcObjectTypeEnum.PROCESS : - BEGIN - Count := SIZEOF(QUERY(temp <* Objects | NOT('IFC4.IFCPROCESS' IN TYPEOF(temp)))); - RETURN(Count = 0); - END; - IfcObjectTypeEnum.CONTROL : - BEGIN - Count := SIZEOF(QUERY(temp <* Objects | NOT('IFC4.IFCCONTROL' IN TYPEOF(temp)))); - RETURN(Count = 0); - END; - IfcObjectTypeEnum.RESOURCE : - BEGIN - Count := SIZEOF(QUERY(temp <* Objects | NOT('IFC4.IFCRESOURCE' IN TYPEOF(temp)))); - RETURN(Count = 0); - END; - IfcObjectTypeEnum.ACTOR : - BEGIN - Count := SIZEOF(QUERY(temp <* Objects | NOT('IFC4.IFCACTOR' IN TYPEOF(temp)))); - RETURN(Count = 0); - END; - IfcObjectTypeEnum.GROUP : - BEGIN - Count := SIZEOF(QUERY(temp <* Objects | NOT('IFC4.IFCGROUP' IN TYPEOF(temp)))); - RETURN(Count = 0); - END; - IfcObjectTypeEnum.PROJECT : - BEGIN - Count := SIZEOF(QUERY(temp <* Objects | NOT('IFC4.IFCPROJECT' IN TYPEOF(temp)))); - RETURN(Count = 0); - END; - OTHERWISE : RETURN(?); - END_CASE; -END_FUNCTION; - -FUNCTION IfcCorrectUnitAssignment -(Units : SET [1:?] OF IfcUnit) - : LOGICAL; - - LOCAL - NamedUnitNumber : INTEGER := 0; - DerivedUnitNumber : INTEGER := 0; - MonetaryUnitNumber : INTEGER := 0; - NamedUnitNames : SET OF IfcUnitEnum := []; - DerivedUnitNames : SET OF IfcDerivedUnitEnum := []; - END_LOCAL; - - NamedUnitNumber := SIZEOF(QUERY(temp <* Units | ('IFC4.IFCNAMEDUNIT' IN TYPEOF(temp)) AND NOT(temp\IfcNamedUnit.UnitType = IfcUnitEnum.USERDEFINED))); - DerivedUnitNumber := SIZEOF(QUERY(temp <* Units | ('IFC4.IFCDERIVEDUNIT' IN TYPEOF(temp)) AND NOT(temp\IfcDerivedUnit.UnitType = IfcDerivedUnitEnum.USERDEFINED))); - MonetaryUnitNumber := SIZEOF(QUERY(temp <* Units | 'IFC4.IFCMONETARYUNIT' IN TYPEOF(temp))); - - REPEAT i := 1 TO SIZEOF(Units); - IF (('IFC4.IFCNAMEDUNIT' IN TYPEOF(Units[i])) AND NOT(Units[i]\IfcNamedUnit.UnitType = IfcUnitEnum.USERDEFINED)) THEN - NamedUnitNames := NamedUnitNames + Units[i]\IfcNamedUnit.UnitType; - END_IF; - IF (('IFC4.IFCDERIVEDUNIT' IN TYPEOF(Units[i])) AND NOT(Units[i]\IfcDerivedUnit.UnitType = IfcDerivedUnitEnum.USERDEFINED)) THEN - DerivedUnitNames := DerivedUnitNames + Units[i]\IfcDerivedUnit.UnitType; - END_IF; - END_REPEAT; - - RETURN((SIZEOF(NamedUnitNames) = NamedUnitNumber) AND (SIZEOF(DerivedUnitNames) = DerivedUnitNumber) AND (MonetaryUnitNumber <= 1)); -END_FUNCTION; - -FUNCTION IfcCrossProduct -(Arg1, Arg2 : IfcDirection) - : IfcVector; -LOCAL - Mag : REAL; - Res : IfcDirection; - V1,V2 : LIST[3:3] OF REAL; - Result : IfcVector; -END_LOCAL; - - IF (NOT EXISTS (Arg1) OR (Arg1.Dim = 2)) OR (NOT EXISTS (Arg2) OR (Arg2.Dim = 2)) THEN - RETURN(?); - ELSE - BEGIN - V1 := IfcNormalise(Arg1)\IfcDirection.DirectionRatios; - - V2 := IfcNormalise(Arg2)\IfcDirection.DirectionRatios; - Res := IfcRepresentationItem() || IfcGeometricRepresentationItem () - || IfcDirection([(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.DirectionRatios[i]*Res.DirectionRatios[i]; - END_REPEAT; - IF (Mag > 0.0) THEN - Result := IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcVector(Res, SQRT(Mag)); - ELSE - Result := IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcVector(Arg1, 0.0); - END_IF; - RETURN(Result); - END; - END_IF; -END_FUNCTION; - -FUNCTION IfcCurveDim -(Curve : IfcCurve) - : IfcDimensionCount; - - IF ('IFC4.IFCLINE' IN TYPEOF(Curve)) - THEN RETURN(Curve\IfcLine.Pnt.Dim); - END_IF; - IF ('IFC4.IFCCONIC' IN TYPEOF(Curve)) - THEN RETURN(Curve\IfcConic.Position.Dim); - END_IF; - IF ('IFC4.IFCPOLYLINE' IN TYPEOF(Curve)) - THEN RETURN(Curve\IfcPolyline.Points[1].Dim); - END_IF; - IF ('IFC4.IFCTRIMMEDCURVE' IN TYPEOF(Curve)) - THEN RETURN(IfcCurveDim(Curve\IfcTrimmedCurve.BasisCurve)); - END_IF; - IF ('IFC4.IFCCOMPOSITECURVE' IN TYPEOF(Curve)) - THEN RETURN(Curve\IfcCompositeCurve.Segments[1].Dim); - END_IF; - IF ('IFC4.IFCBSPLINECURVE' IN TYPEOF(Curve)) - THEN RETURN(Curve\IfcBSplineCurve.ControlPointsList[1].Dim); - END_IF; - IF ('IFC4.IFCOFFSETCURVE2D' IN TYPEOF(Curve)) - THEN RETURN(2); - END_IF; - IF ('IFC4.IFCOFFSETCURVE3D' IN TYPEOF(Curve)) - THEN RETURN(3); - END_IF; - IF ('IFC4.IFCPCURVE' IN TYPEOF(Curve)) - THEN RETURN(3); - END_IF; - IF ('IFC4.IFCINDEXEDPOLYCURVE' IN TYPEOF(Curve)) - THEN RETURN(Curve\IfcIndexedPolyCurve.Points.Dim); - END_IF; -RETURN (?); -END_FUNCTION; - -FUNCTION IfcCurveWeightsPositive -( B: IfcRationalBSplineCurveWithKnots) -: BOOLEAN; - - LOCAL - Result : BOOLEAN := TRUE; - END_LOCAL; - - REPEAT i := 0 TO B.UpperIndexOnControlPoints; - IF B.Weights[i] <= 0.0 THEN - Result := FALSE; - RETURN(Result); - END_IF; - END_REPEAT; - RETURN(Result); -END_FUNCTION; - -FUNCTION IfcDeriveDimensionalExponents -(UnitElements : SET [1:?] OF IfcDerivedUnitElement) - : IfcDimensionalExponents; - LOCAL - Result : IfcDimensionalExponents := - IfcDimensionalExponents(0, 0, 0, 0, 0, 0, 0); - END_LOCAL; - REPEAT i := LOINDEX(UnitElements) TO HIINDEX(UnitElements); - Result.LengthExponent := Result.LengthExponent + - (UnitElements[i].Exponent * - UnitElements[i].Unit.Dimensions.LengthExponent); - Result.MassExponent := Result.MassExponent + - (UnitElements[i].Exponent * - UnitElements[i].Unit.Dimensions.MassExponent); - Result.TimeExponent := Result.TimeExponent + - (UnitElements[i].Exponent * - UnitElements[i].Unit.Dimensions.TimeExponent); - Result.ElectricCurrentExponent := Result.ElectricCurrentExponent + - (UnitElements[i].Exponent * - UnitElements[i].Unit.Dimensions.ElectricCurrentExponent); - Result.ThermodynamicTemperatureExponent := Result.ThermodynamicTemperatureExponent + - (UnitElements[i].Exponent * - UnitElements[i].Unit.Dimensions.ThermodynamicTemperatureExponent); - Result.AmountOfSubstanceExponent := Result.AmountOfSubstanceExponent + - (UnitElements[i].Exponent * - UnitElements[i].Unit.Dimensions.AmountOfSubstanceExponent); - Result.LuminousIntensityExponent := Result.LuminousIntensityExponent + - (UnitElements[i].Exponent * - UnitElements[i].Unit.Dimensions.LuminousIntensityExponent); - END_REPEAT; - RETURN (Result); -END_FUNCTION; - -FUNCTION IfcDimensionsForSiUnit -(n : IfcSiUnitName ) : IfcDimensionalExponents; - CASE n OF - METRE : RETURN (IfcDimensionalExponents - (1, 0, 0, 0, 0, 0, 0)); - SQUARE_METRE : RETURN (IfcDimensionalExponents - (2, 0, 0, 0, 0, 0, 0)); - CUBIC_METRE : RETURN (IfcDimensionalExponents - (3, 0, 0, 0, 0, 0, 0)); - GRAM : RETURN (IfcDimensionalExponents - (0, 1, 0, 0, 0, 0, 0)); - SECOND : RETURN (IfcDimensionalExponents - (0, 0, 1, 0, 0, 0, 0)); - AMPERE : RETURN (IfcDimensionalExponents - (0, 0, 0, 1, 0, 0, 0)); - KELVIN : RETURN (IfcDimensionalExponents - (0, 0, 0, 0, 1, 0, 0)); - MOLE : RETURN (IfcDimensionalExponents - (0, 0, 0, 0, 0, 1, 0)); - CANDELA : RETURN (IfcDimensionalExponents - (0, 0, 0, 0, 0, 0, 1)); - RADIAN : RETURN (IfcDimensionalExponents - (0, 0, 0, 0, 0, 0, 0)); - STERADIAN : RETURN (IfcDimensionalExponents - (0, 0, 0, 0, 0, 0, 0)); - HERTZ : RETURN (IfcDimensionalExponents - (0, 0, -1, 0, 0, 0, 0)); - NEWTON : RETURN (IfcDimensionalExponents - (1, 1, -2, 0, 0, 0, 0)); - PASCAL : RETURN (IfcDimensionalExponents - (-1, 1, -2, 0, 0, 0, 0)); - JOULE : RETURN (IfcDimensionalExponents - (2, 1, -2, 0, 0, 0, 0)); - WATT : RETURN (IfcDimensionalExponents - (2, 1, -3, 0, 0, 0, 0)); - COULOMB : RETURN (IfcDimensionalExponents - (0, 0, 1, 1, 0, 0, 0)); - VOLT : RETURN (IfcDimensionalExponents - (2, 1, -3, -1, 0, 0, 0)); - FARAD : RETURN (IfcDimensionalExponents - (-2, -1, 4, 2, 0, 0, 0)); - OHM : RETURN (IfcDimensionalExponents - (2, 1, -3, -2, 0, 0, 0)); - SIEMENS : RETURN (IfcDimensionalExponents - (-2, -1, 3, 2, 0, 0, 0)); - WEBER : RETURN (IfcDimensionalExponents - (2, 1, -2, -1, 0, 0, 0)); - TESLA : RETURN (IfcDimensionalExponents - (0, 1, -2, -1, 0, 0, 0)); - HENRY : RETURN (IfcDimensionalExponents - (2, 1, -2, -2, 0, 0, 0)); - DEGREE_CELSIUS : RETURN (IfcDimensionalExponents - (0, 0, 0, 0, 1, 0, 0)); - LUMEN : RETURN (IfcDimensionalExponents - (0, 0, 0, 0, 0, 0, 1)); - LUX : RETURN (IfcDimensionalExponents - (-2, 0, 0, 0, 0, 0, 1)); - BECQUEREL : RETURN (IfcDimensionalExponents - (0, 0, -1, 0, 0, 0, 0)); - GRAY : RETURN (IfcDimensionalExponents - (2, 0, -2, 0, 0, 0, 0)); - SIEVERT : RETURN (IfcDimensionalExponents - (2, 0, -2, 0, 0, 0, 0)); - OTHERWISE : RETURN (IfcDimensionalExponents - (0, 0, 0, 0, 0, 0, 0)); - END_CASE; -END_FUNCTION; - -FUNCTION IfcDotProduct -(Arg1, Arg2 : IfcDirection) - : REAL; -LOCAL - Scalar : REAL; - Vec1, Vec2 : IfcDirection; - Ndim : INTEGER; -END_LOCAL; - - IF NOT EXISTS (Arg1) OR NOT EXISTS (Arg2) THEN - Scalar := ?; - ELSE - IF (Arg1.Dim <> Arg2.Dim) THEN - Scalar := ?; - ELSE - BEGIN - Vec1 := IfcNormalise(Arg1); - Vec2 := IfcNormalise(Arg2); - Ndim := Arg1.Dim; - Scalar := 0.0; - REPEAT i := 1 TO Ndim; - Scalar := Scalar + Vec1.DirectionRatios[i]*Vec2.DirectionRatios[i]; - END_REPEAT; - END; - END_IF; - END_IF; - RETURN (Scalar); -END_FUNCTION; - -FUNCTION IfcFirstProjAxis -(ZAxis, Arg : IfcDirection) : IfcDirection; -LOCAL - XAxis : IfcDirection; - V : IfcDirection; - Z : IfcDirection; - XVec : IfcVector; -END_LOCAL; - - IF (NOT EXISTS(ZAxis)) THEN - RETURN (?) ; - ELSE - Z := IfcNormalise(ZAxis); - IF NOT EXISTS(Arg) THEN - IF (Z.DirectionRatios <> [1.0,0.0,0.0]) THEN - V := IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcDirection([1.0,0.0,0.0]); - ELSE - V := IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcDirection([0.0,1.0,0.0]); - END_IF; - ELSE - IF (Arg.Dim <> 3) THEN - RETURN (?) ; - END_IF; - IF ((IfcCrossProduct(Arg,Z).Magnitude) = 0.0) THEN - RETURN (?); - ELSE - V := IfcNormalise(Arg); - END_IF; - END_IF; - XVec := IfcScalarTimesVector(IfcDotProduct(V, Z), Z); - XAxis := IfcVectorDifference(V, XVec).Orientation; - XAxis := IfcNormalise(XAxis); - END_IF; - RETURN(XAxis); -END_FUNCTION; - -FUNCTION IfcGetBasisSurface -(C : IfcCurveOnSurface) : SET[0:2] OF IfcSurface; - - LOCAL - Surfs : SET[0:2] OF IfcSurface; - N : INTEGER; - END_LOCAL; - - Surfs := []; - IF 'IFC4.IFCPCURVE' IN TYPEOF (C) THEN - Surfs := [C\IfcPCurve.BasisSurface]; - ELSE - IF 'IFC4.IFCSURFACECURVE' IN TYPEOF (C) THEN - N := SIZEOF(C\IfcSurfaceCurve.AssociatedGeometry); - REPEAT i := 1 TO N; - Surfs := Surfs + IfcAssociatedSurface(C\IfcSurfaceCurve.AssociatedGeometry[i]); - END_REPEAT; - END_IF; - END_IF; - IF 'IFC4.IFCCOMPOSITECURVEONSURFACE' IN TYPEOF (C) THEN - - (* For an IfcCompositeCurveOnSurface the BasisSurface is the intersection of the BasisSurface of all the segments. *) - - N := SIZEOF(C\IfcCompositeCurve.Segments); - Surfs := IfcGetBasisSurface(C\IfcCompositeCurve.Segments[1].ParentCurve); - IF N > 1 THEN - REPEAT i := 2 TO N; - Surfs := Surfs * IfcGetBasisSurface(C\IfcCompositeCurve.Segments[1].ParentCurve); - END_REPEAT; - END_IF; - END_IF; - RETURN(Surfs); -END_FUNCTION; - -FUNCTION IfcListToArray -(Lis : LIST [0:?] OF GENERIC : T; - Low,U : INTEGER) : ARRAY 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 IfcLoopHeadToTail -(ALoop : IfcEdgeLoop) : LOGICAL; - LOCAL - N : INTEGER; - P : LOGICAL := TRUE; - END_LOCAL; - - N := SIZEOF (ALoop.EdgeList); - REPEAT i := 2 TO N; - P := P AND (ALoop.EdgeList[i-1].EdgeEnd :=: - ALoop.EdgeList[i].EdgeStart); - END_REPEAT; - RETURN (P); -END_FUNCTION; - -FUNCTION IfcMakeArrayOfArray -(Lis : LIST[1:?] OF LIST [1:?] OF GENERIC : T; - Low1, U1, Low2, 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 := [IfcListToArray(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] := IfcListToArray(Lis[i], Low2, U2); - END_REPEAT; - RETURN (Res); -END_FUNCTION; - -FUNCTION IfcMlsTotalThickness -(LayerSet : IfcMaterialLayerSet) : IfcLengthMeasure; - LOCAL - Max : IfcLengthMeasure := LayerSet.MaterialLayers[1].LayerThickness; - END_LOCAL; - - IF SIZEOF(LayerSet.MaterialLayers) > 1 THEN - REPEAT i := 2 TO HIINDEX(LayerSet.MaterialLayers); - Max := Max + LayerSet.MaterialLayers[i].LayerThickness; - END_REPEAT; - END_IF; - RETURN (Max); -END_FUNCTION; - -FUNCTION IfcNormalise -(Arg : IfcVectorOrDirection) - : IfcVectorOrDirection; -LOCAL - Ndim : INTEGER; - V : IfcDirection - := IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcDirection([1.,0.]); - Vec : IfcVector - := IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcVector ( - IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcDirection([1.,0.]), 1.); - Mag : REAL; - Result : IfcVectorOrDirection - := V; -END_LOCAL; - - IF NOT EXISTS (Arg) THEN - RETURN (?); - ELSE - IF 'IFC4.IFCVECTOR' IN TYPEOF(Arg) THEN - BEGIN - Ndim := Arg\IfcVector.Dim; - V.DirectionRatios := Arg\IfcVector.Orientation.DirectionRatios; - Vec.Magnitude := Arg\IfcVector.Magnitude; - Vec.Orientation := V; - IF Arg\IfcVector.Magnitude = 0.0 THEN - RETURN(?); - ELSE - Vec.Magnitude := 1.0; - END_IF; - END; - ELSE - BEGIN - Ndim := Arg\IfcDirection.Dim; - V.DirectionRatios := Arg\IfcDirection.DirectionRatios; - END; - END_IF; - - Mag := 0.0; - REPEAT i := 1 TO Ndim; - Mag := Mag + V.DirectionRatios[i]*V.DirectionRatios[i]; - END_REPEAT; - IF Mag > 0.0 THEN - Mag := SQRT(Mag); - REPEAT i := 1 TO Ndim; - V.DirectionRatios[i] := V.DirectionRatios[i]/Mag; - END_REPEAT; - IF 'IFC4.IFCVECTOR' 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 IfcOrthogonalComplement -(Vec : IfcDirection) - : IfcDirection; -LOCAL - Result : IfcDirection ; -END_LOCAL; - IF NOT EXISTS (Vec) OR (Vec.Dim <> 2) THEN - RETURN(?); - ELSE - Result := IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcDirection([-Vec.DirectionRatios[2], Vec.DirectionRatios[1]]); - RETURN(Result); - END_IF; -END_FUNCTION; - -FUNCTION IfcPathHeadToTail -(APath : IfcPath) : LOGICAL; - LOCAL - N : INTEGER := 0; - P : LOGICAL := UNKNOWN; - END_LOCAL; - N := SIZEOF (APath.EdgeList); - REPEAT i := 2 TO N; - P := P AND (APath.EdgeList[i-1].EdgeEnd :=: - APath.EdgeList[i].EdgeStart); - END_REPEAT; - RETURN (P); -END_FUNCTION; - -FUNCTION IfcPointListDim -(PointList : IfcCartesianPointList) - : IfcDimensionCount; - - IF ('IFC4.IFCCARTESIANPOINTLIST2D' IN TYPEOF(PointList)) - THEN RETURN(2); - END_IF; - IF ('IFC4.IFCCARTESIANPOINTLIST3D' IN TYPEOF(PointList)) - THEN RETURN(3); - END_IF; - RETURN (?); -END_FUNCTION; - -FUNCTION IfcSameAxis2Placement -(ap1, ap2 : IfcAxis2Placement; Epsilon : REAL) - : LOGICAL ; - - RETURN (IfcSameDirection(ap1.P[1],ap2.P[1],Epsilon) AND - IfcSameDirection(ap1.P[2],ap2.P[2],Epsilon) AND - IfcSameCartesianPoint(ap1.Location,ap1.Location,Epsilon)); -END_FUNCTION; - -FUNCTION IfcSameCartesianPoint -(cp1, cp2 : IfcCartesianPoint; Epsilon : REAL) - : LOGICAL; - - LOCAL - cp1x : REAL := cp1.Coordinates[1]; - cp1y : REAL := cp1.Coordinates[2]; - cp1z : REAL := 0; - cp2x : REAL := cp2.Coordinates[1]; - cp2y : REAL := cp2.Coordinates[2]; - cp2z : REAL := 0; - END_LOCAL; - - IF (SIZEOF(cp1.Coordinates) > 2) THEN - cp1z := cp1.Coordinates[3]; - END_IF; - - IF (SIZEOF(cp2.Coordinates) > 2) THEN - cp2z := cp2.Coordinates[3]; - END_IF; - - RETURN (IfcSameValue(cp1x,cp2x,Epsilon) AND - IfcSameValue(cp1y,cp2y,Epsilon) AND - IfcSameValue(cp1z,cp2z,Epsilon)); -END_FUNCTION; - -FUNCTION IfcSameDirection -(dir1, dir2 : IfcDirection; Epsilon : REAL) - : LOGICAL; - LOCAL - dir1x : REAL := dir1.DirectionRatios[1]; - dir1y : REAL := dir1.DirectionRatios[2]; - dir1z : REAL := 0; - dir2x : REAL := dir2.DirectionRatios[1]; - dir2y : REAL := dir2.DirectionRatios[2]; - dir2z : REAL := 0; - END_LOCAL; - - IF (SIZEOF(dir1.DirectionRatios) > 2) THEN - dir1z := dir1.DirectionRatios[3]; - END_IF; - - IF (SIZEOF(dir2.DirectionRatios) > 2) THEN - dir2z := dir2.DirectionRatios[3]; - END_IF; - - RETURN (IfcSameValue(dir1x,dir2x,Epsilon) AND - IfcSameValue(dir1y,dir2y,Epsilon) AND - IfcSameValue(dir1z,dir2z,Epsilon)); -END_FUNCTION; - -FUNCTION IfcSameValidPrecision -(Epsilon1, Epsilon2 : REAL) : LOGICAL ; - LOCAL - ValidEps1, ValidEps2 : REAL; - DefaultEps : REAL := 0.000001; - DerivationOfEps : REAL := 1.001; - UpperEps : REAL := 1.0; - END_LOCAL; - - ValidEps1 := NVL(Epsilon1, DefaultEps); - ValidEps2 := NVL(Epsilon2, DefaultEps); - RETURN ((0.0 < ValidEps1) AND (ValidEps1 <= (DerivationOfEps * ValidEps2)) AND - (ValidEps2 <= (DerivationOfEps * ValidEps1)) AND (ValidEps2 < UpperEps)); -END_FUNCTION; - -FUNCTION IfcSameValue -(Value1, Value2 : REAL; Epsilon : REAL) - : LOGICAL; - LOCAL - ValidEps : REAL; - DefaultEps : REAL := 0.000001; - END_LOCAL; - - ValidEps := NVL(Epsilon, DefaultEps); - RETURN ((Value1 + ValidEps > Value2) AND (Value1 < Value2 + ValidEps)); -END_FUNCTION; - -FUNCTION IfcScalarTimesVector -(Scalar : REAL; Vec : IfcVectorOrDirection) - : IfcVector; -LOCAL - V : IfcDirection; - Mag : REAL; - Result : IfcVector; -END_LOCAL; - - IF NOT EXISTS (Scalar) OR NOT EXISTS (Vec) THEN - RETURN (?) ; - ELSE - IF 'IFC4.IFCVECTOR' IN TYPEOF (Vec) THEN - V := Vec\IfcVector.Orientation; - Mag := Scalar * Vec\IfcVector.Magnitude; - ELSE - V := Vec; - Mag := Scalar; - END_IF; - IF (Mag < 0.0 ) THEN - REPEAT i := 1 TO SIZEOF(V.DirectionRatios); - V.DirectionRatios[i] := -V.DirectionRatios[i]; - END_REPEAT; - Mag := -Mag; - END_IF; - Result := IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcVector(IfcNormalise(V), Mag); - END_IF; - RETURN (Result); -END_FUNCTION; - -FUNCTION IfcSecondProjAxis -(ZAxis, XAxis, Arg: IfcDirection) - : IfcDirection; -LOCAL - YAxis : IfcVector; - V : IfcDirection; - Temp : IfcVector; -END_LOCAL; - - IF NOT EXISTS(Arg) THEN - V := IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcDirection([0.0,1.0,0.0]); - ELSE - V := Arg; - END_IF; - Temp := IfcScalarTimesVector(IfcDotProduct(V, ZAxis), ZAxis); - YAxis := IfcVectorDifference(V, Temp); - Temp := IfcScalarTimesVector(IfcDotProduct(V, XAxis), XAxis); - YAxis := IfcVectorDifference(YAxis, Temp); - YAxis := IfcNormalise(YAxis); - RETURN(YAxis.Orientation); -END_FUNCTION; - -FUNCTION IfcShapeRepresentationTypes -(RepType : IfcLabel; Items : SET OF IfcRepresentationItem) : LOGICAL; - - LOCAL - Count : INTEGER := 0; - END_LOCAL; - - CASE RepType OF - 'Point' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | ('IFC4.IFCPOINT' IN TYPEOF(temp)))); - END; - - 'PointCloud' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | ('IFC4.IFCCARTESIANPOINTLIST3D' IN TYPEOF(temp)))); - END; - - 'Curve' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | ('IFC4.IFCCURVE' IN TYPEOF(temp)))); - END; - - 'Curve2D' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | ('IFC4.IFCCURVE' IN TYPEOF(temp)) - AND (temp\IfcCurve.Dim = 2))); - END; - - 'Curve3D' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | ('IFC4.IFCCURVE' IN TYPEOF(temp)) - AND (temp\IfcCurve.Dim = 3))); - END; - - 'Surface' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | ('IFC4.IFCSURFACE' IN TYPEOF(temp)))); - END; - - 'Surface2D' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | ('IFC4.IFCSURFACE' IN TYPEOF(temp)) - AND (temp\IfcSurface.Dim = 2))); - END; - - 'Surface3D' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | ('IFC4.IFCSURFACE' IN TYPEOF(temp)) - AND (temp\IfcSurface.Dim = 3))); - END; - - 'FillArea' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | ('IFC4.IFCANNOTATIONFILLAREA' IN TYPEOF(temp)))); - END; - - 'Text' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | ('IFC4.IFCTEXTLITERAL' IN TYPEOF(temp)))); - END; - - 'AdvancedSurface' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | 'IFC4.IFCBSPLINESURFACE' IN TYPEOF(temp))); - END; - - 'Annotation2D' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | ( - SIZEOF(TYPEOF(temp) * [ - 'IFC4.IFCPOINT', - 'IFC4.IFCCURVE', - 'IFC4.IFCGEOMETRICCURVESET', - 'IFC4.IFCANNOTATIONFILLAREA', - 'IFC4.IFCTEXTLITERAL']) = 1) - )); - END; - - 'GeometricSet' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | ('IFC4.IFCGEOMETRICSET' IN TYPEOF(temp)) - OR ('IFC4.IFCPOINT' IN TYPEOF(temp)) - OR ('IFC4.IFCCURVE' IN TYPEOF(temp)) - OR ('IFC4.IFCSURFACE' IN TYPEOF(temp)))); - END; - - 'GeometricCurveSet' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | ('IFC4.IFCGEOMETRICCURVESET' IN TYPEOF(temp)) - OR ('IFC4.IFCGEOMETRICSET' IN TYPEOF(temp)) - OR ('IFC4.IFCPOINT' IN TYPEOF(temp)) - OR ('IFC4.IFCCURVE' IN TYPEOF(temp)))); - REPEAT i:=1 TO HIINDEX(Items); - IF ('IFC4.IFCGEOMETRICSET' IN TYPEOF(Items[i])) - THEN - IF (SIZEOF(QUERY(temp <* Items[i]\IfcGeometricSet.Elements | 'IFC4.IFCSURFACE' IN TYPEOF(temp))) > 0) - THEN - Count := Count - 1; - END_IF; - END_IF; - END_REPEAT; - END; - - 'Tessellation' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | 'IFC4.IFCTESSELLATEDITEM' IN TYPEOF(temp))); - END; - - 'SurfaceOrSolidModel' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | SIZEOF([ - 'IFC4.IFCTESSELLATEDITEM', - 'IFC4.IFCSHELLBASEDSURFACEMODEL', - 'IFC4.IFCFACEBASEDSURFACEMODEL', - 'IFC4.IFCSOLIDMODEL'] * TYPEOF(temp)) >= 1 - )); - END; - - 'SurfaceModel' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | SIZEOF([ - 'IFC4.IFCTESSELLATEDITEM', - 'IFC4.IFCSHELLBASEDSURFACEMODEL', - 'IFC4.IFCFACEBASEDSURFACEMODEL'] * TYPEOF(temp)) >= 1 - )); - END; - - 'SolidModel' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | ('IFC4.IFCSOLIDMODEL' IN TYPEOF(temp)))); - END; - - 'SweptSolid' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | (SIZEOF([ - 'IFC4.IFCEXTRUDEDAREASOLID', - 'IFC4.IFCREVOLVEDAREASOLID'] * TYPEOF(temp)) >= 1 - ) AND (SIZEOF([ - 'IFC4.IFCEXTRUDEDAREASOLIDTAPERED', - 'IFC4.IFCREVOLVEDAREASOLIDTAPERED'] * TYPEOF(temp)) = 0 - ) - )); - END; - - 'AdvancedSweptSolid' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | SIZEOF([ - 'IFC4.IFCSWEPTAREASOLID', - 'IFC4.IFCSWEPTDISKSOLID'] * TYPEOF(temp)) >= 1 - )); - END; - - 'CSG' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | SIZEOF([ - 'IFC4.IFCBOOLEANRESULT', - 'IFC4.IFCCSGPRIMITIVE3D', - 'IFC4.IFCCSGSOLID'] * TYPEOF(temp)) >= 1 - )); - END; - - 'Clipping' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | SIZEOF([ - 'IFC4.IFCCSGSOLID', - 'IFC4.IFCBOOLEANCLIPPINGRESULT'] * TYPEOF(temp)) >= 1 - )); - END; - - 'Brep' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | ('IFC4.IFCFACETEDBREP' IN TYPEOF(temp)))); - END; - - 'AdvancedBrep' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | ('IFC4.IFCMANIFOLDSOLIDBREP' IN TYPEOF(temp)))); - END; - - 'BoundingBox' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | ('IFC4.IFCBOUNDINGBOX' IN TYPEOF(temp)))); - IF (SIZEOF(Items) > 1) - THEN - Count := 0; - END_IF; - END; - - 'SectionedSpine' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | ('IFC4.IFCSECTIONEDSPINE' IN TYPEOF(temp)))); - END; - - 'LightSource' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | ('IFC4.IFCLIGHTSOURCE' IN TYPEOF(temp)))); - END; - - 'MappedRepresentation' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | ('IFC4.IFCMAPPEDITEM' IN TYPEOF(temp)))); - END; - - OTHERWISE : RETURN(?); - END_CASE; - RETURN (Count = SIZEOF(Items)); -END_FUNCTION; - -FUNCTION IfcSurfaceWeightsPositive -( B: IfcRationalBSplineSurfaceWithKnots) -: BOOLEAN; - - LOCAL - Result : BOOLEAN := TRUE; - END_LOCAL; - - REPEAT i := 0 TO B\IfcBSplineSurface.UUpper; - REPEAT j := 0 TO B\IfcBSplineSurface.VUpper; - IF (B.Weights[i][j] <= 0.0) THEN - Result := FALSE; - RETURN(Result); - END_IF; - END_REPEAT; - END_REPEAT; - RETURN(Result); -END_FUNCTION; - -FUNCTION IfcTaperedSweptAreaProfiles -(StartArea, EndArea : IfcProfileDef) - : LOGICAL; - -LOCAL - Result : LOGICAL := FALSE; -END_LOCAL; - -IF ('IFC4.IFCPARAMETERIZEDPROFILEDEF' IN TYPEOF(StartArea)) THEN - IF ('IFC4.IFCDERIVEDPROFILEDEF' IN TYPEOF(EndArea)) THEN - Result := (StartArea :=: EndArea\IfcDerivedProfileDef.ParentProfile); - ELSE - Result := (TYPEOF(StartArea) = TYPEOF(EndArea)); - END_IF; -ELSE - IF ('IFC4.IFCDERIVEDPROFILEDEF' IN TYPEOF(EndArea)) THEN - Result := (StartArea :=: EndArea\IfcDerivedProfileDef.ParentProfile); - ELSE - Result := FALSE; - END_IF; -END_IF; - -RETURN(Result); -END_FUNCTION; - -FUNCTION IfcTopologyRepresentationTypes -(RepType : IfcLabel; Items : SET OF IfcRepresentationItem) : LOGICAL; - - LOCAL - Count : INTEGER := 0; - END_LOCAL; - - CASE RepType OF - 'Vertex' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | - ('IFC4.IFCVERTEX' IN TYPEOF(temp)))); - END; - 'Edge' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | - ('IFC4.IFCEDGE' IN TYPEOF(temp)))); - END; - 'Path' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | - ('IFC4.IFCPATH' IN TYPEOF(temp)))); - END; - 'Face' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | - ('IFC4.IFCFACE' IN TYPEOF(temp)))); - END; - 'Shell' : - BEGIN - Count := SIZEOF(QUERY(temp <* Items | - ('IFC4.IFCOPENSHELL' IN TYPEOF(temp)) - OR ('IFC4.IFCCLOSEDSHELL' IN TYPEOF(temp)))); - END; - 'Undefined': RETURN(TRUE); - OTHERWISE : RETURN(?); - END_CASE; - RETURN (Count = SIZEOF(Items)); -END_FUNCTION; - -FUNCTION IfcUniqueDefinitionNames -(Relations : SET [1:?] OF IfcRelDefinesByProperties) -:LOGICAL; - -LOCAL - Definition : IfcPropertySetDefinitionSelect; - DefinitionSet : IfcPropertySetDefinitionSet; - Properties : SET OF IfcPropertySetDefinition := []; - Result : LOGICAL; -END_LOCAL; - -IF SIZEOF(Relations) = 0 THEN - RETURN(TRUE); -END_IF; - -REPEAT i:=1 TO HIINDEX(Relations); - Definition := Relations[i].RelatingPropertyDefinition; - IF 'IFC4.IFCPROPERTYSETDEFINITION' IN TYPEOF(Definition) THEN - Properties := Properties + Definition; - ELSE - IF 'IFC4.IFCPROPERTYSETDEFINITIONSET' IN TYPEOF(Definition) THEN - BEGIN - DefinitionSet := Definition; - REPEAT j:= 1 TO HIINDEX(DefinitionSet); - Properties := Properties + DefinitionSet[j]; - END_REPEAT; - END; - END_IF; - END_IF; -END_REPEAT; - -Result := IfcUniquePropertySetNames(Properties); -RETURN (Result); -END_FUNCTION; - -FUNCTION IfcUniquePropertyName -(Properties : SET [1:?] OF IfcProperty) - :LOGICAL; - - LOCAL - Names : SET OF IfcIdentifier := []; - END_LOCAL; - - REPEAT i:=1 TO HIINDEX(Properties); - Names := Names + Properties[i].Name; - END_REPEAT; - - RETURN (SIZEOF(Names) = SIZEOF(Properties)); -END_FUNCTION; - -FUNCTION IfcUniquePropertySetNames -(Properties : SET [1:?] OF IfcPropertySetDefinition) -:LOGICAL; - -LOCAL - Names : SET OF IfcLabel := []; - Unnamed : INTEGER := 0; -END_LOCAL; - -REPEAT i:=1 TO HIINDEX(Properties); - IF 'IFC4.IFCPROPERTYSET' IN TYPEOF(Properties[i]) THEN - Names := Names + Properties[i]\IfcRoot.Name; - ELSE - Unnamed := Unnamed + 1; - END_IF; -END_REPEAT; - -RETURN (SIZEOF(Names) + Unnamed = SIZEOF(Properties)); -END_FUNCTION; - -FUNCTION IfcUniquePropertyTemplateNames -(Properties : SET [1:?] OF IfcPropertyTemplate) -:LOGICAL; - -LOCAL - Names : SET OF IfcLabel := []; -END_LOCAL; - -REPEAT i:=1 TO HIINDEX(Properties); - Names := Names + Properties[i].Name; -END_REPEAT; -RETURN (SIZEOF(Names) = SIZEOF(Properties)); -END_FUNCTION; - -FUNCTION IfcUniqueQuantityNames -(Properties : SET [1:?] OF IfcPhysicalQuantity) -:LOGICAL; - -LOCAL - Names : SET OF IfcLabel := []; -END_LOCAL; - -REPEAT i:=1 TO HIINDEX(Properties); - Names := Names + Properties[i].Name; -END_REPEAT; -RETURN (SIZEOF(Names) = SIZEOF(Properties)); -END_FUNCTION; - -FUNCTION IfcVectorDifference -(Arg1, Arg2 : IfcVectorOrDirection) - : IfcVector; -LOCAL - Result : IfcVector; - Res, Vec1, Vec2 : IfcDirection; - 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 'IFC4.IFCVECTOR' IN TYPEOF(Arg1) THEN - Mag1 := Arg1\IfcVector.Magnitude; - Vec1 := Arg1\IfcVector.Orientation; - ELSE - Mag1 := 1.0; - Vec1 := Arg1; - END_IF; - IF 'IFC4.IFCVECTOR' IN TYPEOF(Arg2) THEN - Mag2 := Arg2\IfcVector.Magnitude; - Vec2 := Arg2\IfcVector.Orientation; - ELSE - Mag2 := 1.0; - Vec2 := Arg2; - END_IF; - Vec1 := IfcNormalise (Vec1); - Vec2 := IfcNormalise (Vec2); - Ndim := SIZEOF(Vec1.DirectionRatios); - Mag := 0.0; - Res := IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcDirection([0.0:Ndim]); - - REPEAT i := 1 TO Ndim; - Res.DirectionRatios[i] := Mag1*Vec1.DirectionRatios[i] - Mag2*Vec2.DirectionRatios[i]; - Mag := Mag + (Res.DirectionRatios[i]*Res.DirectionRatios[i]); - END_REPEAT; - - IF (Mag > 0.0 ) THEN - Result := IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcVector( Res, SQRT(Mag)); - ELSE - Result := IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcVector( Vec1, 0.0); - END_IF; - END; - END_IF; - RETURN (Result); -END_FUNCTION; - -FUNCTION IfcVectorSum -(Arg1, Arg2 : IfcVectorOrDirection) - : IfcVector; -LOCAL - Result : IfcVector; - Res, Vec1, Vec2 : IfcDirection; - 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 'IFC4.IFCVECTOR' IN TYPEOF(Arg1) THEN - Mag1 := Arg1\IfcVector.Magnitude; - Vec1 := Arg1\IfcVector.Orientation; - ELSE - Mag1 := 1.0; - Vec1 := Arg1; - END_IF; - IF 'IFC4.IFCVECTOR' IN TYPEOF(Arg2) THEN - Mag2 := Arg2\IfcVector.Magnitude; - Vec2 := Arg2\IfcVector.Orientation; - ELSE - Mag2 := 1.0; - Vec2 := Arg2; - END_IF; - Vec1 := IfcNormalise (Vec1); - Vec2 := IfcNormalise (Vec2); - Ndim := SIZEOF(Vec1.DirectionRatios); - Mag := 0.0; - Res := IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcDirection([0.0:Ndim]); - - REPEAT i := 1 TO Ndim; - Res.DirectionRatios[i] := Mag1*Vec1.DirectionRatios[i] + Mag2*Vec2.DirectionRatios[i]; - Mag := Mag + (Res.DirectionRatios[i]*Res.DirectionRatios[i]); - END_REPEAT; - - IF (Mag > 0.0 ) THEN - Result := IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcVector( Res, SQRT(Mag)); - ELSE - Result := IfcRepresentationItem() || IfcGeometricRepresentationItem () || IfcVector( Vec1, 0.0); - END_IF; - END; - END_IF; - RETURN (Result); -END_FUNCTION; - -RULE IfcRepresentationContextSameWCS FOR - (IfcGeometricRepresentationContext); -LOCAL - IsDifferent : LOGICAL := FALSE; -END_LOCAL; - IF (SIZEOF(IfcGeometricRepresentationContext) > 1) - THEN - REPEAT i := 2 TO HIINDEX(IfcGeometricRepresentationContext); - IF (IfcGeometricRepresentationContext[1].WorldCoordinateSystem :<>: IfcGeometricRepresentationContext[i].WorldCoordinateSystem) - THEN - IsDifferent := (NOT(IfcSameValidPrecision(IfcGeometricRepresentationContext[1].Precision, - IfcGeometricRepresentationContext[i].Precision))) - OR (NOT(IfcSameAxis2Placement(IfcGeometricRepresentationContext[1].WorldCoordinateSystem, - IfcGeometricRepresentationContext[i].WorldCoordinateSystem, - IfcGeometricRepresentationContext[1].Precision))); - IF (IsDifferent = TRUE) THEN - ESCAPE; - END_IF; - END_IF; - END_REPEAT; - END_IF; - WHERE - WR1 : IsDifferent = FALSE; -END_RULE; - -RULE IfcSingleProjectInstance FOR - (IfcProject); - - WHERE - WR1 : SIZEOF(IfcProject) <= 1; -END_RULE; - -END_SCHEMA; diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 30e87161d..2c1496d65 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -117,6 +117,7 @@ SET( IMPORTERS unit/utB3DImportExport.cpp unit/utMDCImportExport.cpp unit/utAssbinImportExport.cpp + unit/ImportExport/utCOBImportExport.cpp ) SET( MATERIAL diff --git a/test/unit/utAMFImportExport.cpp b/test/unit/utAMFImportExport.cpp index b045a5fe8..332d5b929 100644 --- a/test/unit/utAMFImportExport.cpp +++ b/test/unit/utAMFImportExport.cpp @@ -59,6 +59,14 @@ public: } }; -TEST_F( utAMFImportExport, importACFromFileTest ) { +TEST_F( utAMFImportExport, importAMFFromFileTest ) { EXPECT_TRUE( importerTest() ); } + + + +TEST_F(utAMFImportExport, importAMFWithMatFromFileTest) { + Assimp::Importer importer; + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/AMF/test_with_mat.amf", aiProcess_ValidateDataStructure); + EXPECT_NE(nullptr, scene); +} From b7e7c748ad7aa2516f572e94198f67f69106c583 Mon Sep 17 00:00:00 2001 From: kimkulling Date: Fri, 21 Sep 2018 16:07:43 +0200 Subject: [PATCH 28/47] Introduce COB-import test. --- test/unit/ImportExport/utCOBImportExport.cpp | 64 ++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 test/unit/ImportExport/utCOBImportExport.cpp diff --git a/test/unit/ImportExport/utCOBImportExport.cpp b/test/unit/ImportExport/utCOBImportExport.cpp new file mode 100644 index 000000000..854f27cbb --- /dev/null +++ b/test/unit/ImportExport/utCOBImportExport.cpp @@ -0,0 +1,64 @@ +/* +--------------------------------------------------------------------------- +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 "UnitTestPCH.h" +#include "SceneDiffer.h" +#include "AbstractImportExportBase.h" + +#include +#include + +using namespace Assimp; + +class utCOBImportExport : public AbstractImportExportBase { +public: + virtual bool importerTest() { + Assimp::Importer importer; + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/COB/molecule.cob", aiProcess_ValidateDataStructure); + return nullptr != scene; + } +}; + +TEST_F(utCOBImportExport, importAMFFromFileTest) { + EXPECT_TRUE(importerTest()); +} From bf1c002b5d4e4b89dd3aafc7064cf63350bb3fac Mon Sep 17 00:00:00 2001 From: kimkulling Date: Fri, 21 Sep 2018 16:09:24 +0200 Subject: [PATCH 29/47] Add missing file. --- test/models/AMF/test_with_mat.amf | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 test/models/AMF/test_with_mat.amf diff --git a/test/models/AMF/test_with_mat.amf b/test/models/AMF/test_with_mat.amf new file mode 100644 index 000000000..0127d8252 --- /dev/null +++ b/test/models/AMF/test_with_mat.amf @@ -0,0 +1,38 @@ + + + Split Pyramid + John Smith + + + + 000 + 100 + 010 + 110 + 0.50.51 + + + Hard side + 210 + 014 + 412 + 042 + + + Soft side + 231 + 134 + 432 + 421 + + + + + Hard material + 0.10.10.1 + + + Soft material + 00.90.90.5 + + From f75bf6d99c587e4ab06b190d2718e46ca60b7b77 Mon Sep 17 00:00:00 2001 From: kimkulling Date: Fri, 21 Sep 2018 16:25:27 +0200 Subject: [PATCH 30/47] MAke noexcept compiler-specific. --- code/3DSHelper.h | 8 ++++---- code/AMFImporter.hpp | 2 +- code/ASEParser.h | 14 +++++++------- code/BaseImporter.cpp | 2 +- code/BaseProcess.cpp | 2 +- code/BaseProcess.h | 2 +- code/Importer.h | 4 ++-- code/LWOAnimation.h | 4 ++-- code/LWOFileData.h | 2 +- code/LimitBoneWeightsProcess.h | 2 +- code/MD3Loader.h | 4 ++-- code/MD5Parser.h | 2 +- code/MDCFileData.h | 2 +- code/MDLFileData.h | 12 ++++++------ code/OptimizeMeshes.h | 2 +- code/PlyParser.h | 12 ++++++------ code/SMDLoader.h | 8 ++++---- code/ScenePrivate.h | 4 ++-- code/TextureTransform.h | 4 ++-- code/XFileHelper.h | 10 +++++----- contrib/irrXML/irrArray.h | 2 +- include/assimp/BaseImporter.h | 2 +- include/assimp/ByteSwapper.h | 2 +- include/assimp/DefaultIOStream.h | 4 ++-- include/assimp/IOStream.hpp | 4 ++-- include/assimp/IOSystem.hpp | 4 ++-- include/assimp/LogStream.hpp | 4 ++-- include/assimp/Logger.hpp | 4 ++-- include/assimp/ProgressHandler.hpp | 2 +- include/assimp/SGSpatialSort.h | 2 +- include/assimp/SmoothingGroups.h | 2 +- include/assimp/SpatialSort.h | 2 +- include/assimp/anim.h | 16 ++++++++-------- include/assimp/camera.h | 2 +- include/assimp/color4.h | 2 +- include/assimp/defs.h | 10 ++++++++++ include/assimp/light.h | 2 +- include/assimp/material.h | 4 ++-- include/assimp/matrix3x3.h | 2 +- include/assimp/matrix4x4.h | 2 +- include/assimp/matrix4x4.inl | 2 +- include/assimp/mesh.h | 10 +++++----- include/assimp/metadata.h | 2 +- include/assimp/quaternion.h | 2 +- include/assimp/texture.h | 2 +- include/assimp/types.h | 10 +++++----- include/assimp/vector3.h | 2 +- test/unit/utSceneCombiner.cpp | 2 +- 48 files changed, 109 insertions(+), 99 deletions(-) diff --git a/code/3DSHelper.h b/code/3DSHelper.h index aee4aac8c..a904abb20 100644 --- a/code/3DSHelper.h +++ b/code/3DSHelper.h @@ -66,7 +66,7 @@ namespace D3DS { */ class Discreet3DS { private: - Discreet3DS() noexcept { + Discreet3DS() AI_NO_EXCEPT { // empty } @@ -330,7 +330,7 @@ struct Face : public FaceWithSmoothingGroup /** Helper structure representing a texture */ struct Texture { //! Default constructor - Texture() noexcept + Texture() AI_NO_EXCEPT : mOffsetU (0.0) , mOffsetV (0.0) , mScaleU (1.0) @@ -392,7 +392,7 @@ struct Material //! Move constructor. This is explicitly written because MSVC doesn't support defaulting it - Material(Material &&other) noexcept + Material(Material &&other) AI_NO_EXCEPT : mName(std::move(other.mName)) , mDiffuse(std::move(other.mDiffuse)) , mSpecularExponent(std::move(other.mSpecularExponent)) @@ -416,7 +416,7 @@ struct Material } - Material &operator=(Material &&other) noexcept { + Material &operator=(Material &&other) AI_NO_EXCEPT { if (this == &other) { return *this; } diff --git a/code/AMFImporter.hpp b/code/AMFImporter.hpp index 3b2bcd23b..b7e58362c 100644 --- a/code/AMFImporter.hpp +++ b/code/AMFImporter.hpp @@ -392,7 +392,7 @@ private: public: /// Default constructor. - AMFImporter() noexcept + AMFImporter() AI_NO_EXCEPT : mNodeElement_Cur(nullptr) , mReader(nullptr) { // empty diff --git a/code/ASEParser.h b/code/ASEParser.h index ad0e42e74..1b5f34d6b 100644 --- a/code/ASEParser.h +++ b/code/ASEParser.h @@ -85,7 +85,7 @@ struct Material : public D3DS::Material //! Move constructor. This is explicitly written because MSVC doesn't support defaulting it - Material(Material &&other) noexcept + Material(Material &&other) AI_NO_EXCEPT : D3DS::Material(std::move(other)) , avSubMaterials(std::move(other.avSubMaterials)) , pcInstance(std::move(other.pcInstance)) @@ -95,7 +95,7 @@ struct Material : public D3DS::Material } - Material &operator=(Material &&other) noexcept { + Material &operator=(Material &&other) AI_NO_EXCEPT { if (this == &other) { return *this; } @@ -129,7 +129,7 @@ struct Material : public D3DS::Material /** Helper structure to represent an ASE file face */ struct Face : public FaceWithSmoothingGroup { //! Default constructor. Initializes everything with 0 - Face() noexcept + Face() AI_NO_EXCEPT : amUVIndices{0} , mColorIndices{0} , iMaterial(DEFAULT_MATINDEX) @@ -197,7 +197,7 @@ struct Animation TCB = 0x2 } mRotationType, mScalingType, mPositionType; - Animation() noexcept + Animation() AI_NO_EXCEPT : mRotationType (TRACK) , mScalingType (TRACK) , mPositionType (TRACK) @@ -218,7 +218,7 @@ struct Animation /** Helper structure to represent the inheritance information of an ASE node */ struct InheritanceInfo { //! Default constructor - InheritanceInfo() noexcept + InheritanceInfo() AI_NO_EXCEPT : abInheritPosition{true} , abInheritRotation{true} , abInheritScaling{true} { @@ -389,7 +389,7 @@ struct Camera : public BaseNode /** Helper structure to represent an ASE helper object (dummy) */ struct Dummy : public BaseNode { //! Constructor - Dummy() noexcept + Dummy() AI_NO_EXCEPT : BaseNode (BaseNode::Dummy, "DUMMY") { // empty } @@ -408,7 +408,7 @@ struct Dummy : public BaseNode { */ class Parser { private: - Parser() noexcept { + Parser() AI_NO_EXCEPT { // empty } diff --git a/code/BaseImporter.cpp b/code/BaseImporter.cpp index 950fd4d02..f03db189f 100644 --- a/code/BaseImporter.cpp +++ b/code/BaseImporter.cpp @@ -65,7 +65,7 @@ using namespace Assimp; // ------------------------------------------------------------------------------------------------ // Constructor to be privately used by Importer -BaseImporter::BaseImporter() noexcept +BaseImporter::BaseImporter() AI_NO_EXCEPT : m_progress() { // nothing to do here } diff --git a/code/BaseProcess.cpp b/code/BaseProcess.cpp index e7ddce2b0..154b586d2 100644 --- a/code/BaseProcess.cpp +++ b/code/BaseProcess.cpp @@ -53,7 +53,7 @@ using namespace Assimp; // ------------------------------------------------------------------------------------------------ // Constructor to be privately used by Importer -BaseProcess::BaseProcess() noexcept +BaseProcess::BaseProcess() AI_NO_EXCEPT : shared() , progress() { diff --git a/code/BaseProcess.h b/code/BaseProcess.h index 0fb348fa5..b09fc732e 100644 --- a/code/BaseProcess.h +++ b/code/BaseProcess.h @@ -216,7 +216,7 @@ class ASSIMP_API_WINONLY BaseProcess { public: /** Constructor to be privately used by Importer */ - BaseProcess() noexcept; + BaseProcess() AI_NO_EXCEPT; /** Destructor, private as well */ virtual ~BaseProcess(); diff --git a/code/Importer.h b/code/Importer.h index c85913f2e..c6628c428 100644 --- a/code/Importer.h +++ b/code/Importer.h @@ -120,11 +120,11 @@ public: SharedPostProcessInfo* mPPShared; /// The default class constructor. - ImporterPimpl() noexcept; + ImporterPimpl() AI_NO_EXCEPT; }; inline -ImporterPimpl::ImporterPimpl() noexcept +ImporterPimpl::ImporterPimpl() AI_NO_EXCEPT : mIOHandler( nullptr ) , mIsDefaultHandler( false ) , mProgressHandler( nullptr ) diff --git a/code/LWOAnimation.h b/code/LWOAnimation.h index 7edda5cc6..f7b0f177b 100644 --- a/code/LWOAnimation.h +++ b/code/LWOAnimation.h @@ -114,7 +114,7 @@ enum PrePostBehaviour /** \brief Data structure for a LWO animation keyframe */ struct Key { - Key() noexcept + Key() AI_NO_EXCEPT : time() , value() , inter(IT_LINE) @@ -145,7 +145,7 @@ struct Key { /** \brief Data structure for a LWO animation envelope */ struct Envelope { - Envelope() noexcept + Envelope() AI_NO_EXCEPT : index() , type(EnvelopeType_Unknown) , pre(PrePostBehaviour_Constant) diff --git a/code/LWOFileData.h b/code/LWOFileData.h index ec16f4b2d..b3a963199 100644 --- a/code/LWOFileData.h +++ b/code/LWOFileData.h @@ -263,7 +263,7 @@ namespace LWO { */ struct Face : public aiFace { //! Default construction - Face() noexcept + Face() AI_NO_EXCEPT : surfaceIndex( 0 ) , smoothGroup( 0 ) , type( AI_LWO_FACE ) { diff --git a/code/LimitBoneWeightsProcess.h b/code/LimitBoneWeightsProcess.h index 6d31b1688..2161b89a8 100644 --- a/code/LimitBoneWeightsProcess.h +++ b/code/LimitBoneWeightsProcess.h @@ -120,7 +120,7 @@ public: { unsigned int mBone; ///< Index of the bone float mWeight; ///< Weight of that bone on this vertex - Weight() noexcept + Weight() AI_NO_EXCEPT : mBone(0) , mWeight(0.0f) { } diff --git a/code/MD3Loader.h b/code/MD3Loader.h index d1ea4bef0..8ac3cdc68 100644 --- a/code/MD3Loader.h +++ b/code/MD3Loader.h @@ -125,7 +125,7 @@ enum AlphaTestFunc */ struct ShaderMapBlock { - ShaderMapBlock() noexcept + ShaderMapBlock() AI_NO_EXCEPT : blend_src (BLEND_NONE) , blend_dest (BLEND_NONE) , alpha_test (AT_NONE) @@ -150,7 +150,7 @@ struct ShaderMapBlock */ struct ShaderDataBlock { - ShaderDataBlock() noexcept + ShaderDataBlock() AI_NO_EXCEPT : cull (CULL_CW) {} diff --git a/code/MD5Parser.h b/code/MD5Parser.h index 60f3326df..853268424 100644 --- a/code/MD5Parser.h +++ b/code/MD5Parser.h @@ -193,7 +193,7 @@ typedef std::vector< FrameDesc > FrameList; /** Represents a vertex descriptor in a MD5 file */ struct VertexDesc { - VertexDesc() noexcept + VertexDesc() AI_NO_EXCEPT : mFirstWeight(0) , mNumWeights(0) { // empty diff --git a/code/MDCFileData.h b/code/MDCFileData.h index 3d93390f0..8e9bdfe6c 100644 --- a/code/MDCFileData.h +++ b/code/MDCFileData.h @@ -118,7 +118,7 @@ struct Surface uint32_t ulOffsetFrameBaseFrames ; uint32_t ulOffsetFrameCompFrames ; uint32_t ulOffsetEnd; - Surface() noexcept + Surface() AI_NO_EXCEPT : ulIdent() , ucName{ 0 } , ulFlags() diff --git a/code/MDLFileData.h b/code/MDLFileData.h index 0446685cc..831986f60 100644 --- a/code/MDLFileData.h +++ b/code/MDLFileData.h @@ -717,7 +717,7 @@ struct GroupFrame */ struct IntFace_MDL7 { // provide a constructor for our own convenience - IntFace_MDL7() noexcept + IntFace_MDL7() AI_NO_EXCEPT : mIndices { 0 } , iMatIndex{ 0 } { // empty @@ -738,7 +738,7 @@ struct IntFace_MDL7 { */ struct IntMaterial_MDL7 { // provide a constructor for our own convenience - IntMaterial_MDL7() noexcept + IntMaterial_MDL7() AI_NO_EXCEPT : pcMat( nullptr ) , iOldMatIndices{ 0 } { // empty @@ -759,7 +759,7 @@ struct IntMaterial_MDL7 { struct IntBone_MDL7 : aiBone { //! Default constructor - IntBone_MDL7() noexcept : iParent (0xffff) + IntBone_MDL7() AI_NO_EXCEPT : iParent (0xffff) { pkeyPositions.reserve(30); pkeyScalings.reserve(30); @@ -804,7 +804,7 @@ struct IntFrameInfo_MDL7 struct IntGroupInfo_MDL7 { //! Default constructor - IntGroupInfo_MDL7() noexcept + IntGroupInfo_MDL7() AI_NO_EXCEPT : iIndex(0) , pcGroup(nullptr) , pcGroupUVs(nullptr) @@ -841,7 +841,7 @@ struct IntGroupInfo_MDL7 //! Holds the data that belongs to a MDL7 mesh group struct IntGroupData_MDL7 { - IntGroupData_MDL7() noexcept + IntGroupData_MDL7() AI_NO_EXCEPT : bNeed2UV(false) {} @@ -872,7 +872,7 @@ struct IntGroupData_MDL7 //! Holds data from an MDL7 file that is shared by all mesh groups struct IntSharedData_MDL7 { //! Default constructor - IntSharedData_MDL7() noexcept + IntSharedData_MDL7() AI_NO_EXCEPT : apcOutBones(), iNum() { diff --git a/code/OptimizeMeshes.h b/code/OptimizeMeshes.h index bb36c03f4..3ebe60cd8 100644 --- a/code/OptimizeMeshes.h +++ b/code/OptimizeMeshes.h @@ -77,7 +77,7 @@ public: /** @brief Internal utility to store additional mesh info */ struct MeshInfo { - MeshInfo() noexcept + MeshInfo() AI_NO_EXCEPT : instance_cnt(0) , vertex_format(0) , output_id(0xffffffff) { diff --git a/code/PlyParser.h b/code/PlyParser.h index 265fe81b3..b544c3b04 100644 --- a/code/PlyParser.h +++ b/code/PlyParser.h @@ -209,7 +209,7 @@ enum EElementSemantic { class Property { public: //! Default constructor - Property() noexcept + Property() AI_NO_EXCEPT : eType (EDT_Int) , Semantic() , bIsList(false) @@ -257,7 +257,7 @@ public: class Element { public: //! Default constructor - Element() noexcept + Element() AI_NO_EXCEPT : eSemantic (EEST_INVALID) , NumOccur(0) { // empty @@ -297,7 +297,7 @@ class PropertyInstance public: //! Default constructor - PropertyInstance() noexcept { + PropertyInstance() AI_NO_EXCEPT { // empty } @@ -360,7 +360,7 @@ public: class ElementInstance { public: //! Default constructor - ElementInstance() noexcept + ElementInstance() AI_NO_EXCEPT : alProperties() { // empty } @@ -387,7 +387,7 @@ class ElementInstanceList public: //! Default constructor - ElementInstanceList() noexcept + ElementInstanceList() AI_NO_EXCEPT : alInstances() { // empty } @@ -414,7 +414,7 @@ class DOM public: //! Default constructor - DOM() noexcept + DOM() AI_NO_EXCEPT : alElements() , alElementData() { diff --git a/code/SMDLoader.h b/code/SMDLoader.h index 09cfef77f..40c08385f 100644 --- a/code/SMDLoader.h +++ b/code/SMDLoader.h @@ -69,7 +69,7 @@ namespace SMD { /** Data structure for a vertex in a SMD file */ struct Vertex { - Vertex() noexcept + Vertex() AI_NO_EXCEPT : iParentNode(UINT_MAX) { // empty } @@ -91,7 +91,7 @@ struct Vertex { /** Data structure for a face in a SMD file */ struct Face { - Face() noexcept + Face() AI_NO_EXCEPT : iTexture(0x0) , avVertices{} { // empty @@ -109,7 +109,7 @@ struct Face { */ struct Bone { //! Default constructor - Bone() noexcept + Bone() AI_NO_EXCEPT : iParent(UINT_MAX) , bIsUsed(false) { // empty @@ -129,7 +129,7 @@ struct Bone { //! Animation of the bone struct Animation { //! Public default constructor - Animation() noexcept + Animation() AI_NO_EXCEPT : iFirstTimeKey() { asKeys.reserve(20); } diff --git a/code/ScenePrivate.h b/code/ScenePrivate.h index dc6e07d70..775b9cb52 100644 --- a/code/ScenePrivate.h +++ b/code/ScenePrivate.h @@ -56,7 +56,7 @@ class Importer; struct ScenePrivateData { // The struct constructor. - ScenePrivateData() noexcept; + 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. @@ -74,7 +74,7 @@ struct ScenePrivateData { }; inline -ScenePrivateData::ScenePrivateData() noexcept +ScenePrivateData::ScenePrivateData() AI_NO_EXCEPT : mOrigImporter( nullptr ) , mPPStepsApplied( 0 ) , mIsCopy( false ) { diff --git a/code/TextureTransform.h b/code/TextureTransform.h index 241c52030..99d5acf1e 100644 --- a/code/TextureTransform.h +++ b/code/TextureTransform.h @@ -66,7 +66,7 @@ namespace Assimp { * to be able to update some values quickly. */ struct TTUpdateInfo { - TTUpdateInfo() noexcept + TTUpdateInfo() AI_NO_EXCEPT : directShortcut(nullptr) , mat(nullptr) , semantic(0) @@ -89,7 +89,7 @@ struct TTUpdateInfo { /** Helper class representing texture coordinate transformations */ struct STransformVecInfo : public aiUVTransform { - STransformVecInfo() noexcept + STransformVecInfo() AI_NO_EXCEPT : uvIndex(0) , mapU(aiTextureMapMode_Wrap) , mapV(aiTextureMapMode_Wrap) diff --git a/code/XFileHelper.h b/code/XFileHelper.h index 0435c91df..c51e2eba9 100644 --- a/code/XFileHelper.h +++ b/code/XFileHelper.h @@ -68,7 +68,7 @@ struct TexEntry { std::string mName; bool mIsNormalMap; // true if the texname was specified in a NormalmapFilename tag - TexEntry() noexcept + TexEntry() AI_NO_EXCEPT : mName() , mIsNormalMap(false) { // empty @@ -91,7 +91,7 @@ struct Material { std::vector mTextures; size_t sceneIndex; ///< the index under which it was stored in the scene's material list - Material() noexcept + Material() AI_NO_EXCEPT : mIsReference(false) , mSpecularExponent() , sceneIndex(SIZE_MAX) { @@ -130,7 +130,7 @@ struct Mesh { std::vector mBones; - explicit Mesh(const std::string &pName = "") noexcept + explicit Mesh(const std::string &pName = "") AI_NO_EXCEPT : mName( pName ) , mPositions() , mPosFaces() @@ -155,7 +155,7 @@ struct Node { std::vector mChildren; std::vector mMeshes; - Node() noexcept + Node() AI_NO_EXCEPT : mName() , mTrafoMatrix() , mParent(nullptr) @@ -220,7 +220,7 @@ struct Scene std::vector mAnims; unsigned int mAnimTicksPerSecond; - Scene() noexcept + Scene() AI_NO_EXCEPT : mRootNode(nullptr) , mGlobalMeshes() , mGlobalMaterials() diff --git a/contrib/irrXML/irrArray.h b/contrib/irrXML/irrArray.h index ec1021d17..51302680e 100644 --- a/contrib/irrXML/irrArray.h +++ b/contrib/irrXML/irrArray.h @@ -21,7 +21,7 @@ class array { public: - array() noexcept + array() : data(0), allocated(0), used(0), free_when_destroyed(true), is_sorted(true) { diff --git a/include/assimp/BaseImporter.h b/include/assimp/BaseImporter.h index e4e0412cf..b218d06ff 100644 --- a/include/assimp/BaseImporter.h +++ b/include/assimp/BaseImporter.h @@ -83,7 +83,7 @@ class ASSIMP_API BaseImporter { public: /** Constructor to be privately used by #Importer */ - BaseImporter() noexcept; + BaseImporter() AI_NO_EXCEPT; /** Destructor, private as well */ virtual ~BaseImporter(); diff --git a/include/assimp/ByteSwapper.h b/include/assimp/ByteSwapper.h index 9db172426..322a242de 100644 --- a/include/assimp/ByteSwapper.h +++ b/include/assimp/ByteSwapper.h @@ -61,7 +61,7 @@ namespace Assimp { * and vice versa. Direct use of this class is DEPRECATED. Use #StreamReader instead. */ // -------------------------------------------------------------------------------------- class ByteSwap { - ByteSwap() noexcept {} + ByteSwap() AI_NO_EXCEPT {} public: diff --git a/include/assimp/DefaultIOStream.h b/include/assimp/DefaultIOStream.h index 9633ed002..e0e010ecb 100644 --- a/include/assimp/DefaultIOStream.h +++ b/include/assimp/DefaultIOStream.h @@ -69,7 +69,7 @@ class ASSIMP_API DefaultIOStream : public IOStream #endif // __ANDROID__ protected: - DefaultIOStream() noexcept; + DefaultIOStream() AI_NO_EXCEPT; DefaultIOStream(FILE* pFile, const std::string &strFilename); public: @@ -117,7 +117,7 @@ private: // ---------------------------------------------------------------------------------- inline -DefaultIOStream::DefaultIOStream() noexcept +DefaultIOStream::DefaultIOStream() AI_NO_EXCEPT : mFile(nullptr) , mFilename("") , mCachedSize(SIZE_MAX) { diff --git a/include/assimp/IOStream.hpp b/include/assimp/IOStream.hpp index 30132cdbb..52b80cc15 100644 --- a/include/assimp/IOStream.hpp +++ b/include/assimp/IOStream.hpp @@ -71,7 +71,7 @@ class ASSIMP_API IOStream { protected: /** Constructor protected, use IOSystem::Open() to create an instance. */ - IOStream() noexcept; + IOStream() AI_NO_EXCEPT; public: // ------------------------------------------------------------------- @@ -126,7 +126,7 @@ public: // ---------------------------------------------------------------------------------- inline -IOStream::IOStream() noexcept { +IOStream::IOStream() AI_NO_EXCEPT { // empty } diff --git a/include/assimp/IOSystem.hpp b/include/assimp/IOSystem.hpp index 5434fd36a..a36e22508 100644 --- a/include/assimp/IOSystem.hpp +++ b/include/assimp/IOSystem.hpp @@ -95,7 +95,7 @@ public: * Create an instance of your derived class and assign it to an * #Assimp::Importer instance by calling Importer::SetIOHandler(). */ - IOSystem() noexcept; + IOSystem() AI_NO_EXCEPT; // ------------------------------------------------------------------- /** @brief Virtual destructor. @@ -230,7 +230,7 @@ private: // ---------------------------------------------------------------------------- AI_FORCE_INLINE -IOSystem::IOSystem() noexcept +IOSystem::IOSystem() AI_NO_EXCEPT : m_pathStack() { // empty } diff --git a/include/assimp/LogStream.hpp b/include/assimp/LogStream.hpp index 84bffdaa5..e0eb8d505 100644 --- a/include/assimp/LogStream.hpp +++ b/include/assimp/LogStream.hpp @@ -65,7 +65,7 @@ class ASSIMP_API LogStream { protected: /** @brief Default constructor */ - LogStream() noexcept; + LogStream() AI_NO_EXCEPT; public: /** @brief Virtual destructor */ @@ -96,7 +96,7 @@ public: }; // !class LogStream inline -LogStream::LogStream() noexcept { +LogStream::LogStream() AI_NO_EXCEPT { // empty } diff --git a/include/assimp/Logger.hpp b/include/assimp/Logger.hpp index b59817e47..6a9928735 100644 --- a/include/assimp/Logger.hpp +++ b/include/assimp/Logger.hpp @@ -161,7 +161,7 @@ protected: /** * Default constructor */ - Logger() noexcept; + Logger() AI_NO_EXCEPT; /** * Construction with a given log severity @@ -215,7 +215,7 @@ protected: // ---------------------------------------------------------------------------------- // Default constructor inline -Logger::Logger() noexcept +Logger::Logger() AI_NO_EXCEPT : m_Severity(NORMAL) { // empty } diff --git a/include/assimp/ProgressHandler.hpp b/include/assimp/ProgressHandler.hpp index 020d190fa..0fa1501d4 100644 --- a/include/assimp/ProgressHandler.hpp +++ b/include/assimp/ProgressHandler.hpp @@ -63,7 +63,7 @@ class ASSIMP_API ProgressHandler { protected: /** @brief Default constructor */ - ProgressHandler () noexcept { + ProgressHandler () AI_NO_EXCEPT { } public: /** @brief Virtual destructor */ diff --git a/include/assimp/SGSpatialSort.h b/include/assimp/SGSpatialSort.h index a03701932..3c95d0b51 100644 --- a/include/assimp/SGSpatialSort.h +++ b/include/assimp/SGSpatialSort.h @@ -120,7 +120,7 @@ protected: uint32_t mSmoothGroups; float mDistance; ///< Distance of this vertex to the sorting plane - Entry() noexcept + Entry() AI_NO_EXCEPT : mIndex(0) , mPosition() , mSmoothGroups(0) diff --git a/include/assimp/SmoothingGroups.h b/include/assimp/SmoothingGroups.h index 2ca81d756..88345c66a 100644 --- a/include/assimp/SmoothingGroups.h +++ b/include/assimp/SmoothingGroups.h @@ -53,7 +53,7 @@ http://www.jalix.org/ressources/graphics/3DS/_unofficials/3ds-unofficial.txt */ // --------------------------------------------------------------------------- /** Helper structure representing a face with smoothing groups assigned */ struct FaceWithSmoothingGroup { - FaceWithSmoothingGroup() noexcept + FaceWithSmoothingGroup() AI_NO_EXCEPT : mIndices() , iSmoothGroup(0) { // in debug builds set all indices to a common magic value diff --git a/include/assimp/SpatialSort.h b/include/assimp/SpatialSort.h index 16022b5dd..8fb450841 100644 --- a/include/assimp/SpatialSort.h +++ b/include/assimp/SpatialSort.h @@ -153,7 +153,7 @@ protected: aiVector3D mPosition; ///< Position ai_real mDistance; ///< Distance of this vertex to the sorting plane - Entry() noexcept + Entry() AI_NO_EXCEPT : mIndex( 999999999 ), mPosition(), mDistance( 99999. ) { // empty } diff --git a/include/assimp/anim.h b/include/assimp/anim.h index 4b4c4370c..8a0984192 100644 --- a/include/assimp/anim.h +++ b/include/assimp/anim.h @@ -70,7 +70,7 @@ struct aiVectorKey #ifdef __cplusplus /// @brief The default constructor. - aiVectorKey() noexcept + aiVectorKey() AI_NO_EXCEPT : mTime( 0.0 ) , mValue() { // empty @@ -116,7 +116,7 @@ struct aiQuatKey C_STRUCT aiQuaternion mValue; #ifdef __cplusplus - aiQuatKey() noexcept + aiQuatKey() AI_NO_EXCEPT : mTime( 0.0 ) , mValue() { // empty @@ -163,7 +163,7 @@ struct aiMeshKey #ifdef __cplusplus - aiMeshKey() noexcept + aiMeshKey() AI_NO_EXCEPT : mTime(0.0) , mValue(0) { @@ -210,7 +210,7 @@ struct aiMeshMorphKey /** The number of values and weights */ unsigned int mNumValuesAndWeights; #ifdef __cplusplus - aiMeshMorphKey() noexcept + aiMeshMorphKey() AI_NO_EXCEPT : mTime(0.0) , mValues(nullptr) , mWeights(nullptr) @@ -324,7 +324,7 @@ struct aiNodeAnim { C_ENUM aiAnimBehaviour mPostState; #ifdef __cplusplus - aiNodeAnim() noexcept + aiNodeAnim() AI_NO_EXCEPT : mNumPositionKeys( 0 ) , mPositionKeys( nullptr ) , mNumRotationKeys( 0 ) @@ -366,7 +366,7 @@ struct aiMeshAnim #ifdef __cplusplus - aiMeshAnim() noexcept + aiMeshAnim() AI_NO_EXCEPT : mNumKeys() , mKeys() {} @@ -397,7 +397,7 @@ struct aiMeshMorphAnim #ifdef __cplusplus - aiMeshMorphAnim() noexcept + aiMeshMorphAnim() AI_NO_EXCEPT : mNumKeys() , mKeys() {} @@ -451,7 +451,7 @@ struct aiAnimation { C_STRUCT aiMeshMorphAnim **mMorphMeshChannels; #ifdef __cplusplus - aiAnimation() noexcept + aiAnimation() AI_NO_EXCEPT : mDuration(-1.) , mTicksPerSecond(0.) , mNumChannels(0) diff --git a/include/assimp/camera.h b/include/assimp/camera.h index 6cd244c41..6fea5a7d7 100644 --- a/include/assimp/camera.h +++ b/include/assimp/camera.h @@ -174,7 +174,7 @@ struct aiCamera #ifdef __cplusplus - aiCamera() noexcept + 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/color4.h b/include/assimp/color4.h index bc934731b..570b8f44c 100644 --- a/include/assimp/color4.h +++ b/include/assimp/color4.h @@ -59,7 +59,7 @@ template class aiColor4t { public: - aiColor4t() noexcept : 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) {} diff --git a/include/assimp/defs.h b/include/assimp/defs.h index b587396bf..e2ce6953d 100644 --- a/include/assimp/defs.h +++ b/include/assimp/defs.h @@ -289,4 +289,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/include/assimp/light.h b/include/assimp/light.h index 457b55950..dc0b8a4b6 100644 --- a/include/assimp/light.h +++ b/include/assimp/light.h @@ -237,7 +237,7 @@ struct aiLight #ifdef __cplusplus - aiLight() noexcept + 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 d88d11b65..45b4844a3 100644 --- a/include/assimp/material.h +++ b/include/assimp/material.h @@ -483,7 +483,7 @@ struct aiUVTransform #ifdef __cplusplus - aiUVTransform() noexcept + aiUVTransform() AI_NO_EXCEPT : mTranslation (0.0,0.0) , mScaling (1.0,1.0) , mRotation (0.0) @@ -607,7 +607,7 @@ struct aiMaterialProperty #ifdef __cplusplus - aiMaterialProperty() noexcept + aiMaterialProperty() AI_NO_EXCEPT : mSemantic( 0 ) , mIndex( 0 ) , mDataLength( 0 ) diff --git a/include/assimp/matrix3x3.h b/include/assimp/matrix3x3.h index bbb6cb104..4bb55ad21 100644 --- a/include/assimp/matrix3x3.h +++ b/include/assimp/matrix3x3.h @@ -69,7 +69,7 @@ class aiMatrix3x3t { public: - aiMatrix3x3t() noexcept : + aiMatrix3x3t() AI_NO_EXCEPT : a1(static_cast(1.0f)), a2(), a3(), b1(), b2(static_cast(1.0f)), b3(), c1(), c2(), c3(static_cast(1.0f)) {} diff --git a/include/assimp/matrix4x4.h b/include/assimp/matrix4x4.h index b545b73f8..bfa9d3865 100644 --- a/include/assimp/matrix4x4.h +++ b/include/assimp/matrix4x4.h @@ -71,7 +71,7 @@ class aiMatrix4x4t public: /** set to identity */ - aiMatrix4x4t() noexcept; + 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 a5a41ec25..9920f0059 100644 --- a/include/assimp/matrix4x4.inl +++ b/include/assimp/matrix4x4.inl @@ -60,7 +60,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // ---------------------------------------------------------------------------------------- template -aiMatrix4x4t::aiMatrix4x4t() noexcept : +aiMatrix4x4t::aiMatrix4x4t() AI_NO_EXCEPT : a1(1.0f), a2(), a3(), a4(), b1(), b2(1.0f), b3(), b4(), c1(), c2(), c3(1.0f), c4(), diff --git a/include/assimp/mesh.h b/include/assimp/mesh.h index 5b4f30a23..f47d5fd00 100644 --- a/include/assimp/mesh.h +++ b/include/assimp/mesh.h @@ -136,7 +136,7 @@ struct aiFace #ifdef __cplusplus //! Default constructor - aiFace() noexcept + aiFace() AI_NO_EXCEPT : mNumIndices( 0 ) , mIndices( nullptr ) { // empty @@ -220,7 +220,7 @@ struct aiVertexWeight { #ifdef __cplusplus //! Default constructor - aiVertexWeight() noexcept + aiVertexWeight() AI_NO_EXCEPT : mVertexId(0) , mWeight(0.0f) { // empty @@ -282,7 +282,7 @@ struct aiBone { #ifdef __cplusplus //! Default constructor - aiBone() noexcept + aiBone() AI_NO_EXCEPT : mName() , mNumWeights( 0 ) , mWeights( nullptr ) @@ -454,7 +454,7 @@ struct aiAnimMesh #ifdef __cplusplus - aiAnimMesh() noexcept + aiAnimMesh() AI_NO_EXCEPT : mVertices( nullptr ) , mNormals(nullptr) , mTangents(nullptr) @@ -715,7 +715,7 @@ struct aiMesh #ifdef __cplusplus //! Default constructor. Initializes all members to 0 - aiMesh() noexcept + aiMesh() AI_NO_EXCEPT : mPrimitiveTypes( 0 ) , mNumVertices( 0 ) , mNumFaces( 0 ) diff --git a/include/assimp/metadata.h b/include/assimp/metadata.h index cee03fcec..498e2f6d1 100644 --- a/include/assimp/metadata.h +++ b/include/assimp/metadata.h @@ -129,7 +129,7 @@ struct aiMetadata { /** * @brief The default constructor, set all members to zero by default. */ - aiMetadata() noexcept + aiMetadata() AI_NO_EXCEPT : mNumProperties(0) , mKeys(nullptr) , mValues(nullptr) { diff --git a/include/assimp/quaternion.h b/include/assimp/quaternion.h index 355167efc..e2479f2ed 100644 --- a/include/assimp/quaternion.h +++ b/include/assimp/quaternion.h @@ -60,7 +60,7 @@ template class aiQuaterniont { public: - aiQuaterniont() noexcept : 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/texture.h b/include/assimp/texture.h index 5c0670792..49289f28d 100644 --- a/include/assimp/texture.h +++ b/include/assimp/texture.h @@ -201,7 +201,7 @@ struct aiTexture { } // Construction - aiTexture() noexcept + aiTexture() AI_NO_EXCEPT : mWidth(0) , mHeight(0) , achFormatHint{ 0 } diff --git a/include/assimp/types.h b/include/assimp/types.h index 593ba8e46..e115a28dc 100644 --- a/include/assimp/types.h +++ b/include/assimp/types.h @@ -122,7 +122,7 @@ extern "C" { struct aiPlane { #ifdef __cplusplus - aiPlane () noexcept : 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) {} @@ -141,7 +141,7 @@ struct aiPlane struct aiRay { #ifdef __cplusplus - aiRay () noexcept {} + aiRay () AI_NO_EXCEPT {} aiRay (const aiVector3D& _pos, const aiVector3D& _dir) : pos(_pos), dir(_dir) {} @@ -159,7 +159,7 @@ struct aiRay struct aiColor3D { #ifdef __cplusplus - aiColor3D () noexcept : 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) {} @@ -254,7 +254,7 @@ struct aiString { #ifdef __cplusplus /** Default constructor, the string is set to have zero length */ - aiString() noexcept + aiString() AI_NO_EXCEPT : length( 0 ) , data {0} { data[0] = '\0'; @@ -480,7 +480,7 @@ struct aiMemoryInfo #ifdef __cplusplus /** Default constructor */ - aiMemoryInfo() noexcept + aiMemoryInfo() AI_NO_EXCEPT : textures (0) , materials (0) , meshes (0) diff --git a/include/assimp/vector3.h b/include/assimp/vector3.h index 2f59438d3..2c610b3a9 100644 --- a/include/assimp/vector3.h +++ b/include/assimp/vector3.h @@ -66,7 +66,7 @@ template class aiVector3t { public: - aiVector3t() noexcept : x(), y(), 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 ) : x(o.x), y(o.y), z(o.z) {} diff --git a/test/unit/utSceneCombiner.cpp b/test/unit/utSceneCombiner.cpp index 600d7ba9d..3e7ba0146 100644 --- a/test/unit/utSceneCombiner.cpp +++ b/test/unit/utSceneCombiner.cpp @@ -73,7 +73,7 @@ TEST_F( utSceneCombiner, MergeMeshes_ValidNames_Test ) { EXPECT_EQ( "mesh_1.mesh_2.mesh_3", outName ); } -TEST_F( utSceneCombiner, CopySceneWithNullptr_NoException ) { +TEST_F( utSceneCombiner, CopySceneWithNullptr_AI_NO_EXCEPTion ) { EXPECT_NO_THROW( SceneCombiner::CopyScene( nullptr, nullptr ) ); EXPECT_NO_THROW( SceneCombiner::CopySceneFlat( nullptr, nullptr ) ); } From 662f7086e3e754a3ea73057c5bb2be3050c4ed7f Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 21 Sep 2018 18:46:30 +0200 Subject: [PATCH 31/47] Update types.h Fix VS2013: array initialization does not work. --- include/assimp/types.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/include/assimp/types.h b/include/assimp/types.h index e115a28dc..660479f8a 100644 --- a/include/assimp/types.h +++ b/include/assimp/types.h @@ -119,11 +119,9 @@ extern "C" { // ---------------------------------------------------------------------------------- /** Represents a plane in a three-dimensional, euclidean space */ -struct aiPlane -{ +struct aiPlane { #ifdef __cplusplus - aiPlane () AI_NO_EXCEPT : 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) {} @@ -138,8 +136,7 @@ struct aiPlane // ---------------------------------------------------------------------------------- /** Represents a ray */ -struct aiRay -{ +struct aiRay { #ifdef __cplusplus aiRay () AI_NO_EXCEPT {} aiRay (const aiVector3D& _pos, const aiVector3D& _dir) @@ -255,8 +252,7 @@ struct aiString #ifdef __cplusplus /** Default constructor, the string is set to have zero length */ aiString() AI_NO_EXCEPT - : length( 0 ) - , data {0} { + : length( 0 ) { data[0] = '\0'; #ifdef ASSIMP_BUILD_DEBUG From abfc8fd0487934c97f32bc5e6f2bc3cac506b59e Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 21 Sep 2018 18:51:45 +0200 Subject: [PATCH 32/47] Update texture.h Fix array init for older compilers. --- include/assimp/texture.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/assimp/texture.h b/include/assimp/texture.h index 49289f28d..5be7229ec 100644 --- a/include/assimp/texture.h +++ b/include/assimp/texture.h @@ -204,7 +204,6 @@ struct aiTexture { aiTexture() AI_NO_EXCEPT : mWidth(0) , mHeight(0) - , achFormatHint{ 0 } , pcData(nullptr) , mFilename() { achFormatHint[0] = achFormatHint[1] = 0; From 2017e50e7b6940384ba4d6b78a8d667c017ca04b Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 21 Sep 2018 18:59:47 +0200 Subject: [PATCH 33/47] Update AMFImporter_Node.hpp Fix invalid array initialization. --- code/AMFImporter_Node.hpp | 105 ++++++++++---------------------------- 1 file changed, 28 insertions(+), 77 deletions(-) diff --git a/code/AMFImporter_Node.hpp b/code/AMFImporter_Node.hpp index c35f6d652..22b8f58cb 100644 --- a/code/AMFImporter_Node.hpp +++ b/code/AMFImporter_Node.hpp @@ -116,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) @@ -129,9 +127,7 @@ 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 instantiation. /// \var Delta - The distance of translation in the x, y, or z direction, respectively, in the referenced object's coordinate system, to @@ -142,56 +138,40 @@ 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. @@ -206,7 +186,6 @@ struct CAMFImporter_NodeElement_Color : public CAMFImporter_NodeElement { CAMFImporter_NodeElement_Color(CAMFImporter_NodeElement* pParent) : CAMFImporter_NodeElement(ENET_Color, pParent) , Composed( false ) - , Color_Composed{""} , Color() , Profile() { // empty @@ -216,118 +195,93 @@ struct CAMFImporter_NodeElement_Color : public CAMFImporter_NodeElement { /// \struct CAMFImporter_NodeElement_Material /// Structure that define material node. struct CAMFImporter_NodeElement_Material : public CAMFImporter_NodeElement { - /// \fn CAMFImporter_NodeElement_Material(CAMFImporter_NodeElement* pParent) + /// 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. @@ -354,18 +308,15 @@ struct CAMFImporter_NodeElement_TexMap : public CAMFImporter_NodeElement { /// \struct CAMFImporter_NodeElement_Triangle /// Structure that define triangle node. struct CAMFImporter_NodeElement_Triangle : public CAMFImporter_NodeElement { - size_t V[3];///< Triangle vertices. /// Constructor. /// \param [in] pParent - pointer to parent node. CAMFImporter_NodeElement_Triangle(CAMFImporter_NodeElement* pParent) - : CAMFImporter_NodeElement(ENET_Triangle, pParent) - , V{}{ + : CAMFImporter_NodeElement(ENET_Triangle, pParent) { // empty } - -};// struct CAMFImporter_NodeElement_Triangle +}; /// Structure that define texture node. struct CAMFImporter_NodeElement_Texture : public CAMFImporter_NodeElement { @@ -384,6 +335,6 @@ struct CAMFImporter_NodeElement_Texture : public CAMFImporter_NodeElement { , Tiled( false ){ // empty } -};// struct CAMFImporter_NodeElement_Texture +}; #endif // INCLUDED_AI_AMF_IMPORTER_NODE_H From e129d888253092bb1a2445308c54ccd3f8db6562 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 21 Sep 2018 19:26:41 +0200 Subject: [PATCH 34/47] Update ASEParser.h Fix not supported array initialization. --- code/ASEParser.h | 62 ++++++++++++++++++++---------------------------- 1 file changed, 26 insertions(+), 36 deletions(-) diff --git a/code/ASEParser.h b/code/ASEParser.h index 1b5f34d6b..305a3f3d6 100644 --- a/code/ASEParser.h +++ b/code/ASEParser.h @@ -71,14 +71,13 @@ struct Material : public D3DS::Material //! Default constructor has been deleted Material() = delete; - //! Constructor with explicit name explicit Material(const std::string &name) : D3DS::Material(name) , pcInstance(NULL) - , bNeed (false) - {} - + , bNeed (false) { + // empty + } Material(const Material &other) = default; Material &operator=(const Material &other) = default; @@ -130,9 +129,7 @@ struct Material : public D3DS::Material struct Face : public FaceWithSmoothingGroup { //! Default constructor. Initializes everything with 0 Face() AI_NO_EXCEPT - : amUVIndices{0} - , mColorIndices{0} - , iMaterial(DEFAULT_MATINDEX) + : iMaterial(DEFAULT_MATINDEX) , iFace(0) { // empty } @@ -159,15 +156,15 @@ struct Face : public FaceWithSmoothingGroup { // --------------------------------------------------------------------------- /** Helper structure to represent an ASE file bone */ -struct Bone -{ +struct Bone { //! Constructor 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; @@ -175,23 +172,16 @@ 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 > 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 @@ -211,18 +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 { //! Default constructor - InheritanceInfo() AI_NO_EXCEPT - : abInheritPosition{true} - , abInheritRotation{true} - , abInheritScaling{true} { - // empty + 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 @@ -237,17 +225,19 @@ struct InheritanceInfo { // --------------------------------------------------------------------------- /** Represents an ASE file node. Base class for mesh, light and cameras */ -struct BaseNode -{ - enum Type {Light, Camera, Mesh, Dummy} mType; - +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) - { + , mProcessed (false) { // Set mTargetPosition to qnan const ai_real qnan = get_qnan(); mTargetPosition.x = qnan; @@ -290,14 +280,14 @@ struct Mesh : public MeshWithSmoothingGroups, public BaseNode { //! Construction from an existing name explicit Mesh(const std::string &name) : BaseNode( BaseNode::Mesh, name ) - , amTexCoords{ } , mVertexColors() , mBoneVertices() , mBones() , iMaterialIndex(Face::DEFAULT_MATINDEX) - , mNumUVComponents{ 2 } , bSkip (false) { - // empty + for (unsigned int c = 0; c < AI_MAX_NUMBER_OF_TEXTURECOORDS;++c) { + this->mNumUVComponents[c] = 2; + } } //! List of all texture coordinate sets From 3a38c2c0676ac2dbf14303087bafa3da1489d34b Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 21 Sep 2018 19:43:19 +0200 Subject: [PATCH 35/47] Update MDLFileData.h Remove not supported array initialization. --- code/MDLFileData.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/code/MDLFileData.h b/code/MDLFileData.h index 831986f60..1215b2a80 100644 --- a/code/MDLFileData.h +++ b/code/MDLFileData.h @@ -717,10 +717,9 @@ struct GroupFrame */ struct IntFace_MDL7 { // provide a constructor for our own convenience - IntFace_MDL7() AI_NO_EXCEPT - : mIndices { 0 } - , iMatIndex{ 0 } { - // empty + IntFace_MDL7() AI_NO_EXCEPT { + ::memset( mIndices, 0, sizeof(uint32_t) *3); + ::memset( iMatIndex, 0, sizeof( unsigned int) *2); } //! Vertex indices @@ -739,9 +738,8 @@ struct IntFace_MDL7 { struct IntMaterial_MDL7 { // provide a constructor for our own convenience IntMaterial_MDL7() AI_NO_EXCEPT - : pcMat( nullptr ) - , iOldMatIndices{ 0 } { - // empty + : pcMat( nullptr ) { + ::memset( iOldMatIndices, 0, sizeof(unsigned int) *2); } //! Material instance From 24b42274fbc8d68ca45570b31f29582479f45572 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 21 Sep 2018 20:13:35 +0200 Subject: [PATCH 36/47] Update MDCFileData.h Fix build by remove not supported initializer for array. --- code/MDCFileData.h | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) diff --git a/code/MDCFileData.h b/code/MDCFileData.h index 8e9bdfe6c..c599a930a 100644 --- a/code/MDCFileData.h +++ b/code/MDCFileData.h @@ -61,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") @@ -79,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 ] ; @@ -100,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 ; @@ -120,7 +117,6 @@ struct Surface uint32_t ulOffsetEnd; Surface() AI_NO_EXCEPT : ulIdent() - , ucName{ 0 } , ulFlags() , ulNumCompFrames() , ulNumBaseFrames() @@ -142,8 +138,7 @@ struct Surface // --------------------------------------------------------------------------- /** \brief Data structure for a MDC frame */ -struct Frame -{ +struct Frame { //! bounding box minimum coords aiVector3D bboxMin ; @@ -163,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; @@ -188,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 - // --------------------------------------------------------------------------- /** Build a floating point vertex from the compressed data in MDC files */ @@ -215,6 +202,7 @@ void BuildVertex(const Frame& frame, const CompressedVertex& cvert, aiVector3D& vXYZOut, aiVector3D& vNorOut); -}} +} +} #endif // !! AI_MDCFILEHELPER_H_INC From b3e858956ab21a3a546b73dad8b27a803b07487e Mon Sep 17 00:00:00 2001 From: Alexandre Avenel Date: Fri, 21 Sep 2018 19:35:54 +0200 Subject: [PATCH 37/47] Fix #2149 Add flag to embed textures in assimp_cmd --- tools/assimp_cmd/Main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/assimp_cmd/Main.cpp b/tools/assimp_cmd/Main.cpp index 41412b93d..8a39540d1 100644 --- a/tools/assimp_cmd/Main.cpp +++ b/tools/assimp_cmd/Main.cpp @@ -466,6 +466,9 @@ int ProcessStandardArguments( else if (! strcmp( param, "-sbc") || ! strcmp( param, "--split-by-bone-count")) { fill.ppFlags |= aiProcess_SplitByBoneCount; } + else if (!strcmp(param, "-embtex") || ! strcmp(param, "--embed-textures")) { + fill.ppFlags |= aiProcess_EmbedTextures; + } else if (! strncmp( param, "-c",2) || ! strncmp( param, "--config=",9)) { const unsigned int ofs = (params[i][1] == '-' ? 9 : 2); From d42f9a3226bfe62ef959653a59f892e29f4c40c7 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sat, 22 Sep 2018 12:46:38 +0200 Subject: [PATCH 38/47] Update MMDImporter.cpp Reformattings --- code/MMDImporter.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/code/MMDImporter.cpp b/code/MMDImporter.cpp index a7a76aa82..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); } } From 56392cc02f849e0f2e3bc17557dad2f116590d4a Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sat, 22 Sep 2018 12:50:23 +0200 Subject: [PATCH 39/47] Update MMDPmxParser.cpp Fix encoding for readstrings. --- code/MMDPmxParser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/MMDPmxParser.cpp b/code/MMDPmxParser.cpp index 355ef2146..2c5bd9a8d 100644 --- a/code/MMDPmxParser.cpp +++ b/code/MMDPmxParser.cpp @@ -96,12 +96,13 @@ namespace pmx // UTF16 to UTF8 const uint16_t* sourceStart = (uint16_t*)buffer.data(); const unsigned int targetSize = size * 3; // enough to encode - char targetStart[targetSize]; + char *targetStart = new char[targetSize]; std::memset(targetStart, 0, targetSize * sizeof(char)); utf8::utf16to8( sourceStart, sourceStart + size/2, targetStart ); std::string result(targetStart); + delete [] targetStart; return result; } else From 9f6238f3af3a013ac77bb2da285167abcc84338b Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sat, 22 Sep 2018 15:50:40 +0200 Subject: [PATCH 40/47] INtroduce unittests. --- code/Q3BSPFileData.h | 17 ++--- code/Q3BSPFileImporter.cpp | 60 ++++++++-------- code/Q3BSPFileImporter.h | 6 +- code/Q3BSPFileParser.cpp | 3 +- test/CMakeLists.txt | 3 + test/models-nonbsd/PK3/SGDTT3.pk3 | Bin 314762 -> 314764 bytes test/unit/ImportExport/utOgreImportExport.cpp | 64 ++++++++++++++++++ .../ImportExport/utQ3BSPFileImportExport.cpp | 64 ++++++++++++++++++ 8 files changed, 170 insertions(+), 47 deletions(-) create mode 100644 test/unit/ImportExport/utOgreImportExport.cpp create mode 100644 test/unit/ImportExport/utQ3BSPFileImportExport.cpp diff --git a/code/Q3BSPFileData.h b/code/Q3BSPFileData.h index eb3a1444a..d814837c2 100644 --- a/code/Q3BSPFileData.h +++ b/code/Q3BSPFileData.h @@ -43,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define ASSIMP_Q3BSPFILEDATA_H_INC #include -#include //memset +#include #include namespace Assimp { @@ -77,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 @@ -104,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 aad2bf93c..c06636df0 100644 --- a/code/Q3BSPFileImporter.cpp +++ b/code/Q3BSPFileImporter.cpp @@ -82,39 +82,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 = "\\"; @@ -124,14 +124,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 #include +#include struct aiMesh; struct aiNode; @@ -53,6 +54,7 @@ struct aiMaterial; struct aiTexture; namespace Assimp { + namespace Q3BSP { class Q3BSPZipArchive; struct Q3BSPModel; @@ -71,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*> FaceMap; typedef std::map* >::iterator FaceMapIt; typedef std::map*>::const_iterator FaceMapConstIt; @@ -115,5 +116,4 @@ private: } // Namespace Assimp - #endif // ASSIMP_Q3BSPFILEIMPORTER_H_INC diff --git a/code/Q3BSPFileParser.cpp b/code/Q3BSPFileParser.cpp index c53280cb5..f4aea28e6 100644 --- a/code/Q3BSPFileParser.cpp +++ b/code/Q3BSPFileParser.cpp @@ -103,8 +103,7 @@ bool Q3BSPFileParser::readData( const std::string &rMapName ) 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; } diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 2c1496d65..687432085 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -118,6 +118,8 @@ SET( IMPORTERS unit/utMDCImportExport.cpp unit/utAssbinImportExport.cpp unit/ImportExport/utCOBImportExport.cpp + unit/ImportExport/utOgreImportExport.cpp + unit/ImportExport/utQ3BSPFileImportExport.cpp ) SET( MATERIAL @@ -175,6 +177,7 @@ add_executable( unit ) 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} ) diff --git a/test/models-nonbsd/PK3/SGDTT3.pk3 b/test/models-nonbsd/PK3/SGDTT3.pk3 index 3eeb015c32ccc14a97fdbecb3fd4cabdf2587fea..0d997e5d92421a0a509d637f0ffaea1117b761e2 100644 GIT binary patch delta 33 ncmeC0E!;C(xS@ryg{g&k3roNRM&9iK6Ig@=fpqdh7Ihr}y(0<= delta 29 lcmeB~E!;I*xS@ryg{g&k3roO+?ST_mgax;!E@V;H0RW&D3Gn~` diff --git a/test/unit/ImportExport/utOgreImportExport.cpp b/test/unit/ImportExport/utOgreImportExport.cpp new file mode 100644 index 000000000..1950fc90a --- /dev/null +++ b/test/unit/ImportExport/utOgreImportExport.cpp @@ -0,0 +1,64 @@ +/* +--------------------------------------------------------------------------- +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 "UnitTestPCH.h" +#include "SceneDiffer.h" +#include "AbstractImportExportBase.h" + +#include +#include + +using namespace Assimp; + +class utOgreImportExport : public AbstractImportExportBase { +public: + virtual bool importerTest() { + Assimp::Importer importer; + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/Ogre/TheThing/Mesh.mesh.xml", aiProcess_ValidateDataStructure); + return nullptr != scene; + } +}; + +TEST_F(utOgreImportExport, importerTest ) { + EXPECT_TRUE(importerTest()); +} diff --git a/test/unit/ImportExport/utQ3BSPFileImportExport.cpp b/test/unit/ImportExport/utQ3BSPFileImportExport.cpp new file mode 100644 index 000000000..ba12652b4 --- /dev/null +++ b/test/unit/ImportExport/utQ3BSPFileImportExport.cpp @@ -0,0 +1,64 @@ +/* +--------------------------------------------------------------------------- +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 "UnitTestPCH.h" +#include "SceneDiffer.h" +#include "AbstractImportExportBase.h" + +#include +#include + +using namespace Assimp; + +class utQ3BSPImportExport : public AbstractImportExportBase { +public: + virtual bool importerTest() { + Assimp::Importer importer; + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_NONBSD_DIR "/PK3/SGDTT3.pk3", 0); + return nullptr != scene; + } +}; + +TEST_F(utQ3BSPImportExport, importerTest) { + EXPECT_TRUE(importerTest()); +} From 673885a6d330787cc208aaf0ce81176961b89a62 Mon Sep 17 00:00:00 2001 From: Alexandre Avenel Date: Fri, 21 Sep 2018 20:04:53 +0200 Subject: [PATCH 41/47] Add unit test for gltf2 export to obj --- test/unit/utglTF2ImportExport.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/unit/utglTF2ImportExport.cpp b/test/unit/utglTF2ImportExport.cpp index 9eb3ef5bd..ebf97a5eb 100644 --- a/test/unit/utglTF2ImportExport.cpp +++ b/test/unit/utglTF2ImportExport.cpp @@ -101,6 +101,24 @@ TEST_F( utglTF2ImportExport, importBinaryglTF2FromFileTest ) { EXPECT_TRUE( binaryImporterTest() ); } +#ifndef ASSIMP_BUILD_NO_EXPORT +TEST_F(utglTF2ImportExport, importglTF2AndExportToOBJ) { + Assimp::Importer importer; + Assimp::Exporter exporter; + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/glTF2/BoxTextured-glTF/BoxTextured.gltf", aiProcess_ValidateDataStructure); + EXPECT_NE(nullptr, scene); + EXPECT_EQ(aiReturn_SUCCESS, exporter.Export(scene, "obj", ASSIMP_TEST_MODELS_DIR "/glTF2/BoxTextured-glTF/BoxTextured_out.obj")); +} + +TEST_F(utglTF2ImportExport, importglTF2EmbeddedAndExportToOBJ) { + Assimp::Importer importer; + Assimp::Exporter exporter; + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/glTF2/BoxTextured-glTF-Embedded/BoxTextured.gltf", aiProcess_ValidateDataStructure); + EXPECT_NE(nullptr, scene); + EXPECT_EQ(aiReturn_SUCCESS, exporter.Export(scene, "obj", ASSIMP_TEST_MODELS_DIR "/glTF2/BoxTextured-glTF-Embedded/BoxTextured_out.obj")); +} +#endif // ASSIMP_BUILD_NO_EXPORT + TEST_F(utglTF2ImportExport, importglTF2PrimitiveModePointsWithoutIndices) { Assimp::Importer importer; //Points without indices From 504e5fd5c556e450c0ea09365ca28952dffa12c9 Mon Sep 17 00:00:00 2001 From: Alexandre Avenel Date: Fri, 21 Sep 2018 21:24:53 +0200 Subject: [PATCH 42/47] Use unique_ptr for gltf2 textures --- code/glTF2Asset.h | 4 ++-- code/glTF2Asset.inl | 20 ++++++++++---------- code/glTF2Importer.cpp | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/code/glTF2Asset.h b/code/glTF2Asset.h index b4545baa2..d1a70ae0a 100644 --- a/code/glTF2Asset.h +++ b/code/glTF2Asset.h @@ -659,7 +659,7 @@ namespace glTF2 int width, height; private: - uint8_t* mData; + std::unique_ptr mData; size_t mDataLength; public: @@ -674,7 +674,7 @@ namespace glTF2 { return mDataLength; } inline const uint8_t* GetData() const - { return mData; } + { return mData.get(); } inline uint8_t* StealData(); diff --git a/code/glTF2Asset.inl b/code/glTF2Asset.inl index 5a87715ce..96348d4f2 100644 --- a/code/glTF2Asset.inl +++ b/code/glTF2Asset.inl @@ -688,7 +688,6 @@ T Accessor::Indexer::GetValue(int i) inline Image::Image() : width(0) , height(0) - , mData(0) , mDataLength(0) { @@ -704,7 +703,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 { @@ -717,8 +718,9 @@ inline void Image::Read(Value& obj, Asset& r) this->mDataLength = this->bufferView->byteLength; // maybe this memcpy could be avoided if aiTexture does not delete[] pcData at destruction. - this->mData = new uint8_t [this->mDataLength]; - memcpy(this->mData, buffer->GetPointer() + this->bufferView->byteOffset, this->mDataLength); + + 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(); @@ -729,10 +731,8 @@ inline void Image::Read(Value& obj, Asset& r) inline uint8_t* Image::StealData() { - uint8_t* data = mData; - mDataLength = 0; - mData = 0; - return data; + mDataLength = 0; + return mData.release(); } inline void Image::SetData(uint8_t* data, size_t length, Asset& r) @@ -747,8 +747,8 @@ 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->mDataLength = length; + this->mData.reset(data); + this->mDataLength = length; } } diff --git a/code/glTF2Importer.cpp b/code/glTF2Importer.cpp index 8581d25fe..740935601 100755 --- a/code/glTF2Importer.cpp +++ b/code/glTF2Importer.cpp @@ -818,7 +818,7 @@ void glTF2Importer::ImportEmbeddedTextures(glTF2::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++; From 6146ff818c726b3e846bf40038fd74562ab66a55 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Tue, 25 Sep 2018 20:15:48 +0200 Subject: [PATCH 43/47] Enable coveralls for export tests. --- .travis.yml | 3 +- code/Q3BSPFileImporter.cpp | 161 +++++++++++++++---------------------- 2 files changed, 65 insertions(+), 99 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0b8d2f328..e768c530c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,7 +51,8 @@ matrix: env: ANALYZE=ON - os: linux compiler: gcc - env: DISABLE_EXPORTERS=YES ENABLE_COVERALLS=ON +# env: DISABLE_EXPORTERS=YES ENABLE_COVERALLS=ON + env: ENABLE_COVERALLS=ON - os: linux compiler: gcc env: SHARED_BUILD=ON diff --git a/code/Q3BSPFileImporter.cpp b/code/Q3BSPFileImporter.cpp index c06636df0..e6672596a 100644 --- a/code/Q3BSPFileImporter.cpp +++ b/code/Q3BSPFileImporter.cpp @@ -137,12 +137,10 @@ static void normalizePathName( const std::string &rPath, std::string &normalized // ------------------------------------------------------------------------------------------------ // Constructor. Q3BSPFileImporter::Q3BSPFileImporter() -: - m_pCurrentMesh( nullptr ), - m_pCurrentFace(nullptr), - m_MaterialLookupMap(), - mTextures() -{ +: m_pCurrentMesh( nullptr ) +, m_pCurrentFace(nullptr) +, m_MaterialLookupMap() +, mTextures() { // empty } @@ -164,48 +162,41 @@ 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 ); } } @@ -405,64 +396,50 @@ aiNode *Q3BSPFileImporter::CreateTopology( const Q3BSP::Q3BSPModel *pModel, // ------------------------------------------------------------------------------------------------ // 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; } - 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 ); - ai_assert( m_pCurrentFace ); - m_pCurrentFace->mIndices[ idx ] = rVertIdx; - rVertIdx++; + m_pCurrentFace->mIndices[ idx ] = vertIdx; + vertIdx++; idx++; - if ( idx > 2 ) - { + if ( idx > 2 ) { idx = 0; - m_pCurrentFace = getNextFace( pMesh, rFaceIdx ); - if ( NULL != m_pCurrentFace ) - { + m_pCurrentFace = getNextFace( pMesh, faceIdx ); + if ( nullptr != m_pCurrentFace ) { m_pCurrentFace->mNumIndices = 3; m_pCurrentFace->mIndices = new unsigned int[ 3 ]; } } } - rFaceIdx--; + //faceIdx--; } // ------------------------------------------------------------------------------------------------ @@ -470,8 +447,7 @@ void Q3BSPFileImporter::createTriangleTopology( const Q3BSP::Q3BSPModel *pModel, void Q3BSPFileImporter::createMaterials( const Q3BSP::Q3BSPModel *pModel, aiScene* pScene, Q3BSPZipArchive *pArchive ) { - if ( m_MaterialLookupMap.empty() ) - { + if ( m_MaterialLookupMap.empty() ) { return; } @@ -479,11 +455,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; } @@ -524,17 +498,16 @@ void Q3BSPFileImporter::createMaterials( const Q3BSP::Q3BSPModel *pModel, aiScen // ------------------------------------------------------------------------------------------------ // Counts the number of referenced vertices. -size_t Q3BSPFileImporter::countData( const std::vector &rArray ) const -{ - size_t numVerts = 0; - for ( std::vector::const_iterator it = rArray.begin(); it != rArray.end(); +size_t Q3BSPFileImporter::countData( const std::vector &faceArray ) const { + size_t numVerts( 0 ); + for ( std::vector::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 +553,7 @@ size_t Q3BSPFileImporter::countTriangles( const std::vector // ------------------------------------------------------------------------------------------------ // 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 *pCurFaceArray = NULL; for ( size_t idx = 0; idx < pModel->m_Faces.size(); idx++ ) @@ -591,8 +563,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; m_MaterialLookupMap[ key ] = pCurFaceArray; } @@ -600,8 +571,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 +581,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( pModel->m_Textures.size() ) ) { + if ( textureId < 0 || textureId >= static_cast( 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 +615,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 +637,7 @@ bool Q3BSPFileImporter::importTextureFromArchive( const Q3BSP::Q3BSPModel *pMode name.data[ 0 ] = '*'; name.length = 1 + ASSIMP_itoa10( name.data + 1, static_cast(MAXLEN-1), static_cast(mTextures.size()) ); - pArchive->Close( pTextureStream ); + archive->Close( pTextureStream ); pMatHelper->AddProperty( &name, AI_MATKEY_TEXTURE_DIFFUSE( 0 ) ); mTextures.push_back( pTexture ); @@ -689,19 +659,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( pModel->m_Lightmaps.size() ) ) - { + if ( lightmapId < 0 || lightmapId >= static_cast( pModel->m_Lightmaps.size() ) ) { return false; } sQ3BSPLightmap *pLightMap = pModel->m_Lightmaps[ lightmapId ]; - if ( NULL == pLightMap ) - { + if (nullptr == pLightMap ) { return false; } @@ -713,8 +680,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 +697,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, From 9c8e6f2127ba2fba57f7ca08cd176ebbc47b1d41 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 26 Sep 2018 20:52:59 +0200 Subject: [PATCH 44/47] Fix overflow by face allocation. --- code/Q3BSPFileImporter.cpp | 47 ++++++++++++++------------------- code/Q3BSPFileParser.cpp | 54 ++++++++++++++++---------------------- code/Q3BSPZipArchive.cpp | 21 +++++++-------- 3 files changed, 51 insertions(+), 71 deletions(-) diff --git a/code/Q3BSPFileImporter.cpp b/code/Q3BSPFileImporter.cpp index e6672596a..485869f77 100644 --- a/code/Q3BSPFileImporter.cpp +++ b/code/Q3BSPFileImporter.cpp @@ -252,14 +252,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 ); } @@ -276,32 +275,24 @@ 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 MeshArray; std::vector 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 *pArray = (*it).second; size_t numVerts = countData( *pArray ); - if ( 0 != numVerts ) - { + if ( 0 != numVerts ) { aiMesh* pMesh = new aiMesh; aiNode *pNode = CreateTopology( pModel, matIdx, *pArray, pMesh ); - if ( NULL != pNode ) - { + if ( nullptr != pNode ) { NodeArray.push_back( pNode ); MeshArray.push_back( pMesh ); - } - else - { + } else { delete pMesh; } } @@ -419,6 +410,14 @@ void Q3BSPFileImporter::createTriangleTopology( const Q3BSP::Q3BSPModel *pModel, 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[ vertIdx ].Set( pVertex->vPosition.x, pVertex->vPosition.y, pVertex->vPosition.z ); pMesh->mNormals[ vertIdx ].Set( pVertex->vNormal.x, pVertex->vNormal.y, pVertex->vNormal.z ); @@ -430,14 +429,6 @@ void Q3BSPFileImporter::createTriangleTopology( const Q3BSP::Q3BSPModel *pModel, vertIdx++; idx++; - 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 ]; - } - } } //faceIdx--; } diff --git a/code/Q3BSPFileParser.cpp b/code/Q3BSPFileParser.cpp index f4aea28e6..f7038adeb 100644 --- a/code/Q3BSPFileParser.cpp +++ b/code/Q3BSPFileParser.cpp @@ -55,48 +55,44 @@ 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(); @@ -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/Q3BSPZipArchive.cpp b/code/Q3BSPZipArchive.cpp index 5c9209512..3e1087b9a 100644 --- a/code/Q3BSPZipArchive.cpp +++ b/code/Q3BSPZipArchive.cpp @@ -183,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(); } } @@ -197,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::const_iterator it = m_ArchiveMap.find(rFile); @@ -241,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::iterator it = m_ArchiveMap.find(pFile); @@ -258,7 +255,7 @@ IOStream *Q3BSPZipArchive::Open(const char* pFile, const char* /*pMode*/) { // Close a filestream. void Q3BSPZipArchive::Close(IOStream *pFile) { (void)(pFile); - ai_assert(pFile != NULL); + ai_assert(pFile != nullptr); // We don't do anything in case the file would be opened again in the future } @@ -277,7 +274,7 @@ void Q3BSPZipArchive::getFileList(std::vector &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) { From 74db0e906bbe4bf2a3409ab6399bdf0b27d60465 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 26 Sep 2018 21:19:40 +0200 Subject: [PATCH 45/47] Fix some minor findings. --- code/Q3BSPFileImporter.cpp | 140 ++++++++++++++++--------------------- code/Q3BSPFileImporter.h | 2 +- 2 files changed, 61 insertions(+), 81 deletions(-) diff --git a/code/Q3BSPFileImporter.cpp b/code/Q3BSPFileImporter.cpp index 485869f77..58fbef985 100644 --- a/code/Q3BSPFileImporter.cpp +++ b/code/Q3BSPFileImporter.cpp @@ -47,6 +47,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "Q3BSPFileParser.h" #include "Q3BSPFileData.h" +#include + #ifdef ASSIMP_BUILD_NO_OWN_ZLIB # include #else @@ -202,45 +204,40 @@ void Q3BSPFileImporter::InternReadFile(const std::string &rFile, aiScene* scene, // ------------------------------------------------------------------------------------------------ // 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() ) - return; - - std::string::size_type pos = rImportName.rfind( "," ); - if ( std::string::npos == pos ) - { - rArchiveName = rImportName; +void Q3BSPFileImporter::separateMapName( const std::string &importName, std::string &archiveName, std::string &mapName ) { + archiveName = ""; + mapName = ""; + if (importName.empty()) { return; } - rArchiveName = rImportName.substr( 0, pos ); - rMapName = rImportName.substr( pos, rImportName.size() - pos - 1 ); + const std::string::size_type pos = importName.rfind( "," ); + if ( std::string::npos == pos ) { + archiveName = importName; + return; + } + + 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 fileList; - rArchive.getFileList( fileList ); - if ( fileList.empty() ) + bspArchive.getFileList( fileList ); + if (fileList.empty()) { return false; + } - for ( std::vector::iterator it = fileList.begin(); it != fileList.end(); - ++it ) - { - std::string::size_type pos = (*it).find( "maps/" ); - if ( std::string::npos != pos ) - { + std::vector::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; } } @@ -287,27 +284,22 @@ void Q3BSPFileImporter::CreateNodes( const Q3BSP::Q3BSPModel *pModel, aiScene* p std::vector *pArray = (*it).second; size_t numVerts = countData( *pArray ); if ( 0 != numVerts ) { - aiMesh* pMesh = new aiMesh; - aiNode *pNode = CreateTopology( pModel, matIdx, *pArray, pMesh ); + 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( 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; } } @@ -315,8 +307,7 @@ void Q3BSPFileImporter::CreateNodes( const Q3BSP::Q3BSPModel *pModel, aiScene* p pParent->mNumChildren = static_cast(MeshArray.size()); pParent->mChildren = new aiNode*[ pScene->mRootNode->mNumChildren ]; - for ( size_t i=0; imParent = pParent; pParent->mChildren[ i ] = pNode; @@ -326,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 &rArray, - aiMesh* pMesh ) -{ +aiNode *Q3BSPFileImporter::CreateTopology( const Q3BSP::Q3BSPModel *pModel, unsigned int materialIdx, + std::vector &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(numTriangles); + mesh->mFaces = new aiFace[ numTriangles ]; + mesh->mNumFaces = static_cast(numTriangles); - pMesh->mNumVertices = static_cast(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(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::const_iterator it = rArray.begin(); it != rArray.end(); ++it ) - { + mesh->mNumUVComponents[ 0 ] = 2; + mesh->mNumUVComponents[ 1 ] = 2; + for ( std::vector::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 ); } } } @@ -381,6 +364,7 @@ aiNode *Q3BSPFileImporter::CreateTopology( const Q3BSP::Q3BSPModel *pModel, aiNode *pNode = new aiNode; pNode->mNumMeshes = 1; pNode->mMeshes = new unsigned int[ 1 ]; + *pMesh = mesh; return pNode; } @@ -430,14 +414,12 @@ void Q3BSPFileImporter::createTriangleTopology( const Q3BSP::Q3BSPModel *pModel, idx++; } - //faceIdx--; } // ------------------------------------------------------------------------------------------------ // Creates all referenced materials. void Q3BSPFileImporter::createMaterials( const Q3BSP::Q3BSPModel *pModel, aiScene* pScene, - Q3BSPZipArchive *pArchive ) -{ + Q3BSPZipArchive *pArchive ) { if ( m_MaterialLookupMap.empty() ) { return; } @@ -459,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); } } diff --git a/code/Q3BSPFileImporter.h b/code/Q3BSPFileImporter.h index 0e25c8374..5f3e31157 100644 --- a/code/Q3BSPFileImporter.h +++ b/code/Q3BSPFileImporter.h @@ -89,7 +89,7 @@ protected: 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 &rArray, aiMesh* pMesh ); + std::vector &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 ); From 35a727a3e4641114dcbb3c08b003edf0411b55f2 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 26 Sep 2018 21:37:02 +0200 Subject: [PATCH 46/47] closes https://github.com/assimp/assimp/issues/2154: remove redundant file from source folder. --- code/SGSpatialSort.h | 141 ------------------------------------------- 1 file changed, 141 deletions(-) delete mode 100644 code/SGSpatialSort.h diff --git a/code/SGSpatialSort.h b/code/SGSpatialSort.h deleted file mode 100644 index f087ad8b5..000000000 --- a/code/SGSpatialSort.h +++ /dev/null @@ -1,141 +0,0 @@ -/* -Open Asset Import Library (assimp) ----------------------------------------------------------------------- - -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. - ----------------------------------------------------------------------- -*/ - -/** Small helper classes to optimize finding vertices close to a given location - */ -#ifndef AI_D3DSSPATIALSORT_H_INC -#define AI_D3DSSPATIALSORT_H_INC - -#include -#include -#include - -namespace Assimp { - -// ---------------------------------------------------------------------------------- -/** Specialized version of SpatialSort to support smoothing groups - * This is used in by the 3DS, ASE and LWO loaders. 3DS and ASE share their - * normal computation code in SmoothingGroups.inl, the LWO loader has its own - * implementation to handle all details of its file format correctly. - */ -// ---------------------------------------------------------------------------------- -class ASSIMP_API SGSpatialSort -{ -public: - - SGSpatialSort(); - - // ------------------------------------------------------------------- - /** Construction from a given face array, handling smoothing groups - * properly - */ - explicit SGSpatialSort(const std::vector& vPositions); - - // ------------------------------------------------------------------- - /** Add a vertex to the spatial sort - * @param vPosition Vertex position to be added - * @param index Index of the vrtex - * @param smoothingGroup SmoothingGroup for this vertex - */ - void Add(const aiVector3D& vPosition, unsigned int index, - unsigned int smoothingGroup); - - // ------------------------------------------------------------------- - /** Prepare the spatial sorter for use. This step runs in O(logn) - */ - void Prepare(); - - /** Destructor */ - ~SGSpatialSort(); - - // ------------------------------------------------------------------- - /** Returns an iterator for all positions close to the given position. - * @param pPosition The position to look for vertices. - * @param pSG Only included vertices with at least one shared smooth group - * @param pRadius Maximal distance from the position a vertex may have - * to be counted in. - * @param poResults The container to store the indices of the found - * positions. Will be emptied by the call so it may contain anything. - * @param exactMatch Specifies whether smoothing groups are bit masks - * (false) or integral values (true). In the latter case, a vertex - * cannot belong to more than one smoothing group. - * @return An iterator to iterate over all vertices in the given area. - */ - // ------------------------------------------------------------------- - void FindPositions( const aiVector3D& pPosition, uint32_t pSG, - float pRadius, std::vector& poResults, - bool exactMatch = false) const; - -protected: - /** Normal of the sorting plane, normalized. The center is always at (0, 0, 0) */ - 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 - { - 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( 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; } - }; - - // all positions, sorted by distance to the sorting plane - std::vector mPositions; -}; - -} // end of namespace Assimp - -#endif // AI_SPATIALSORT_H_INC From 4003309e7ae6091d3724cd5292ac4ea97b7eb0d4 Mon Sep 17 00:00:00 2001 From: kimkulling Date: Fri, 28 Sep 2018 17:06:03 +0200 Subject: [PATCH 47/47] StepFile: prepare code gen. --- code/Importer/IFC/STEPFileReader.cpp | 14 +- scripts/StepImporter/CppGenerator.py | 2 +- scripts/StepImporter/extract_step_token.py | 10 + .../StepImporter/part403ts_wg3n2635mim_lf.exp | 16378 ++++++++++++++++ scripts/StepImporter/step_entitylist.txt | 101 - 5 files changed, 16396 insertions(+), 109 deletions(-) create mode 100644 scripts/StepImporter/extract_step_token.py create mode 100644 scripts/StepImporter/part403ts_wg3n2635mim_lf.exp diff --git a/code/Importer/IFC/STEPFileReader.cpp b/code/Importer/IFC/STEPFileReader.cpp index bd56f71fe..c7cad05ae 100644 --- a/code/Importer/IFC/STEPFileReader.cpp +++ b/code/Importer/IFC/STEPFileReader.cpp @@ -85,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 stream) -{ +STEP::DB* STEP::ReadFileHeader(std::shared_ptr stream) { std::shared_ptr reader = std::shared_ptr(new StreamReaderLE(stream)); std::unique_ptr db = std::unique_ptr(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(); @@ -109,7 +109,7 @@ STEP::DB* STEP::ReadFileHeader(std::shared_ptr 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); diff --git a/scripts/StepImporter/CppGenerator.py b/scripts/StepImporter/CppGenerator.py index 4f67a3aea..58cf17f01 100644 --- a/scripts/StepImporter/CppGenerator.py +++ b/scripts/StepImporter/CppGenerator.py @@ -235,7 +235,7 @@ def work(filename): 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() diff --git a/scripts/StepImporter/extract_step_token.py b/scripts/StepImporter/extract_step_token.py new file mode 100644 index 000000000..62d9bc123 --- /dev/null +++ b/scripts/StepImporter/extract_step_token.py @@ -0,0 +1,10 @@ + +token = [] +file = open(sys.argv[1]) +output = open("step_entitylist.txt", "a") +lines = file.readlines() +for line in lines: + pos = line.find("ENTITY") + if pos != -1: + + 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;-- +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/step_entitylist.txt b/scripts/StepImporter/step_entitylist.txt index 14b05ca3e..e1cefa2d1 100644 --- a/scripts/StepImporter/step_entitylist.txt +++ b/scripts/StepImporter/step_entitylist.txt @@ -8,104 +8,3 @@ # code generator. Also, the names of all used entities need to be present # in the source code for this to work. -IfcAnnotation -IfcArbitraryClosedProfileDef -IfcArbitraryOpenProfileDef -IfcArbitraryProfileDefWithVoids -IfcAxis1Placement -IfcAxis2Placement -IfcAxis2Placement2D -IfcAxis2Placement3D -IfcBooleanClippingResult -IfcBooleanResult -IfcBoundedCurve -IfcBoundingBox -IfcBSplineCurve -IfcBuilding -IfcCartesianPoint -IfcCartesianTransformationOperator -IfcCartesianTransformationOperator3D -IfcCartesianTransformationOperator3DnonUniform -IfcCircle -IfcCircleHollowProfileDef -IfcCircleProfileDef -IfcClosedShell -IfcColourOrFactor -IfcColourRgb -IfcCompositeCurve -IfcCompositeCurveSegment -IfcConic -IfcConnectedFaceSet -IfcConversionBasedUnit -IfcCurve -IfcDirection -IfcDoor -IfcEllipse -IfcExtrudedAreaSolid -IfcFace -IfcFaceBasedSurfaceModel -IfcFaceBound -IfcFaceOuterBound -IfcFeatureElementSubtraction -IfcGeometricRepresentationContext -IfcGeometricRepresentationItem -IfcHalfSpaceSolid -IfcLine -IfcLocalPlacement -IfcManifoldSolidBrep -IfcMappedItem -IfcMeasureWithUnit -IfcNamedUnit -IfcObjectDefinition -IfcObjectPlacement -IfcOpeningElement -IfcParameterizedProfileDef -IfcPlane -IfcPolygonalBoundedHalfSpace -IfcPolyline -IfcPolyLoop -IfcPresentationStyleAssignment -IfcPresentationStyleSelect -IfcProduct -IfcProductRepresentation -IfcProfileDef -IfcProject -IfcRectangleProfileDef -IfcRelAggregates -IfcRelContainedInSpatialStructure -IfcRelFillsElement -IfcRelVoidsElement -IfcRepresentation -IfcRepresentationContext -IfcRepresentationItem -IfcRepresentationMap -IfcRevolvedAreaSolid -IfcShell -IfcShellBasedSurfaceModel -IfcSite -IfcSIUnit -IfcSomething -IfcSpace -IfcSpatialStructureElement -IfcSpatialStructureElements -IfcStyledItem -IfcSurfaceStyle -IfcSurfaceStyleElementSelect -IfcSurfaceStyleRendering -IfcSurfaceStyleShading -IfcSurfaceStyleWithTextures -IfcSweptAreaSolid -IfcSweptDiskSolid -IfcTopologicalRepresentationItem -IfcTrimmedCurve -IfcUnit -IfcUnitAssignment -IfcVector -IfcIShapeProfileDef -IfcPropertyListValue -IfcRelDefinesByProperties -IfcPropertySet -IfcPropertySingleValue -IfcProperty -IfcComplexProperty -IfcElementQuantity