]> SALOME platform Git repositories - plugins/ghs3dprlplugin.git/blobdiff - src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.cxx
Salome HOME
Merge multi-study removal branch.
[plugins/ghs3dprlplugin.git] / src / GHS3DPRLPlugin / GHS3DPRLPlugin_GHS3DPRL.cxx
index 946cb7e23cb96f746df431edbba7009e500ab5db..271c52c47b4a172974bc0fa5f18bd27612684fa4 100755 (executable)
@@ -30,6 +30,7 @@
 #include <SMESH_Gen.hxx>
 #include <SMESH_TypeDefs.hxx>
 #include <SMESH_subMesh.hxx>
+#include <SMESH_MesherHelper.hxx>
 
 #include "utilities.h"
 
@@ -72,6 +73,7 @@ GHS3DPRLPlugin_GHS3DPRL::GHS3DPRLPlugin_GHS3DPRL(int hypId, SMESH_Gen* gen)
   _countSubMesh=0;
   _nodeRefNumber=0;
   _compatibleHypothesis.push_back(GHS3DPRLPlugin_Hypothesis::GetHypType());
+  _requireShape=false;
 }
 
 //=============================================================================
@@ -206,10 +208,22 @@ static void exportGMF(MG_TetraHPC_API*    theTetraInput,
 // Here we are going to use the GHS3DPRL mesher for tetra-hpc (formerly tepal in v3 (2014))
 bool GHS3DPRLPlugin_GHS3DPRL::Compute(SMESH_Mesh&         theMesh,
                                       const TopoDS_Shape& theShape)
+{
+  SMESH_MesherHelper helper( theMesh );
+  bool ok = Compute( theMesh, &helper );
+  return ok;
+}
+
+//=============================================================================
+// Here we are going to use the GHS3DPRL mesher for tetra-hpc (formerly tepal in v3 (2014))
+bool GHS3DPRLPlugin_GHS3DPRL::Compute(SMESH_Mesh&         theMesh,
+                                      SMESH_MesherHelper* theHelper)
 {
   bool Ok=false;
   TCollection_AsciiString pluginerror("ghs3dprl: ");
   SMESHDS_Mesh* meshDS = theMesh.GetMeshDS();
+  if ( theMesh.NbTriangles() == 0 )
+    return error( COMPERR_BAD_INPUT_MESH, "No triangles in the mesh" );
 
   if (_hypothesis==NULL){
     pluginerror += "No existing parameters/hypothesis for GHS3DPRL";