]> SALOME platform Git repositories - plugins/hexoticplugin.git/commitdiff
Salome HOME
Merge from V7_3_BR branch 18/12/2013
authorvsr <vsr@opencascade.com>
Wed, 18 Dec 2013 15:10:15 +0000 (15:10 +0000)
committervsr <vsr@opencascade.com>
Wed, 18 Dec 2013 15:10:15 +0000 (15:10 +0000)
CMakeLists.txt
doc/salome/gui/HexoticPLUGIN/CMakeLists.txt
src/GUI/HexoticPLUGIN_msg_fr.ts
src/GUI/HexoticPLUGIN_msg_ja.ts
src/HexoticPlugin/HexoticPlugin_Hexotic.cxx

index af063ce4acccb3697483d4dfe9c089505b20582a..e680e48ee1ad105c619950eae3e970cd757961a5 100755 (executable)
@@ -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})
index 32525de4fc4479a11e71de6f25f35575c8a02f67..649fe7cc8334826b1bf476c9cb65a2210b176b2c 100755 (executable)
@@ -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}")
index 7449f3790a2ade8f97c4c6c72e002cfe373642f5..feee3c0c880d08ddd9b85caa54716cfa9742e71b 100755 (executable)
@@ -3,6 +3,10 @@
 <TS version="2.0" language="fr_FR">
 <context>
     <name>@default</name>
+    <message>
+        <source>Hexotic_NULL_LOCAL_SIZE</source>
+        <translation type="unfinished">0 is not allowed as "Local size"</translation>
+    </message>
     <message>
         <source>Hexotic_3D_HYPOTHESIS</source>
         <translation>Hexotic 3D</translation>
index 8c312be1e88936e1b239ec8cf2016ddf22b7727f..8169de76ee6382f28fa554f4cce80aab6e8614ee 100644 (file)
@@ -3,6 +3,34 @@
 <TS>
   <context>
     <name>@default</name>
+    <message>
+        <source>Hexotic_NULL_LOCAL_SIZE</source>
+        <translation type="unfinished">0 is not allowed as "Local size"</translation>
+    </message>
+    <message>
+        <source>Hexotic_SEL_SHAPE</source>
+        <translation type="unfinished">Select a shape</translation>
+    </message>
+    <message>
+        <source>Hexotic_SIZE</source>
+        <translation type="unfinished">Size</translation>
+    </message>
+    <message>
+        <source>Hexotic_NAME</source>
+        <translation type="unfinished">Name</translation>
+    </message>
+    <message>
+        <source>Hexotic_ENTRY</source>
+        <translation type="unfinished">Entry</translation>
+    </message>
+    <message>
+        <source>Hexotic_REMOVE</source>
+        <translation type="unfinished">Remove</translation>
+    </message>
+    <message>
+        <source>Hexotic_ADD</source>
+        <translation type="unfinished">Add</translation>
+    </message>
     <message>
       <source>Hexotic_3D_HYPOTHESIS</source>
       <translation>Hexotic 3D</translation>
index c6bae59e41f63697bda0da5ce7ddd3cf8eaeace6..9db08d46f536bfaab1cf7485ef0d9d16757d28e3 100644 (file)
@@ -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());