X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGMSHPlugin%2FGMSHPlugin_GMSH.cxx;h=a8141debd26c1463728eab9685c5b394486a773f;hb=9b7c66c3c0819b0b5395a8a96ec0b98897c4095a;hp=9c183d9fd819421ac5a088262e20e95872abb1c3;hpb=fecfae2bc05750dfe1f6dccacf79abc449caff92;p=plugins%2Fgmshplugin.git diff --git a/src/GMSHPlugin/GMSHPlugin_GMSH.cxx b/src/GMSHPlugin/GMSHPlugin_GMSH.cxx index 9c183d9..a8141de 100644 --- a/src/GMSHPlugin/GMSHPlugin_GMSH.cxx +++ b/src/GMSHPlugin/GMSHPlugin_GMSH.cxx @@ -1,10 +1,10 @@ // Copyright (C) 2012-2015 ALNEOS -// Copyright (C) 2016-2019 EDF R&D +// Copyright (C) 2016-2023 EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -16,6 +16,7 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.alneos.com/ or email : contact@alneos.fr +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #include "GMSHPlugin_GMSH.hxx" #include "GMSHPlugin_Hypothesis.hxx" @@ -33,7 +34,7 @@ using namespace std; //============================================================================= /*! - * + * */ //============================================================================= @@ -52,7 +53,7 @@ GMSHPlugin_GMSH::GMSHPlugin_GMSH(int hypId, SMESH_Gen* gen) //============================================================================= /*! - * + * */ //============================================================================= @@ -63,19 +64,18 @@ GMSHPlugin_GMSH::~GMSHPlugin_GMSH() //============================================================================= /*! - * + * */ //============================================================================= -bool GMSHPlugin_GMSH::CheckHypothesis - (SMESH_Mesh& aMesh, - const TopoDS_Shape& aShape, - SMESH_Hypothesis::Hypothesis_Status& aStatus) +bool GMSHPlugin_GMSH::CheckHypothesis (SMESH_Mesh& aMesh, + const TopoDS_Shape& aShape, + SMESH_Hypothesis::Hypothesis_Status& aStatus) { MESSAGE("GMSHPlugin_GMSH::CheckHypothesis"); - + _hypothesis = NULL; - + const list& hyps = GetUsedHypothesis(aMesh, aShape); int nbHyp = hyps.size(); if (!nbHyp) @@ -85,7 +85,7 @@ bool GMSHPlugin_GMSH::CheckHypothesis } // use only the first hypothesis const SMESHDS_Hypothesis* theHyp = hyps.front(); - + string hypName = theHyp->GetName(); if ( find( _compatibleHypothesis.begin(), _compatibleHypothesis.end(), hypName ) != _compatibleHypothesis.end() ) @@ -108,9 +108,9 @@ bool GMSHPlugin_GMSH::CheckHypothesis //============================================================================= bool GMSHPlugin_GMSH::Compute(SMESH_Mesh& aMesh, - const TopoDS_Shape& aShape) + const TopoDS_Shape& aShape) { - GMSHPlugin_Mesher mesher(&aMesh, aShape); + GMSHPlugin_Mesher mesher(&aMesh, aShape,/*2d=*/false, false); mesher.SetParameters(dynamic_cast(_hypothesis)); return mesher.Compute(); } @@ -127,15 +127,15 @@ void GMSHPlugin_GMSH::CancelCompute() //============================================================================= bool GMSHPlugin_GMSH::Evaluate(SMESH_Mesh& aMesh, - const TopoDS_Shape& aShape, - MapShapeNbElems& aResMap) + const TopoDS_Shape& aShape, + MapShapeNbElems& aResMap) { - std::vector aResVec(SMDSEntity_Last); - for(int i=SMDSEntity_Node; i aResVec(SMDSEntity_Last); + for(smIdType i=SMDSEntity_Node; iGetComputeError(); smError.reset( new SMESH_ComputeError(COMPERR_ALGO_FAILED,"Evaluation is not implemented",this)); - + return true; }