From: vsr Date: Wed, 18 Dec 2013 15:10:15 +0000 (+0000) Subject: Merge from V7_3_BR branch 18/12/2013 X-Git-Tag: V7_4_0a1~2^2~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0d57157eea388168d65944613894ddb0d05234bd;p=plugins%2Fhexoticplugin.git Merge from V7_3_BR branch 18/12/2013 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index af063ce..e680e48 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ CMAKE_POLICY(SET CMP0003 NEW) STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC) SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7) -SET(${PROJECT_NAME_UC}_MINOR_VERSION 2) +SET(${PROJECT_NAME_UC}_MINOR_VERSION 3) SET(${PROJECT_NAME_UC}_PATCH_VERSION 0) SET(${PROJECT_NAME_UC}_VERSION ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION}) @@ -140,6 +140,12 @@ IF(EXISTS ${SMESH_ROOT_DIR}) FIND_PACKAGE(SalomeSMESH REQUIRED) ADD_DEFINITIONS(${SMESH_DEFINITIONS}) INCLUDE_DIRECTORIES(${SMESH_INCLUDE_DIRS}) + IF(SALOME_BUILD_DOC) + IF(NOT SALOME_SMESH_BUILD_DOC) + MESSAGE(FATAL_ERROR "We absolutely need a Salome SMESH documentation to build HexoticPLUGIN documentation. " + "So, you should either set SALOME_BUILD_DOC=OFF in HexoticPLUGIN or set SALOME_BUILD_DOC=ON in SMESH module.") + ENDIF(NOT SALOME_SMESH_BUILD_DOC) + ENDIF(SALOME_BUILD_DOC) ELSE(EXISTS ${SMESH_ROOT_DIR}) MESSAGE(FATAL_ERROR "We absolutely need a Salome SMESH, please define SMESH_ROOT_DIR") ENDIF(EXISTS ${SMESH_ROOT_DIR}) diff --git a/doc/salome/gui/HexoticPLUGIN/CMakeLists.txt b/doc/salome/gui/HexoticPLUGIN/CMakeLists.txt index 32525de..649fe7c 100755 --- a/doc/salome/gui/HexoticPLUGIN/CMakeLists.txt +++ b/doc/salome/gui/HexoticPLUGIN/CMakeLists.txt @@ -47,4 +47,5 @@ INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/HexoticPLUGIN DESTINATION ${SALOME INSTALL(FILES images/head.png DESTINATION ${SALOME_INSTALL_DOC}/gui/HexoticPLUGIN) INSTALL(FILES images/head.png DESTINATION ${SALOME_INSTALL_DOC}/gui/HexoticPLUGIN/hexoticpluginpy_doc) -SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES HexoticPLUGIN) \ No newline at end of file +SET(make_clean_files HexoticPLUGIN hexoticpluginpy_doc.tag) +SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${make_clean_files}") diff --git a/src/GUI/HexoticPLUGIN_msg_fr.ts b/src/GUI/HexoticPLUGIN_msg_fr.ts index 7449f37..feee3c0 100755 --- a/src/GUI/HexoticPLUGIN_msg_fr.ts +++ b/src/GUI/HexoticPLUGIN_msg_fr.ts @@ -3,6 +3,10 @@ @default + + Hexotic_NULL_LOCAL_SIZE + 0 is not allowed as "Local size" + Hexotic_3D_HYPOTHESIS Hexotic 3D diff --git a/src/GUI/HexoticPLUGIN_msg_ja.ts b/src/GUI/HexoticPLUGIN_msg_ja.ts index 8c312be..8169de7 100644 --- a/src/GUI/HexoticPLUGIN_msg_ja.ts +++ b/src/GUI/HexoticPLUGIN_msg_ja.ts @@ -3,6 +3,34 @@ @default + + Hexotic_NULL_LOCAL_SIZE + 0 is not allowed as "Local size" + + + Hexotic_SEL_SHAPE + Select a shape + + + Hexotic_SIZE + Size + + + Hexotic_NAME + Name + + + Hexotic_ENTRY + Entry + + + Hexotic_REMOVE + Remove + + + Hexotic_ADD + Add + Hexotic_3D_HYPOTHESIS Hexotic 3D diff --git a/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx b/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx index c6bae59..9db08d4 100644 --- a/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx +++ b/src/HexoticPlugin/HexoticPlugin_Hexotic.cxx @@ -369,6 +369,23 @@ static void removeHexoticFiles(TCollection_AsciiString file_In, TCollection_Asci removeFile( file_Out ); } +//======================================================================= +//function : splitQuads +//purpose : splits all quadrangles into triangles +//======================================================================= + +static void splitQuads(SMESH_Mesh& aMesh) +{ + SMESH_MeshEditor spliter( &aMesh ); + + TIDSortedElemSet elems; + SMDS_ElemIteratorPtr eIt = aMesh.GetMeshDS()->elementsIterator(); + while( eIt->more() ) + elems.insert( elems.end(), eIt->next() ); + + spliter.QuadToTri ( elems, /*the13Diag=*/true); +} + //======================================================================= //function : readResult //purpose : Read GMF file in case of a mesh with geometry @@ -687,7 +704,15 @@ static bool readResult(std::string theFile, mapField["Hexahedra"] = 7; tabRef[7] = 8; tabDummy[7] = true; mapField["End"] = 8; tabRef[8] = 0; tabDummy[8] = false; - theHelper->GetMesh()->Clear(); + { + // theMesh->Clear(); -- this does not remove imported mesh + SMDS_ElemIteratorPtr eIt = theMesh->elementsIterator(); + while( eIt->more() ) + theMesh->RemoveFreeElement( eIt->next(), /*sm=*/0 ); + SMDS_NodeIteratorPtr nIt = theMesh->nodesIterator(); + while ( nIt->more() ) + theMesh->RemoveFreeNode( nIt->next(), /*sm=*/0 ); + } int nbVertices = getNbShape(theFile, "Vertices"); HexoticNode = new SMDS_MeshNode*[ nbVertices + 1 ]; @@ -1488,6 +1513,7 @@ bool HexoticPlugin_Hexotic::Compute(SMESH_Mesh& aMesh, #endif Hexotic_In = aTmpDir + "Hexotic"+getSuffix()+"_In.mesh"; removeHexoticFiles(Hexotic_In, Hexotic_Out); + splitQuads(aMesh); // quadrangles are no longer acceptable as input cout << std::endl; cout << "Creating Hexotic input mesh file : " << Hexotic_In << std::endl; aMesh.ExportGMF(Hexotic_In.ToCString(), meshDS, true); @@ -1643,6 +1669,8 @@ bool HexoticPlugin_Hexotic::Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHel removeHexoticFiles(Hexotic_In, Hexotic_Out); + splitQuads(aMesh); // quadrangles are no longer acceptable as input + cout << std::endl; cout << "Creating Hexotic input mesh file : " << Hexotic_In << std::endl; aMesh.ExportGMF(Hexotic_In.ToCString(), aHelper->GetMeshDS());