#include "SMESH_MesherHelper.hxx"
#include "SMESH_MeshEditor.hxx"
#include "SMESH_OctreeNode.hxx"
+#include "SMESH_Group.hxx"
#include "SMDS_MeshElement.hxx"
#include "SMDS_MeshNode.hxx"
#include "SMDS_FaceOfNodes.hxx"
#include "SMDS_VolumeOfNodes.hxx"
+#include "SMESHDS_Group.hxx"
+
#include <StdMeshers_QuadToTriaAdaptor.hxx>
#include <StdMeshers_ViscousLayers.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopoDS.hxx>
+#include <TopoDS_Shape.hxx>
//#include <BRepClass_FaceClassifier.hxx>
#include <TopTools_MapOfShape.hxx>
#include <BRepGProp.hxx>
_nbShape=0;
_compatibleHypothesis.push_back("GHS3D_Parameters");
_compatibleHypothesis.push_back( StdMeshers_ViscousLayers::GetHypType() );
- _requireShape = false; // can work without shape
+ _requireShape = false; // can work without shape_studyId
+
+ smeshGen_i = SMESH_Gen_i::GetSMESHGen();
+ CORBA::Object_var anObject = smeshGen_i->GetNS()->Resolve("/myStudyManager");
+ SALOMEDS::StudyManager_var aStudyMgr = SALOMEDS::StudyManager::_narrow(anObject);
+
+ MESSAGE("studyid = " << _studyId);
+
+ myStudy = NULL;
+ myStudy = aStudyMgr->GetStudyByID(_studyId);
+ if (myStudy)
+ MESSAGE("myStudy->StudyId() = " << myStudy->StudyId());
+
#ifdef WITH_SMESH_CANCEL_COMPUTE
_compute_canceled = false;
#endif
}
+//=======================================================================
+//function : entryToShape
+//purpose :
+//=======================================================================
+
+TopoDS_Shape GHS3DPlugin_GHS3D::entryToShape(std::string entry)
+{
+ MESSAGE("GHS3DPlugin_GHS3D::entryToShape "<<entry );
+ GEOM::GEOM_Object_var aGeomObj;
+ TopoDS_Shape S = TopoDS_Shape();
+ SALOMEDS::SObject_var aSObj = myStudy->FindObjectID( entry.c_str() );
+ SALOMEDS::GenericAttribute_var anAttr;
+
+ if (!aSObj->_is_nil() && aSObj->FindAttribute(anAttr, "AttributeIOR")) {
+ SALOMEDS::AttributeIOR_var anIOR = SALOMEDS::AttributeIOR::_narrow(anAttr);
+ CORBA::String_var aVal = anIOR->Value();
+ CORBA::Object_var obj = myStudy->ConvertIORToObject(aVal);
+ aGeomObj = GEOM::GEOM_Object::_narrow(obj);
+ }
+ if ( !aGeomObj->_is_nil() )
+ S = smeshGen_i->GeomObjectToShape( aGeomObj.in() );
+ return S;
+}
+
//=======================================================================
//function : findShape
//purpose :
// }
+//=======================================================================
+//function : updateMeshGroups
+//purpose : Update or create groups in mesh
+//=======================================================================
+
+static void updateMeshGroups(SMESH_Mesh* theMesh,
+ const SMDS_MeshElement* anElem,
+ std::string groupName)
+{
+ bool groupDone = false;
+ SMESH_Mesh::GroupIteratorPtr grIt = theMesh->GetGroups();
+ while (grIt->more()) {
+ SMESH_Group * group = grIt->next();
+ if ( !group ) continue;
+ MESSAGE("Group: " << group->GetName());
+ SMESHDS_GroupBase* groupDS = group->GetGroupDS();
+ if ( !groupDS ) continue;
+ MESSAGE("group->SMDSGroup().GetType(): " << (groupDS->GetType()));
+ MESSAGE("group->SMDSGroup().GetType()==anElem->GetType(): " << (groupDS->GetType()==anElem->GetType()));
+ MESSAGE("currentEnfVertex->grpName.compare(group->GetStoreName())==0: " << (groupName.compare(group->GetName())==0));
+ if ( groupDS->GetType()==anElem->GetType() && groupName.compare(group->GetName())==0) {
+ SMESHDS_Group* aGroupDS = static_cast<SMESHDS_Group*>( groupDS );
+ aGroupDS->SMDSGroup().Add(anElem);
+ MESSAGE("Elem ID added in group: " << anElem->GetID());
+ groupDone = true;
+ MESSAGE("Successfully added enforced element to existing group " << groupName);
+ break;
+ }
+ }
+ if (!groupDone)
+ {
+ int groupId;
+ SMESH_Group* aGroup = theMesh->AddGroup(anElem->GetType(), groupName.c_str(), groupId);
+ aGroup->SetName( groupName.c_str() );
+ SMESHDS_Group* aGroupDS = static_cast<SMESHDS_Group*>( aGroup->GetGroupDS() );
+ aGroupDS->SMDSGroup().Add(anElem);
+ MESSAGE("Successfully created enforced vertex group " << groupName);
+ groupDone = true;
+ }
+ if (!groupDone)
+ throw SALOME_Exception(LOCALIZED("A enforced vertex node was not added to a group"));
+}
+
//=======================================================================
//function : readGMFFile
//purpose : read GMF file w/o geometry associated to mesh
//=======================================================================
-
static bool readGMFFile(const char* theFile,
#ifdef WITH_SMESH_CANCEL_COMPUTE
GHS3DPlugin_GHS3D* theAlgo,
SMESH_MesherHelper* theHelper,
TopoDS_Shape theSolid,
vector <const SMDS_MeshNode*> & theNodeByGhs3dId,
- map<const SMDS_MeshNode*,int> & theNodeToGhs3dIdMap)
+ map<const SMDS_MeshNode*,int> & theNodeToGhs3dIdMap,
+ std::map<std::vector<double>, std::string> & enfVerticesWithGroup,
+ std::vector<std::string> & anEdgeGroupByGhs3dId,
+ std::vector<std::string> & aFaceGroupByGhs3dId)
{
SMESHDS_Mesh* theMeshDS = theHelper->GetMeshDS();
int nbElem = 0, nbRef = 0;
int aGMFNodeID = 0, shapeID;
int *nodeAssigne;
- SMDS_MeshNode** GMFNode;
+ const SMDS_MeshNode** GMFNode;
std::map <GmfKwdCod,int> tabRef;
tabRef[GmfVertices] = 3; // for new nodes and enforced nodes
elemSearcher = SMESH_MeshEditor( theHelper->GetMesh() ).GetElementSearcher();
int nbVertices = GmfStatKwd(InpMsh, GmfVertices) - nbInitialNodes;
- GMFNode = new SMDS_MeshNode*[ nbVertices + 1 ];
+ GMFNode = new const SMDS_MeshNode*[ nbVertices + 1 ];
nodeAssigne = new int[ nbVertices + 1 ];
std::map <GmfKwdCod,int>::const_iterator it = tabRef.begin();
else
continue;
- vector<int> id (nbElem*tabRef[token]); // node ids
+ std::vector<int> id (nbElem*tabRef[token]); // node ids
if (token == GmfVertices) {
std::cout << " vertices" << std::endl;
float VerTab_f[nbElem][3];
double VerTab_d[nbElem][3];
- SMDS_MeshNode * aGMFNode;
+ double x, y, z;
+ std::vector<double> coords;
+ const SMDS_MeshNode * aGMFNode;
shapeID = theMeshDS->ShapeToIndex( theSolid );
for ( int iElem = 0; iElem < nbElem; iElem++ ) {
return false;
}
#endif
- if (iElem >= nbInitialNodes)
- aGMFID = iElem -nbInitialNodes +1;
+ coords.clear();
if (ver == GmfFloat) {
GmfGetLin(InpMsh, token, &VerTab_f[nbElem][0], &VerTab_f[nbElem][1], &VerTab_f[nbElem][2], &dummy);
- if (iElem >= nbInitialNodes)
- {
- if ( elemSearcher &&
- elemSearcher->FindElementsByPoint( gp_Pnt(VerTab_f[nbElem][0],
- VerTab_f[nbElem][1],
- VerTab_f[nbElem][2]),
- SMDSAbs_Volume, foundVolumes ))
- aGMFNode = 0;
- else
- aGMFNode = theMeshDS->AddNode(VerTab_f[nbElem][0],
- VerTab_f[nbElem][1],
- VerTab_f[nbElem][2]);
- }
+ x = (double) VerTab_f[nbElem][0];
+ y = (double) VerTab_f[nbElem][1];
+ z = (double) VerTab_f[nbElem][2];
}
else {
GmfGetLin(InpMsh, token, &VerTab_d[nbElem][0], &VerTab_d[nbElem][1], &VerTab_d[nbElem][2], &dummy);
- if (iElem >= nbInitialNodes)
- {
- if ( elemSearcher &&
- elemSearcher->FindElementsByPoint( gp_Pnt(VerTab_d[nbElem][0],
- VerTab_d[nbElem][1],
- VerTab_d[nbElem][2]),
- SMDSAbs_Volume, foundVolumes ))
- aGMFNode = 0;
- else
- aGMFNode = theMeshDS->AddNode(VerTab_d[nbElem][0],
- VerTab_d[nbElem][1],
- VerTab_d[nbElem][2]);
- }
+ x = VerTab_d[nbElem][0];
+ y = VerTab_d[nbElem][1];
+ z = VerTab_d[nbElem][2];
}
if (iElem >= nbInitialNodes) {
+ if ( elemSearcher &&
+ elemSearcher->FindElementsByPoint( gp_Pnt(x, y, z), SMDSAbs_Node, foundVolumes ))
+ aGMFNode = 0;
+ else
+ aGMFNode = theHelper->AddNode(x, y, z);
+
+ aGMFID = iElem -nbInitialNodes +1;
GMFNode[ aGMFID ] = aGMFNode;
nodeAssigne[ aGMFID ] = 0;
+ coords.push_back(x);
+ coords.push_back(y);
+ coords.push_back(z);
+ if (enfVerticesWithGroup.find(coords) != enfVerticesWithGroup.end())
+ updateMeshGroups(theHelper->GetMesh(), aGMFNode, enfVerticesWithGroup[coords]);
}
}
}
std::vector< const SMDS_MeshNode* > node( nbRef );
std::vector< int > nodeID( nbRef );
std::vector< SMDS_MeshNode* > enfNode( nbRef );
+ const SMDS_MeshElement* aCreatedElem;
for ( int iElem = 0; iElem < nbElem; iElem++ )
{
switch (token)
{
case GmfEdges:
- if (fullyCreatedElement)
- theHelper->AddEdge( node[0], node[1], /*id =*/0, /*force3d =*/false );
+ if (fullyCreatedElement) {
+ aCreatedElem = theHelper->AddEdge( node[0], node[1], /*id =*/0, /*force3d =*/false );
+ updateMeshGroups(theHelper->GetMesh(), aCreatedElem, anEdgeGroupByGhs3dId[iElem]);
+ }
break;
case GmfTriangles:
if (fullyCreatedElement) {
- theHelper->AddFace( node[0], node[1], node[2], /*id =*/0, /*force3d =*/false );
+ aCreatedElem = theHelper->AddFace( node[0], node[1], node[2], /*id =*/0, /*force3d =*/false );
for ( int iRef = 0; iRef < nbRef; iRef++ )
nodeAssigne[ nodeID[ iRef ]] = 1;
+ updateMeshGroups(theHelper->GetMesh(), aCreatedElem, aFaceGroupByGhs3dId[iElem]);
}
break;
case GmfQuadrilaterals:
const char* theSolFileName,
const SMESH_ProxyMesh& theProxyMesh,
SMESH_Mesh * theMesh,
- vector <const SMDS_MeshNode*> & theNodeByGhs3dId,
- vector <const SMDS_MeshNode*> & theEnforcedNodeByGhs3dId,
- map<const SMDS_MeshNode*,int> & aNodeToGhs3dIdMap,
- TIDSortedNodeSet & theEnforcedNodes,
- TIDSortedElemSet & theEnforcedEdges,
- TIDSortedElemSet & theEnforcedTriangles,
-// TIDSortedElemSet & theEnforcedQuadrangles,
+ std::vector <const SMDS_MeshNode*> & theNodeByGhs3dId,
+ std::vector <const SMDS_MeshNode*> & theEnforcedNodeByGhs3dId,
+ std::map<const SMDS_MeshNode*,int> & aNodeToGhs3dIdMap,
+ std::vector<std::string> & anEdgeGroupByGhs3dId,
+ std::vector<std::string> & aFaceGroupByGhs3dId,
+ GHS3DPlugin_Hypothesis::TIDSortedNodeGroupMap & theEnforcedNodes,
+ GHS3DPlugin_Hypothesis::TIDSortedElemGroupMap & theEnforcedEdges,
+ GHS3DPlugin_Hypothesis::TIDSortedElemGroupMap & theEnforcedTriangles,
GHS3DPlugin_Hypothesis::TGHS3DEnforcedVertexCoordsValues & theEnforcedVertices)
{
MESSAGE("writeGMFFile w/o geometry");
// TIDSortedElemSet aQuadElemSet, aQuadEnforcedEdgeSet, aQuadEnforcedTriangleSet, aQuadEnforcedQuadrangleSet;
SMDS_ElemIteratorPtr nodeIt;
map<const SMDS_MeshNode*,int> /*aNodeToGhs3dIdMap,*/ anEnforcedNodeToGhs3dIdMap;
- TIDSortedElemSet::iterator elemIt;
+ GHS3DPlugin_Hypothesis::TIDSortedElemGroupMap::iterator elemIt;
+ TIDSortedElemSet::iterator elemSetIt;
bool isOK;
auto_ptr< SMESH_ElementSearcher > pntCls ( SMESH_MeshEditor( theMesh ).GetElementSearcher());
// Iterate over the enforced edges
for(elemIt = theEnforcedEdges.begin() ; elemIt != theEnforcedEdges.end() ; ++elemIt) {
- elem = (*elemIt);
+ elem = elemIt->first;
isOK = true;
nodeIt = elem->nodesIterator();
nbNodes = 2;
// Iterate over the enforced triangles
for(elemIt = theEnforcedTriangles.begin() ; elemIt != theEnforcedTriangles.end() ; ++elemIt) {
- elem = (*elemIt);
+ elem = elemIt->first;
isOK = true;
nodeIt = elem->nodesIterator();
nbNodes = 3;
}
// Iterate over the enforced nodes
- TIDSortedNodeSet::const_iterator enfNodeIt;
+ GHS3DPlugin_Hypothesis::TIDSortedNodeGroupMap::const_iterator enfNodeIt;
std::cout << theEnforcedNodes.size() << " nodes from enforced nodes ..." << std::endl;
for(enfNodeIt = theEnforcedNodes.begin() ; enfNodeIt != theEnforcedNodes.end() ; ++enfNodeIt)
{
- const SMDS_MeshNode* node = *enfNodeIt;
+ const SMDS_MeshNode* node = enfNodeIt->first;
std::vector<double> coords;
coords.push_back(node->X());
coords.push_back(node->Y());
// GHS3D does not accept quadratic elements in input mesh file (Ghs3d 4.2)
int nedge[2], ntri[3]/*, nquad[4]*/ /*, nedgeP2[3], ntriP2[6], nquadQ2[9]*/;
+
// GmfEdges
int usedEnforcedEdges = 0;
if (theKeptEnforcedEdges.size()) {
+ anEdgeGroupByGhs3dId.resize( theKeptEnforcedEdges.size() );
// idxRequired = GmfOpenMesh(theRequiredFileName, GmfWrite, GMFVERSION, GMFDIMENSION);
// if (!idxRequired)
// return false;
GmfSetKwd(idx, GmfEdges, theKeptEnforcedEdges.size());
// GmfSetKwd(idxRequired, GmfEdges, theKeptEnforcedEdges.size());
- for(elemIt = theKeptEnforcedEdges.begin() ; elemIt != theKeptEnforcedEdges.end() ; ++elemIt) {
- elem = (*elemIt);
+ for(elemSetIt = theKeptEnforcedEdges.begin() ; elemSetIt != theKeptEnforcedEdges.end() ; ++elemSetIt) {
+ elem = (*elemSetIt);
nodeIt = elem->nodesIterator();
int index=0;
while ( nodeIt->more() ) {
index++;
}
GmfSetLin(idx, GmfEdges, nedge[0], nedge[1], dummyint);
+ anEdgeGroupByGhs3dId[usedEnforcedEdges] = theEnforcedEdges.find(elem)->second;
// GmfSetLin(idxRequired, GmfEdges, nedge[0], nedge[1], dummyint);
usedEnforcedEdges++;
}
// GmfTriangles
int usedEnforcedTriangles = 0;
if (anElemSet.size()+theKeptEnforcedTriangles.size()) {
+ aFaceGroupByGhs3dId.resize( anElemSet.size()+theKeptEnforcedTriangles.size() );
GmfSetKwd(idx, GmfTriangles, anElemSet.size()+theKeptEnforcedTriangles.size());
- for(elemIt = anElemSet.begin() ; elemIt != anElemSet.end() ; ++elemIt) {
- elem = (*elemIt);
+ int k=0;
+ for(elemSetIt = anElemSet.begin() ; elemSetIt != anElemSet.end() ; ++elemSetIt,++k) {
+ elem = (*elemSetIt);
nodeIt = elem->nodesIterator();
int index=0;
for ( int j = 0; j < 3; ++j ) {
index++;
}
GmfSetLin(idx, GmfTriangles, ntri[0], ntri[1], ntri[2], dummyint);
+ aFaceGroupByGhs3dId[k] = "";
}
if (theKeptEnforcedTriangles.size()) {
- for(elemIt = theKeptEnforcedTriangles.begin() ; elemIt != theKeptEnforcedTriangles.end() ; ++elemIt) {
- elem = (*elemIt);
+ for(elemSetIt = theKeptEnforcedTriangles.begin() ; elemSetIt != theKeptEnforcedTriangles.end() ; ++elemSetIt,++k) {
+ elem = (*elemSetIt);
nodeIt = elem->nodesIterator();
int index=0;
for ( int j = 0; j < 3; ++j ) {
index++;
}
GmfSetLin(idx, GmfTriangles, ntri[0], ntri[1], ntri[2], dummyint);
+ aFaceGroupByGhs3dId[k] = theEnforcedTriangles.find(elem)->second;
usedEnforcedTriangles++;
}
}
//purpose :
//=======================================================================
-static bool writeFaces (ofstream & theFile,
- const SMESH_ProxyMesh& theMesh,
- const TopoDS_Shape& theShape,
- const map <int,int> & theSmdsToGhs3dIdMap,
- const map <int,int> & theEnforcedNodeIdToGhs3dIdMap,
- TIDSortedElemSet & theEnforcedEdges,
- TIDSortedElemSet & theEnforcedTriangles)
+static bool writeFaces (ofstream & theFile,
+ const SMESH_ProxyMesh& theMesh,
+ const TopoDS_Shape& theShape,
+ const map <int,int> & theSmdsToGhs3dIdMap,
+ const map <int,int> & theEnforcedNodeIdToGhs3dIdMap,
+ GHS3DPlugin_Hypothesis::TIDSortedElemGroupMap & theEnforcedEdges,
+ GHS3DPlugin_Hypothesis::TIDSortedElemGroupMap & theEnforcedTriangles)
{
// record structure:
//
map <int,const SMDS_MeshNode*> & theGhs3dIdToNodeMap,
GHS3DPlugin_Hypothesis::TID2SizeMap & theNodeIDToSizeMap,
GHS3DPlugin_Hypothesis::TGHS3DEnforcedVertexCoordsValues & theEnforcedVertices,
- TIDSortedNodeSet & theEnforcedNodes,
- TIDSortedElemSet & theEnforcedEdges,
- TIDSortedElemSet & theEnforcedTriangles)
+ GHS3DPlugin_Hypothesis::TIDSortedNodeGroupMap & theEnforcedNodes,
+ GHS3DPlugin_Hypothesis::TIDSortedElemGroupMap & theEnforcedEdges,
+ GHS3DPlugin_Hypothesis::TIDSortedElemGroupMap & theEnforcedTriangles)
{
// record structure:
//
// Iterate over the enforced nodes
std::map<int,double> enfVertexIndexSizeMap;
if (nbEnforcedNodes) {
- TIDSortedNodeSet::const_iterator nodeIt = theEnforcedNodes.begin();
+ GHS3DPlugin_Hypothesis::TIDSortedNodeGroupMap::const_iterator nodeIt = theEnforcedNodes.begin();
for( ; nodeIt != theEnforcedNodes.end() ; ++nodeIt) {
- double x = (*nodeIt)->X();
- double y = (*nodeIt)->Y();
- double z = (*nodeIt)->Z();
+ double x = nodeIt->first->X();
+ double y = nodeIt->first->Y();
+ double z = nodeIt->first->Z();
// Test if point is inside shape to mesh
gp_Pnt myPoint(x,y,z);
BRepClass3d_SolidClassifier scl(shapeToMesh);
if (theEnforcedVertices.find(coords) != theEnforcedVertices.end())
continue;
- double size = theNodeIDToSizeMap.find((*nodeIt)->GetID())->second;
+ double size = theNodeIDToSizeMap.find(nodeIt->first->GetID())->second;
// theGhs3dIdToNodeMap.insert( make_pair( nbNodes + i, (*nodeIt) ));
// MESSAGE("Adding enforced node (" << x << "," << y <<"," << z << ")");
// X Y Z PHY_SIZE DUMMY_INT
<< size << space
<< dummyint << space;
theFile << std::endl;
- theEnforcedNodeIdToGhs3dIdMap.insert( make_pair( (*nodeIt)->GetID(), aGhs3dID ));
+ theEnforcedNodeIdToGhs3dIdMap.insert( make_pair( nodeIt->first->GetID(), aGhs3dID ));
enfVertexIndexSizeMap[aGhs3dID] = -1;
aGhs3dID++;
// else
bool toMeshHoles,
int nbEnforcedVertices,
int nbEnforcedNodes,
- TIDSortedElemSet & theEnforcedEdges,
- TIDSortedElemSet & theEnforcedTriangles)
+ GHS3DPlugin_Hypothesis::TIDSortedElemGroupMap & theEnforcedEdges,
+ GHS3DPlugin_Hypothesis::TIDSortedElemGroupMap & theEnforcedTriangles)
{
MESSAGE("GHS3DPlugin_GHS3D::readResultFile()");
Kernel_Utils::Localizer loc;
}
// Add enforced elements
- TIDSortedElemSet::const_iterator elemIt;
+ GHS3DPlugin_Hypothesis::TIDSortedElemGroupMap::const_iterator elemIt;
const SMDS_MeshElement* anElem;
SMDS_ElemIteratorPtr itOnEnfElem;
map<int,int>::const_iterator itOnMap;
std::vector< const SMDS_MeshNode* > node( 2 );
// Iterate over the enforced edges
for(elemIt = theEnforcedEdges.begin() ; elemIt != theEnforcedEdges.end() ; ++elemIt) {
- anElem = (*elemIt);
+ anElem = elemIt->first;
bool addElem = true;
itOnEnfElem = anElem->nodesIterator();
for ( int j = 0; j < 2; ++j ) {
std::vector< const SMDS_MeshNode* > node( 3 );
// Iterate over the enforced triangles
for(elemIt = theEnforcedTriangles.begin() ; elemIt != theEnforcedTriangles.end() ; ++elemIt) {
- anElem = (*elemIt);
+ anElem = elemIt->first;
bool addElem = true;
itOnEnfElem = anElem->nodesIterator();
for ( int j = 0; j < 3; ++j ) {
std::map <int,int> aNodeId2NodeIndexMap, aSmdsToGhs3dIdMap, anEnforcedNodeIdToGhs3dIdMap;
std::map <int,const SMDS_MeshNode*> aGhs3dIdToNodeMap;
std::map <int, int> nodeID2nodeIndexMap;
- GHS3DPlugin_Hypothesis::TGHS3DEnforcedVertexCoordsValues enforcedVertices = GHS3DPlugin_Hypothesis::GetEnforcedVerticesCoordsSize(_hyp);
- TIDSortedNodeSet enforcedNodes = GHS3DPlugin_Hypothesis::GetEnforcedNodes(_hyp);
- TIDSortedElemSet enforcedEdges = GHS3DPlugin_Hypothesis::GetEnforcedEdges(_hyp);
- TIDSortedElemSet enforcedTriangles = GHS3DPlugin_Hypothesis::GetEnforcedTriangles(_hyp);
+ GHS3DPlugin_Hypothesis::TGHS3DEnforcedVertexCoordsValues coordsSizeMap = GHS3DPlugin_Hypothesis::GetEnforcedVerticesCoordsSize(_hyp);
+ GHS3DPlugin_Hypothesis::TIDSortedNodeGroupMap enforcedNodes = GHS3DPlugin_Hypothesis::GetEnforcedNodes(_hyp);
+ GHS3DPlugin_Hypothesis::TIDSortedElemGroupMap enforcedEdges = GHS3DPlugin_Hypothesis::GetEnforcedEdges(_hyp);
+ GHS3DPlugin_Hypothesis::TIDSortedElemGroupMap enforcedTriangles = GHS3DPlugin_Hypothesis::GetEnforcedTriangles(_hyp);
// TIDSortedElemSet enforcedQuadrangles = GHS3DPlugin_Hypothesis::GetEnforcedQuadrangles(_hyp);
GHS3DPlugin_Hypothesis::TID2SizeMap nodeIDToSizeMap = GHS3DPlugin_Hypothesis::GetNodeIDToSizeMap(_hyp);
- int nbEnforcedVertices = enforcedVertices.size();
+ int nbEnforcedVertices = coordsSizeMap.size();
int nbEnforcedNodes = enforcedNodes.size();
std::cout << nbEnforcedNodes << " enforced nodes from hypo" << std::endl;
std::cout << nbEnforcedVertices << " enforced vertices from hypo" << std::endl;
Ok = (writePoints( aPointsFile, helper,
aSmdsToGhs3dIdMap, anEnforcedNodeIdToGhs3dIdMap, aGhs3dIdToNodeMap,
nodeIDToSizeMap,
- enforcedVertices, enforcedNodes, enforcedEdges, enforcedTriangles)
+ coordsSizeMap, enforcedNodes, enforcedEdges, enforcedTriangles)
&&
writeFaces ( aFacesFile, *proxyMesh, theShape,
aSmdsToGhs3dIdMap, anEnforcedNodeIdToGhs3dIdMap,
// helper, *proxyMesh,
// aNodeId2NodeIndexMap, aSmdsToGhs3dIdMap, aGhs3dIdToNodeMap,
// enforcedNodes, enforcedEdges, enforcedTriangles, /*enforcedQuadrangles,*/
-// enforcedVertices);
+// coordsSizeMap);
}
// Write aSmdsToGhs3dIdMap to temp file
#endif
std::map <int, int> nodeID2nodeIndexMap;
- GHS3DPlugin_Hypothesis::TGHS3DEnforcedVertexCoordsValues enforcedVertices = GHS3DPlugin_Hypothesis::GetEnforcedVerticesCoordsSize(_hyp);
- TIDSortedNodeSet enforcedNodes = GHS3DPlugin_Hypothesis::GetEnforcedNodes(_hyp);
- TIDSortedElemSet enforcedEdges = GHS3DPlugin_Hypothesis::GetEnforcedEdges(_hyp);
- TIDSortedElemSet enforcedTriangles = GHS3DPlugin_Hypothesis::GetEnforcedTriangles(_hyp);
+ std::map<std::vector<double>, std::string> enfVerticesWithGroup;
+ GHS3DPlugin_Hypothesis::TGHS3DEnforcedVertexCoordsValues coordsSizeMap;
+ TopoDS_Shape GeomShape;
+ TopAbs_ShapeEnum GeomType;
+ std::vector<double> coords;
+ gp_Pnt aPnt;
+ GHS3DPlugin_Hypothesis::TGHS3DEnforcedVertex* enfVertex;
+
+ GHS3DPlugin_Hypothesis::TGHS3DEnforcedVertexList enfVertices = GHS3DPlugin_Hypothesis::GetEnforcedVertices(_hyp);
+ GHS3DPlugin_Hypothesis::TGHS3DEnforcedVertexList::const_iterator enfVerIt = enfVertices.begin();
+ for ( ; enfVerIt != enfVertices.end() ; ++enfVerIt)
+ {
+ enfVertex = (*enfVerIt);
+ if (enfVertex->geomEntry.empty() && enfVertex->coords.size()) {
+ coordsSizeMap.insert(make_pair(enfVertex->coords,enfVertex->size));
+ enfVerticesWithGroup.insert(make_pair(coords,enfVertex->groupName));
+ }
+ if (!enfVertex->geomEntry.empty()) {
+ GeomShape = entryToShape(enfVertex->geomEntry);
+ GeomType = GeomShape.ShapeType();
+
+ if (GeomType == TopAbs_VERTEX) {
+ coords.clear();
+ aPnt = BRep_Tool::Pnt(TopoDS::Vertex(GeomShape));
+ coords.push_back(aPnt.X());
+ coords.push_back(aPnt.Y());
+ coords.push_back(aPnt.Z());
+ if (coordsSizeMap.find(coords) == coordsSizeMap.end()) {
+ coordsSizeMap.insert(make_pair(coords,enfVertex->size));
+ enfVerticesWithGroup.insert(make_pair(coords,enfVertex->groupName));
+ }
+ }
+
+ // Group Management
+ if (GeomType == TopAbs_COMPOUND){
+ for (TopoDS_Iterator it (GeomShape); it.More(); it.Next()){
+ coords.clear();
+ if (it.Value().ShapeType() == TopAbs_VERTEX){
+ aPnt = BRep_Tool::Pnt(TopoDS::Vertex(it.Value()));
+ coords.push_back(aPnt.X());
+ coords.push_back(aPnt.Y());
+ coords.push_back(aPnt.Z());
+ if (coordsSizeMap.find(coords) == coordsSizeMap.end()) {
+ coordsSizeMap.insert(make_pair(coords,enfVertex->size));
+ enfVerticesWithGroup.insert(make_pair(coords,enfVertex->groupName));
+ }
+ }
+ }
+ }
+ }
+ }
+
+ const SMDS_MeshNode* enfNode;
+ GHS3DPlugin_Hypothesis::TIDSortedNodeGroupMap enforcedNodes = GHS3DPlugin_Hypothesis::GetEnforcedNodes(_hyp);
+ GHS3DPlugin_Hypothesis::TIDSortedNodeGroupMap::const_iterator enfNodeIt = enforcedNodes.begin();
+ for ( ; enfNodeIt != enforcedNodes.end() ; ++enfNodeIt)
+ {
+ enfNode = enfNodeIt->first;
+ coords.clear();
+ coords.push_back(enfNode->X());
+ coords.push_back(enfNode->Y());
+ coords.push_back(enfNode->Z());
+ if (enfVerticesWithGroup.find(coords) == enfVerticesWithGroup.end())
+ enfVerticesWithGroup.insert(make_pair(coords,enfNodeIt->second));
+ }
+
+
+ GHS3DPlugin_Hypothesis::TIDSortedElemGroupMap enforcedEdges = GHS3DPlugin_Hypothesis::GetEnforcedEdges(_hyp);
+ GHS3DPlugin_Hypothesis::TIDSortedElemGroupMap enforcedTriangles = GHS3DPlugin_Hypothesis::GetEnforcedTriangles(_hyp);
// TIDSortedElemSet enforcedQuadrangles = GHS3DPlugin_Hypothesis::GetEnforcedQuadrangles(_hyp);
GHS3DPlugin_Hypothesis::TID2SizeMap nodeIDToSizeMap = GHS3DPlugin_Hypothesis::GetNodeIDToSizeMap(_hyp);
- int nbEnforcedVertices = enforcedVertices.size();
+ int nbEnforcedVertices = coordsSizeMap.size();
int nbEnforcedNodes = enforcedNodes.size();
std::cout << nbEnforcedNodes << " enforced nodes from hypo" << std::endl;
std::cout << nbEnforcedVertices << " enforced vertices from hypo" << std::endl;
- vector <const SMDS_MeshNode*> aNodeByGhs3dId, anEnforcedNodeByGhs3dId;
- map<const SMDS_MeshNode*,int> aNodeToGhs3dIdMap;
+ std::vector <const SMDS_MeshNode*> aNodeByGhs3dId, anEnforcedNodeByGhs3dId;
+ std::map<const SMDS_MeshNode*,int> aNodeToGhs3dIdMap;
+ std::vector<std::string> anEdgeGroupByGhs3dId, aFaceGroupByGhs3dId;
{
SMESH_ProxyMesh::Ptr proxyMesh( new SMESH_ProxyMesh( theMesh ));
if ( theMesh.NbQuadrangles() > 0 )
Ok = writeGMFFile(aGMFFileName.ToCString(), aRequiredVerticesFileName.ToCString(), aSolFileName.ToCString(),
*proxyMesh, &theMesh,
- aNodeByGhs3dId, anEnforcedNodeByGhs3dId, aNodeToGhs3dIdMap,
+ aNodeByGhs3dId, anEnforcedNodeByGhs3dId, aNodeToGhs3dIdMap, anEdgeGroupByGhs3dId, aFaceGroupByGhs3dId,
enforcedNodes, enforcedEdges, enforcedTriangles, /*enforcedQuadrangles,*/
- enforcedVertices);
+ coordsSizeMap);
}
// -----------------
#ifdef WITH_SMESH_CANCEL_COMPUTE
this,
#endif
- theHelper, theShape, aNodeByGhs3dId, aNodeToGhs3dIdMap);
+ theHelper, theShape, aNodeByGhs3dId, aNodeToGhs3dIdMap,
+ enfVerticesWithGroup, anEdgeGroupByGhs3dId, aFaceGroupByGhs3dId);
// ---------------------
// remove working files
{
SMESH_MesherHelper* helper = new SMESH_MesherHelper(theMesh );
// TopoDS_Shape theShape = theMesh.GetShapeToMesh();
- vector <const SMDS_MeshNode*> dummyNodeVector;
- map<const SMDS_MeshNode*,int> dummyNodeMap;
+ std::vector <const SMDS_MeshNode*> dummyNodeVector;
+ std::map<const SMDS_MeshNode*,int> dummyNodeMap;
+ std::map<std::vector<double>, std::string> dummyEnfVertGroup;
+ std::vector<std::string> dummyElemGroup1, dummyElemGroup2;
+
bool ok = readGMFFile(theGMFFileName,
#ifdef WITH_SMESH_CANCEL_COMPUTE
this,
#endif
- helper, theMesh.GetShapeToMesh(), dummyNodeVector, dummyNodeMap);
+ helper, theMesh.GetShapeToMesh(), dummyNodeVector, dummyNodeMap, dummyEnfVertGroup, dummyElemGroup1, dummyElemGroup2);
theMesh.GetMeshDS()->Modified();
return ok;
}
_enfVertexEntrySizeList(DefaultGHS3DEnforcedVertexEntryValues()),
_coordsEnfVertexMap(DefaultCoordsGHS3DEnforcedVertexMap()),
_geomEntryEnfVertexMap(DefaultGeomEntryGHS3DEnforcedVertexMap()),
- _enfNodes(DefaultIDSortedNodeSet()),
- _enfEdges(DefaultIDSortedElemSet()),
- _enfTriangles(DefaultIDSortedElemSet()),
+ _enfNodes(TIDSortedNodeGroupMap()),
+ _enfEdges(TIDSortedElemGroupMap()),
+ _enfTriangles(TIDSortedElemGroupMap()),
_nodeIDToSizeMap(DefaultID2SizeMap()),
_elementIDToSizeMap(DefaultID2SizeMap())
{
//=======================================================================
//function : SetEnforcedMesh
//=======================================================================
-bool GHS3DPlugin_Hypothesis::SetEnforcedMesh(SMESH_Mesh& theMesh, SMESH::ElementType elementType, double size)
+bool GHS3DPlugin_Hypothesis::SetEnforcedMesh(SMESH_Mesh& theMesh, SMESH::ElementType elementType, double size, std::string groupName)
{
TIDSortedElemSet theElemSet;
SMDS_ElemIteratorPtr eIt;
while ( eIt->more() )
theElemSet.insert( eIt->next() );
MESSAGE("Add "<<theElemSet.size()<<" types["<<elementType<<"] from source mesh");
- return SetEnforcedElements( theElemSet, elementType, size);
+ return SetEnforcedElements( theElemSet, elementType, size, groupName);
}
//=======================================================================
//function : SetEnforcedElements
//=======================================================================
-bool GHS3DPlugin_Hypothesis::SetEnforcedElements(TIDSortedElemSet theElemSet, SMESH::ElementType elementType, double size)
+bool GHS3DPlugin_Hypothesis::SetEnforcedElements(TIDSortedElemSet theElemSet, SMESH::ElementType elementType, double size, std::string groupName)
{
MESSAGE("GHS3DPlugin_Hypothesis::SetEnforcedElements");
TIDSortedElemSet::const_iterator it = theElemSet.begin();
case SMESH::NODE:
node = dynamic_cast<const SMDS_MeshNode*>(elem);
if (node) {
- _enfNodes.insert(node);
+ _enfNodes.insert(make_pair(node,groupName));
_nodeIDToSizeMap.insert(make_pair(node->GetID(), size));
added = true;
}
else {
- _enfNodes.insert(elem->begin_nodes(),elem->end_nodes());
+// _enfNodes.insert(elem->begin_nodes(),elem->end_nodes());
SMDS_ElemIteratorPtr nodeIt = elem->nodesIterator();
- for (;nodeIt->more();)
- _nodeIDToSizeMap.insert(make_pair(nodeIt->next()->GetID(), size));
+ for (;nodeIt->more();) {
+ node = dynamic_cast<const SMDS_MeshNode*>(nodeIt->next());
+ _enfNodes.insert(make_pair(node,groupName));
+ _nodeIDToSizeMap.insert(make_pair(node->GetID(), size));
+ }
added = true;
}
break;
case SMESH::EDGE:
if (elem->GetType() == SMDSAbs_Edge) {
- _enfEdges.insert(elem);
+ _enfEdges.insert(make_pair(elem,groupName));
_elementIDToSizeMap.insert(make_pair(elem->GetID(), size));
added = true;
}
SMDS_ElemIteratorPtr it = elem->edgesIterator();
for (;it->more();) {
const SMDS_MeshElement* anEdge = it->next();
- _enfEdges.insert(anEdge);
+ _enfEdges.insert(make_pair(anEdge,groupName));
_elementIDToSizeMap.insert(make_pair(anEdge->GetID(), size));
}
added = true;
if (elem->GetType() == SMDSAbs_Face)
{
if (elem->NbCornerNodes() == 3) {
- _enfTriangles.insert(elem);
+ _enfTriangles.insert(make_pair(elem,groupName));
_elementIDToSizeMap.insert(make_pair(elem->GetID(), size));
added = true;
}
for (;it->more();) {
const SMDS_MeshElement* aFace = it->next();
if (aFace->NbCornerNodes() == 3) {
- _enfTriangles.insert(aFace);
+ _enfTriangles.insert(make_pair(aFace,groupName));
_elementIDToSizeMap.insert(make_pair(aFace->GetID(), size));
added = true;
}
return false;
}
-//=======================================================================
-//function : DefaultIDSortedNodeSet
-//=======================================================================
-
-TIDSortedNodeSet GHS3DPlugin_Hypothesis::DefaultIDSortedNodeSet()
-{
- return TIDSortedNodeSet();
-}
-
-//=======================================================================
-//function : DefaultIDSortedElemSet
-//=======================================================================
-
-TIDSortedElemSet GHS3DPlugin_Hypothesis::DefaultIDSortedElemSet()
-{
- return TIDSortedElemSet();
-}
-
//=======================================================================
//function : DefaultID2SizeMap
//=======================================================================
std::string GHS3DPlugin_Hypothesis::CommandToRun(const GHS3DPlugin_Hypothesis* hyp,
const bool hasShapeToMesh)
{
- TCollection_AsciiString cmd( "ghs3d" ); // ghs3dV4.1_32bits (to permit the .mesh output)
+ TCollection_AsciiString cmd;
+ if (hasShapeToMesh)
+ cmd = "ghs3d-41"; // to use old mesh2 format
+ else
+ cmd = "ghs3d"; // to use new mesh format
// check if any option is overridden by hyp->myTextOption
bool m = hyp ? ( hyp->myTextOption.find("-m") == std::string::npos ) : true;
bool M = hyp ? ( hyp->myTextOption.find("-M") == std::string::npos ) : true;
return hyp ? hyp->_GetEnforcedVerticesByEntry(): DefaultGeomEntryGHS3DEnforcedVertexMap();
}
-TIDSortedNodeSet GHS3DPlugin_Hypothesis::GetEnforcedNodes(const GHS3DPlugin_Hypothesis* hyp)
+GHS3DPlugin_Hypothesis::TIDSortedNodeGroupMap GHS3DPlugin_Hypothesis::GetEnforcedNodes(const GHS3DPlugin_Hypothesis* hyp)
{
- return hyp ? hyp->_GetEnforcedNodes():DefaultIDSortedNodeSet();
+ return hyp ? hyp->_GetEnforcedNodes():DefaultIDSortedNodeGroupMap();
}
-TIDSortedElemSet GHS3DPlugin_Hypothesis::GetEnforcedEdges(const GHS3DPlugin_Hypothesis* hyp)
+GHS3DPlugin_Hypothesis::TIDSortedElemGroupMap GHS3DPlugin_Hypothesis::GetEnforcedEdges(const GHS3DPlugin_Hypothesis* hyp)
{
- return hyp ? hyp->_GetEnforcedEdges():DefaultIDSortedElemSet();
+ return hyp ? hyp->_GetEnforcedEdges():DefaultIDSortedElemGroupMap();
}
-TIDSortedElemSet GHS3DPlugin_Hypothesis::GetEnforcedTriangles(const GHS3DPlugin_Hypothesis* hyp)
+GHS3DPlugin_Hypothesis::TIDSortedElemGroupMap GHS3DPlugin_Hypothesis::GetEnforcedTriangles(const GHS3DPlugin_Hypothesis* hyp)
{
- return hyp ? hyp->_GetEnforcedTriangles():DefaultIDSortedElemSet();
+ return hyp ? hyp->_GetEnforcedTriangles():DefaultIDSortedElemGroupMap();
}
GHS3DPlugin_Hypothesis::TID2SizeMap GHS3DPlugin_Hypothesis::GetNodeIDToSizeMap(const GHS3DPlugin_Hypothesis* hyp)
SMESH::TPythonDump () << _this() << ".ClearEnforcedMeshes() ";
}
+/*!
+ * \brief Adds enforced elements of type elementType using another mesh/sub-mesh/mesh group theSource. The elements will be grouped in theGroupName.
+ */
+bool GHS3DPlugin_Hypothesis_i::SetEnforcedMeshWithGroup(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType theType, const char* theGroupName)
+ throw (SALOME::SALOME_Exception)
+{
+#if GHS3D_VERSION >= 42
+ bool res = _SetEnforcedMesh(theSource, theType, -1.0, theGroupName);
+ SMESH_Mesh_i* theMesh_i = SMESH::DownCast<SMESH_Mesh_i*>( theSource);
+ SMESH_Group_i* theGroup_i = SMESH::DownCast<SMESH_Group_i*>( theSource);
+ if (theGroup_i)
+ {
+ SMESH::TPythonDump () << _this() << ".SetEnforcedMeshWithGroup( "
+ << theSource << ", " << theType << ", \"" << theGroupName << "\" )";
+ }
+ else if (theMesh_i)
+ {
+ SMESH::TPythonDump () << _this() << ".SetEnforcedMeshWithGroup( "
+ << theSource << ".GetMesh(), " << theType << ", \"" << theGroupName << "\" )";
+ }
+ return res;
+#else
+ SALOME::ExceptionStruct ExDescription;
+ ExDescription.text = "Bad version of GHS3D. It must >= 4.2.";
+ ExDescription.type = SALOME::BAD_PARAM;
+ ExDescription.sourceFile = "GHS3DPlugin_Hypothesis::SetEnforcedMesh(theSource, theType)";
+ ExDescription.lineNumber = 463;
+ throw SALOME::SALOME_Exception(ExDescription);
+#endif
+}
+
/*!
* \brief Adds enforced elements of type elementType using another mesh/sub-mesh/mesh group theSource.
*/
#endif
}
+/*!
+ * \brief Adds enforced elements of type elementType using another mesh/sub-mesh/mesh group theSource and a size. The elements will be grouped in theGroupName.
+ */
+bool GHS3DPlugin_Hypothesis_i::SetEnforcedMeshSizeWithGroup(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType theType, double theSize, const char* theGroupName)
+ throw (SALOME::SALOME_Exception)
+{
+ if (theSize <= 0) {
+ SALOME::ExceptionStruct ExDescription;
+ ExDescription.text = "Size cannot be negative";
+ ExDescription.type = SALOME::BAD_PARAM;
+ ExDescription.sourceFile = "GHS3DPlugin_Hypothesis::SetEnforcedMeshSize(theSource, theType)";
+ ExDescription.lineNumber = 475;
+ throw SALOME::SALOME_Exception(ExDescription);
+ }
+
+ bool res = _SetEnforcedMesh(theSource, theType, theSize,theGroupName);
+ SMESH_Mesh_i* theMesh_i = SMESH::DownCast<SMESH_Mesh_i*>( theSource);
+ SMESH_Group_i* theGroup_i = SMESH::DownCast<SMESH_Group_i*>( theSource);
+ if (theGroup_i)
+ {
+ SMESH::TPythonDump () << _this() << ".SetEnforcedMeshSizeWithGroup( "
+ << theSource << ", " << theType << ", " << theSize << ", \"" << theGroupName << "\" )";
+ }
+ else if (theMesh_i)
+ {
+ SMESH::TPythonDump () << _this() << ".SetEnforcedMeshSizeWithGroup( "
+ << theSource << ".GetMesh(), " << theType << ", " << theSize << ", \"" << theGroupName << "\" )";
+ }
+ return res;
+}
+
/*!
* \brief Adds enforced elements of type elementType using another mesh/sub-mesh/mesh group theSource and a size.
*/
return res;
}
-bool GHS3DPlugin_Hypothesis_i::_SetEnforcedMesh(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType theType, double theSize)
+bool GHS3DPlugin_Hypothesis_i::_SetEnforcedMesh(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType theType, double theSize, const char* theGroupName)
throw (SALOME::SALOME_Exception)
{
ASSERT(myBaseImpl);
SALOME::ExceptionStruct ExDescription;
ExDescription.text = "The source mesh CORBA object is NULL";
ExDescription.type = SALOME::BAD_PARAM;
- ExDescription.sourceFile = "GHS3DPlugin_Hypothesis::_SetEnforcedMesh(theSource, theType, theSize)";
- ExDescription.lineNumber = 502;
+ ExDescription.sourceFile = "GHS3DPlugin_Hypothesis::_SetEnforcedMesh(theSource, theType, theSize, theGroupName)";
+ ExDescription.lineNumber = 840;
throw SALOME::SALOME_Exception(ExDescription);
}
SALOME::ExceptionStruct ExDescription;
ExDescription.text = "Bad elementType";
ExDescription.type = SALOME::BAD_PARAM;
- ExDescription.sourceFile = "GHS3DPlugin_Hypothesis::_SetEnforcedMesh(theSource, theType, theSize)";
- ExDescription.lineNumber = 502;
+ ExDescription.sourceFile = "GHS3DPlugin_Hypothesis::_SetEnforcedMesh(theSource, theType, theSize, theGroupName)";
+ ExDescription.lineNumber = 840;
throw SALOME::SALOME_Exception(ExDescription);
}
SALOME::ExceptionStruct ExDescription;
ExDescription.text = "The source mesh has bad type";
ExDescription.type = SALOME::BAD_PARAM;
- ExDescription.sourceFile = "GHS3DPlugin_Hypothesis::_SetEnforcedMesh(theSource, theType, theSize)";
- ExDescription.lineNumber = 502;
+ ExDescription.sourceFile = "GHS3DPlugin_Hypothesis::_SetEnforcedMesh(theSource, theType, theSize, theGroupName)";
+ ExDescription.lineNumber = 840;
throw SALOME::SALOME_Exception(ExDescription);
}
if (theMesh_i)
{
try {
- return this->GetImpl()->SetEnforcedMesh(anImplPtr->GetImpl(), theType, theSize);
+ return this->GetImpl()->SetEnforcedMesh(anImplPtr->GetImpl(), theType, theSize, theGroupName);
}
catch (const std::invalid_argument& ex) {
SALOME::ExceptionStruct ExDescription;
ExDescription.text = ex.what();
ExDescription.type = SALOME::BAD_PARAM;
- ExDescription.sourceFile = "GHS3DPlugin_Hypothesis::_SetEnforcedMesh(theSource, theType, theSize)";
- ExDescription.lineNumber = 502;
+ ExDescription.sourceFile = "GHS3DPlugin_Hypothesis::_SetEnforcedMesh(theSource, theType, theSize, theGroupName)";
+ ExDescription.lineNumber = 840;
throw SALOME::SALOME_Exception(ExDescription);
}
catch (SALOME_Exception& ex) {
MESSAGE("Add "<<theElemSet.size()<<" types["<<theType<<"] from source group "<< theGroup_i->GetName());
try {
- return this->GetImpl()->SetEnforcedElements(theElemSet, theType, theSize);
+ return this->GetImpl()->SetEnforcedElements(theElemSet, theType, theSize, theGroupName);
}
catch (const std::invalid_argument& ex) {
SALOME::ExceptionStruct ExDescription;
ExDescription.text = ex.what();
ExDescription.type = SALOME::BAD_PARAM;
- ExDescription.sourceFile = "GHS3DPlugin_Hypothesis::_SetEnforcedMesh(theSource, theType, theSize)";
- ExDescription.lineNumber = 502;
+ ExDescription.sourceFile = "GHS3DPlugin_Hypothesis::_SetEnforcedMesh(theSource, theType, theSize, theGroupName)";
+ ExDescription.lineNumber = 840;
throw SALOME::SALOME_Exception(ExDescription);
}
catch (SALOME_Exception& ex) {