From 62d28c11500d959aec834cdbb3115a46b48c53cb Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 25 Oct 2016 14:50:24 +0300 Subject: [PATCH] 23372: [CEA 1524] Impossible to use MG-Tetra Parallel to mesh the inside of a skin mesh --- resources/GHS3DPRLPlugin.xml | 1 + src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.cxx | 14 ++++++++++++++ src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.hxx | 2 ++ 3 files changed, 17 insertions(+) diff --git a/resources/GHS3DPRLPlugin.xml b/resources/GHS3DPRLPlugin.xml index 9017cef..292694c 100755 --- a/resources/GHS3DPRLPlugin.xml +++ b/resources/GHS3DPRLPlugin.xml @@ -46,6 +46,7 @@ input ="TRIA" output ="TETRA" need-hyp ="true" + need-geom="false" dim ="3"> MG-Tetra Parallel=Tetrahedron(algo=smeshBuilder.MG_Tetra_Parallel) diff --git a/src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.cxx b/src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.cxx index 20d122d..b012af6 100755 --- a/src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.cxx +++ b/src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.cxx @@ -30,6 +30,7 @@ #include #include #include +#include #include "utilities.h" @@ -72,6 +73,7 @@ GHS3DPRLPlugin_GHS3DPRL::GHS3DPRLPlugin_GHS3DPRL(int hypId, int studyId, SMESH_G _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"; diff --git a/src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.hxx b/src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.hxx index 5742b5e..0802773 100755 --- a/src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.hxx +++ b/src/GHS3DPRLPlugin/GHS3DPRLPlugin_GHS3DPRL.hxx @@ -49,6 +49,8 @@ public: virtual bool Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape); + virtual bool Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelper); + virtual bool Evaluate(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape, MapShapeNbElems& aResMap); -- 2.39.2