-// Copyright (C) 2004-2012 CEA/DEN, EDF R&D
+// Copyright (C) 2004-2016 CEA/DEN, EDF R&D
//
// 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
// #include <SALOMEconfig.h>
// #include CORBA_SERVER_HEADER(SALOMEDS)
-#ifndef GHS3D_VERSION
-#define GHS3D_VERSION 41
-#endif
+using namespace std;
+
//=======================================================================
//function : GHS3DPlugin_Hypothesis_i
//=======================================================================
return this->GetImpl()->GetToMeshHoles();
}
+//=======================================================================
+//function : SetToMakeGroupsOfDomains
+//=======================================================================
+
+void GHS3DPlugin_Hypothesis_i::SetToMakeGroupsOfDomains(CORBA::Boolean toMakeGroups)
+{
+ ASSERT(myBaseImpl);
+ this->GetImpl()->SetToMakeGroupsOfDomains(toMakeGroups);
+ SMESH::TPythonDump() << _this() << ".SetToMakeGroupsOfDomains( " << toMakeGroups << " )";
+}
+
+//=======================================================================
+//function : GetToMakeGroupsOfDomains
+//=======================================================================
+
+CORBA::Boolean GHS3DPlugin_Hypothesis_i::GetToMakeGroupsOfDomains()
+{
+ ASSERT(myBaseImpl);
+ return this->GetImpl()->GetToMakeGroupsOfDomains();
+}
+
//=======================================================================
//function : SetMaximumMemory
//=======================================================================
-void GHS3DPlugin_Hypothesis_i::SetMaximumMemory(CORBA::Short MB)
+void GHS3DPlugin_Hypothesis_i::SetMaximumMemory(CORBA::Long MB)
throw ( SALOME::SALOME_Exception )
{
if ( MB == 0 )
//function : GetMaximumMemory
//=======================================================================
-CORBA::Short GHS3DPlugin_Hypothesis_i::GetMaximumMemory()
+CORBA::Long GHS3DPlugin_Hypothesis_i::GetMaximumMemory()
{
ASSERT(myBaseImpl);
return this->GetImpl()->GetMaximumMemory();
//function : SetInitialMemory
//=======================================================================
-void GHS3DPlugin_Hypothesis_i::SetInitialMemory(CORBA::Short MB)
+void GHS3DPlugin_Hypothesis_i::SetInitialMemory(CORBA::Long MB)
throw ( SALOME::SALOME_Exception )
{
if ( MB == 0 )
//function : GetInitialMemory
//=======================================================================
-CORBA::Short GHS3DPlugin_Hypothesis_i::GetInitialMemory()
+CORBA::Long GHS3DPlugin_Hypothesis_i::GetInitialMemory()
{
ASSERT(myBaseImpl);
return this->GetImpl()->GetInitialMemory();
void GHS3DPlugin_Hypothesis_i::SetTextOption(const char* option)
{
ASSERT(myBaseImpl);
- this->GetImpl()->SetTextOption(option);
- SMESH::TPythonDump() << _this() << ".SetTextOption( '" << option << "' )";
+ this->GetImpl()->SetAdvancedOption(option);
+ SMESH::TPythonDump() << _this() << ".SetAdvancedOption( '" << option << "' )";
}
//=======================================================================
char* GHS3DPlugin_Hypothesis_i::GetTextOption()
{
ASSERT(myBaseImpl);
- return CORBA::string_dup( this->GetImpl()->GetTextOption().c_str() );
+ return CORBA::string_dup( this->GetImpl()->GetAdvancedOption().c_str() );
+}
+
+//=======================================================================
+//function : SetAdvancedOption
+//=======================================================================
+
+void GHS3DPlugin_Hypothesis_i::SetAdvancedOption(const char* option)
+{
+ ASSERT(myBaseImpl);
+ this->GetImpl()->SetAdvancedOption(option);
+ SMESH::TPythonDump() << _this() << ".SetAdvancedOption( '" << option << "' )";
+}
+
+//=======================================================================
+//function : GetAdvancedOption
+//=======================================================================
+
+char* GHS3DPlugin_Hypothesis_i::GetAdvancedOption()
+{
+ ASSERT(myBaseImpl);
+ return CORBA::string_dup( this->GetImpl()->GetAdvancedOption().c_str() );
+}
+
+//=======================================================================
+//function : SetToRemoveCentralPoint
+//=======================================================================
+
+void GHS3DPlugin_Hypothesis_i::SetGradation(CORBA::Double gradation)
+{
+ ASSERT(myBaseImpl);
+ if (gradation != GetGradation()) {
+ this->GetImpl()->SetGradation(gradation);
+ SMESH::TPythonDump() << _this() << ".SetGradation( " << gradation << " )";
+ }
+}
+
+//=======================================================================
+//function : GetToRemoveCentralPoint
+//=======================================================================
+
+CORBA::Double GHS3DPlugin_Hypothesis_i::GetGradation()
+{
+ ASSERT(myBaseImpl);
+ return this->GetImpl()->GetGradation();
+}
+
+//=======================================================================
+//function : SetStandardOutputLog
+//=======================================================================
+
+void GHS3DPlugin_Hypothesis_i::SetStandardOutputLog(CORBA::Boolean logInStandardOutput)
+{
+ ASSERT(myBaseImpl);
+ this->GetImpl()->SetStandardOutputLog(logInStandardOutput);
+ SMESH::TPythonDump() << _this() << ".SetPrintLogInFile( " << !logInStandardOutput << " )";
+}
+
+//=======================================================================
+//function : GetStandardOutputLog
+//=======================================================================
+
+CORBA::Boolean GHS3DPlugin_Hypothesis_i::GetStandardOutputLog()
+{
+ ASSERT(myBaseImpl);
+ return this->GetImpl()->GetStandardOutputLog();
+}
+
+//=======================================================================
+//function : SetRemoveLogOnSuccess
+//=======================================================================
+
+void GHS3DPlugin_Hypothesis_i::SetRemoveLogOnSuccess(CORBA::Boolean removeLogOnSuccess)
+{
+ ASSERT(myBaseImpl);
+ this->GetImpl()->SetRemoveLogOnSuccess(removeLogOnSuccess);
+ SMESH::TPythonDump() << _this() << ".SetRemoveLogOnSuccess( " << removeLogOnSuccess << " )";
+}
+
+//=======================================================================
+//function : GetRemoveLogOnSuccess
+//=======================================================================
+
+CORBA::Boolean GHS3DPlugin_Hypothesis_i::GetRemoveLogOnSuccess()
+{
+ ASSERT(myBaseImpl);
+ return this->GetImpl()->GetRemoveLogOnSuccess();
}
//=======================================================================
// Coords
GHS3DPlugin::TCoords_var coords = new GHS3DPlugin::TCoords();
coords->length(currentVertex->coords.size());
- for (int ind = 0; ind < currentVertex->coords.size(); ind++)
+ for ( size_t ind = 0; ind < currentVertex->coords.size(); ind++)
coords[ind] = currentVertex->coords[ind];
enfVertex->coords = coords;
// Group Name
enfMesh->elementType = currentMesh->elementType;
// Group Name
enfMesh->groupName = CORBA::string_dup(currentMesh->groupName.c_str());
- // Size
- enfMesh->size = currentMesh->size;
result[i]=enfMesh;
}
bool GHS3DPlugin_Hypothesis_i::SetEnforcedMeshWithGroup(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType theType, const char* theGroupName)
throw (SALOME::SALOME_Exception)
{
-#if GHS3D_VERSION >= 42
- return p_SetEnforcedMesh(theSource, theType, -1.0, theGroupName);
-// bool res = p_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);
-// SMESH_GroupOnGeom_i* theGroupOnGeom_i = SMESH::DownCast<SMESH_GroupOnGeom_i*>( theSource);
-// if (theGroup_i || theGroupOnGeom_i)
-// {
-// SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshWithGroup( "
-// << theSource << ", " << theType << ", \"" << theGroupName << "\" )";
-// }
-// else if (theMesh_i)
-// {
-// SMESH::TPythonDump () << "isDone = " << _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_i.cxx";
- ExDescription.lineNumber = 719;
- throw SALOME::SALOME_Exception(ExDescription);
-#endif
+// #if GHS3D_VERSION >= 42
+ return p_SetEnforcedMesh(theSource, theType, "", theGroupName);
+// #else
+// SALOME::ExceptionStruct ExDescription;
+// ExDescription.text = "Bad version of GHS3D. It must >= 4.2.";
+// ExDescription.type = SALOME::BAD_PARAM;
+// ExDescription.sourceFile = "GHS3DPlugin_Hypothesis_i.cxx";
+// ExDescription.lineNumber = 719;
+// throw SALOME::SALOME_Exception(ExDescription);
+// #endif
}
/*!
throw (SALOME::SALOME_Exception)
{
// MESSAGE("GHS3DPlugin_Hypothesis_i::SetEnforcedMesh");
-#if GHS3D_VERSION >= 42
+// #if GHS3D_VERSION >= 42
return p_SetEnforcedMesh(theSource, theType);
-// bool res = p_SetEnforcedMesh(theSource, theType);
-// SMESH_Mesh_i* theMesh_i = SMESH::DownCast<SMESH_Mesh_i*>( theSource);
-// SMESH_Group_i* theGroup_i = SMESH::DownCast<SMESH_Group_i*>( theSource);
-// SMESH_GroupOnGeom_i* theGroupOnGeom_i = SMESH::DownCast<SMESH_GroupOnGeom_i*>( theSource);
-// if (theGroup_i || theGroupOnGeom_i)
-// {
-// SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMesh( "
-// << theSource << ", " << theType << " )";
-// }
-// else if (theMesh_i)
-// {
-// SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMesh( "
-// << theSource << ".GetMesh(), " << theType << " )";
-// }
-// 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_i.cxx";
- ExDescription.lineNumber = 750;
- throw SALOME::SALOME_Exception(ExDescription);
-#endif
+// #else
+// SALOME::ExceptionStruct ExDescription;
+// ExDescription.text = "Bad version of GHS3D. It must >= 4.2.";
+// ExDescription.type = SALOME::BAD_PARAM;
+// ExDescription.sourceFile = "GHS3DPlugin_Hypothesis_i.cxx";
+// ExDescription.lineNumber = 750;
+// throw SALOME::SALOME_Exception(ExDescription);
+// #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.
+ * \brief OBSOLETE FUNCTION - 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 GHS3D_VERSION >= 42
- if (theSize < 0) {
- SALOME::ExceptionStruct ExDescription;
- ExDescription.text = "Size cannot be negative";
- ExDescription.type = SALOME::BAD_PARAM;
- ExDescription.sourceFile = "GHS3DPlugin_Hypothesis_i.cxx";
- ExDescription.lineNumber = 781;
- throw SALOME::SALOME_Exception(ExDescription);
- }
-
- return p_SetEnforcedMesh(theSource, theType, theSize, theGroupName);
-// bool res = p_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);
-// SMESH_GroupOnGeom_i* theGroupOnGeom_i = SMESH::DownCast<SMESH_GroupOnGeom_i*>( theSource);
-// if (theGroup_i || theGroupOnGeom_i)
-// {
-// SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshSizeWithGroup( "
-// << theSource << ", " << theType << ", " << theSize << ", \"" << theGroupName << "\" )";
-// }
-// else if (theMesh_i)
-// {
-// SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshSizeWithGroup( "
-// << theSource << ".GetMesh(), " << theType << ", " << theSize << ", \"" << 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_i.cxx";
- ExDescription.lineNumber = 750;
- throw SALOME::SALOME_Exception(ExDescription);
-#endif
+// #if GHS3D_VERSION >= 42
+ return p_SetEnforcedMesh(theSource, theType, "", theGroupName);
+// #else
+// SALOME::ExceptionStruct ExDescription;
+// ExDescription.text = "Bad version of GHS3D. It must >= 4.2.";
+// ExDescription.type = SALOME::BAD_PARAM;
+// ExDescription.sourceFile = "GHS3DPlugin_Hypothesis_i.cxx";
+// ExDescription.lineNumber = 750;
+// throw SALOME::SALOME_Exception(ExDescription);
+// #endif
}
/*!
- * \brief Adds enforced elements of type elementType using another mesh/sub-mesh/mesh group theSource and a size.
+ * \brief OBSOLETE FUNCTION - Adds enforced elements of type elementType using another mesh/sub-mesh/mesh group theSource and a size.
*/
bool GHS3DPlugin_Hypothesis_i::SetEnforcedMeshSize(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType theType, double theSize)
throw (SALOME::SALOME_Exception)
{
-#if GHS3D_VERSION >= 42
- if (theSize < 0) {
- SALOME::ExceptionStruct ExDescription;
- ExDescription.text = "Size cannot be negative";
- ExDescription.type = SALOME::BAD_PARAM;
- ExDescription.sourceFile = "GHS3DPlugin_Hypothesis_i.cxx";
- ExDescription.lineNumber = 781;
- throw SALOME::SALOME_Exception(ExDescription);
- }
- return p_SetEnforcedMesh(theSource, theType, theSize);
-// bool res = p_SetEnforcedMesh(theSource, theType, theSize);
-// SMESH_Mesh_i* theMesh_i = SMESH::DownCast<SMESH_Mesh_i*>( theSource);
-// SMESH_Group_i* theGroup_i = SMESH::DownCast<SMESH_Group_i*>( theSource);
-// SMESH_GroupOnGeom_i* theGroupOnGeom_i = SMESH::DownCast<SMESH_GroupOnGeom_i*>( theSource);
-// if (theGroup_i || theGroupOnGeom_i)
-// {
-// SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshSize( "
-// << theSource << ", " << theType << ", " << theSize << " )";
-// }
-// else if (theMesh_i)
-// {
-// SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshSize( "
-// << theSource << ".GetMesh(), " << theType << ", " << theSize << " )";
-// }
-// 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_i.cxx";
- ExDescription.lineNumber = 750;
- throw SALOME::SALOME_Exception(ExDescription);
-#endif
+// #if GHS3D_VERSION >= 42
+ return p_SetEnforcedMesh(theSource, theType);
+// #else
+// SALOME::ExceptionStruct ExDescription;
+// ExDescription.text = "Bad version of GHS3D. It must >= 4.2.";
+// ExDescription.type = SALOME::BAD_PARAM;
+// ExDescription.sourceFile = "GHS3DPlugin_Hypothesis_i.cxx";
+// ExDescription.lineNumber = 750;
+// throw SALOME::SALOME_Exception(ExDescription);
+// #endif
}
-bool GHS3DPlugin_Hypothesis_i::p_SetEnforcedMesh(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType theType, double theSize, const char* theGroupName)
+bool GHS3DPlugin_Hypothesis_i::p_SetEnforcedMesh(SMESH::SMESH_IDSource_ptr theSource, SMESH::ElementType theType, const char* theName, const char* theGroupName)
throw (SALOME::SALOME_Exception)
{
MESSAGE("GHS3DPlugin_Hypothesis_i::p_SetEnforcedMesh");
throw SALOME::SALOME_Exception(ExDescription);
}
- if ((theType != SMESH::NODE) && (theType != SMESH::EDGE) && (theType != SMESH::FACE))
- {
- return false;
-// SALOME::ExceptionStruct ExDescription;
-// ExDescription.text = "Bad elementType";
-// ExDescription.type = SALOME::BAD_PARAM;
-// ExDescription.sourceFile = "GHS3DPlugin_Hypothesis_i.cxx";
-// ExDescription.lineNumber = 840;
-// throw SALOME::SALOME_Exception(ExDescription);
- }
-
- SMESH::array_of_ElementType_var types = theSource->GetTypes();
switch (theType) {
case SMESH::NODE:
MESSAGE("Required type is NODE");
MESSAGE("Required type is FACE");
break;
default:
- break;
+ MESSAGE("Incompatible required type: " << theType);
+ return false;
}
// MESSAGE("Required type is "<<theType);
+ SMESH::array_of_ElementType_var types = theSource->GetTypes();
MESSAGE("Available types:");
- for (int i=0;i<types->length();i++){MESSAGE(types[i]);}
+ for ( CORBA::ULong i=0;i<types->length();i++){MESSAGE(types[i]);}
if ( types->length() >= 1 && types[types->length()-1] < theType)
{
+ MESSAGE("Required type not available");
return false;
// SALOME::ExceptionStruct ExDescription;
// ExDescription.text = "The source mesh has bad type";
// throw SALOME::SALOME_Exception(ExDescription);
}
+
+ SMESH_Gen_i *smeshGen = SMESH_Gen_i::GetSMESHGen();
+ SALOMEDS::SObject_ptr SObj = smeshGen->ObjectToSObject(smeshGen->GetCurrentStudy(),theSource);
+
SMESH_Mesh_i* theMesh_i = SMESH::DownCast<SMESH_Mesh_i*>( theSource);
SMESH_Group_i* theGroup_i = SMESH::DownCast<SMESH_Group_i*>( theSource);
SMESH_GroupOnGeom_i* theGroupOnGeom_i = SMESH::DownCast<SMESH_GroupOnGeom_i*>( theSource);
- TIDSortedElemSet theElemSet;
- SMESH_Gen_i *smeshGen = SMESH_Gen_i::GetSMESHGen();
- SALOMEDS::SObject_ptr SObj = smeshGen->ObjectToSObject(smeshGen->GetCurrentStudy(),theSource);
+
+ string enfMeshName = theName;
+ if (enfMeshName.empty())
+ enfMeshName = SObj->GetName();
+
if (theMesh_i)
{
try {
- bool res = this->GetImpl()->SetEnforcedMesh(theMesh_i->GetImpl(), theType, SObj->GetName() , SObj->GetID(), theSize, theGroupName);
- if (theSize > 0) {
- if (theGroupName != "") {
- SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshSizeWithGroup( "
- << theSource << ".GetMesh(), " << theType << ", " << theSize << ", \"" << theGroupName << "\" )";
- }
- else {
- SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshSize( "
- << theSource << ".GetMesh(), " << theType << ", " << theSize << ", \"" << theGroupName << "\" )";
- }
+ bool res = this->GetImpl()->SetEnforcedMesh(theMesh_i->GetImpl(), theType, enfMeshName , SObj->GetID(), theGroupName);
+ if (theGroupName && theGroupName[0] ) {
+ SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshWithGroup( "
+ << theSource << ".GetMesh(), " << theType << ", \"" << theGroupName << "\" )";
}
else {
- if (theGroupName != "") {
- SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshWithGroup( "
- << theSource << ".GetMesh(), " << theType << ", \"" << theGroupName << "\" )";
- }
- else {
- SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMesh( "
- << theSource << ".GetMesh(), " << theType << " )";
- }
+ SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMesh( "
+ << theSource << ".GetMesh(), " << theType << " )";
}
+
return res;
}
catch (const std::invalid_argument& ex) {
THROW_SALOME_CORBA_EXCEPTION( ex.what() ,SALOME::BAD_PARAM );
}
}
- else if (theGroup_i && types->length() == 1 && types[0] == theType)
+ else if (theGroup_i)// && types->length() == 1 && types[0] == theType)
{
MESSAGE("The source is a group")
- try {
- bool res = this->GetImpl()->SetEnforcedGroup(theGroup_i->GetGroupDS()->GetMesh(), theGroup_i->GetListOfID(), theType, SObj->GetName() , SObj->GetID(), theSize, theGroupName);
- if (theSize > 0) {
- if (theGroupName != "") {
- SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshSizeWithGroup( "
- << theSource << ", " << theType << ", " << theSize << ", \"" << theGroupName << "\" )";
- }
- else {
- SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshSize( "
- << theSource << ", " << theType << ", " << theSize << ", \"" << theGroupName << "\" )";
- }
- }
- else {
- if (theGroupName != "") {
- SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshWithGroup( "
+ try {
+ bool res = this->GetImpl()->SetEnforcedGroup(theGroup_i->GetGroupDS()->GetMesh(), theGroup_i->GetListOfID(), theType, enfMeshName , SObj->GetID(), theGroupName);
+ if ( theGroupName && theGroupName[0] ) {
+ SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshWithGroup( "
<< theSource << ", " << theType << ", \"" << theGroupName << "\" )";
}
else {
- SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMesh( "
+ SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMesh( "
<< theSource << ", " << theType << " )";
}
+ return res;
}
- return res;
- }
- catch (const std::invalid_argument& ex) {
- SALOME::ExceptionStruct ExDescription;
+ catch (const std::invalid_argument& ex) {
+ SALOME::ExceptionStruct ExDescription;
ExDescription.text = ex.what();
ExDescription.type = SALOME::BAD_PARAM;
ExDescription.sourceFile = "GHS3DPlugin_Hypothesis_i.cxx";
THROW_SALOME_CORBA_EXCEPTION( ex.what() ,SALOME::BAD_PARAM );
}
}
- else if (theGroupOnGeom_i && types->length() == 1 && types[0] == theType)
+ else if (theGroupOnGeom_i)// && types->length() == 1 && types[0] == theType)
{
MESSAGE("The source is a group on geom")
try {
- bool res = this->GetImpl()->SetEnforcedGroup(theGroupOnGeom_i->GetGroupDS()->GetMesh(),theGroupOnGeom_i->GetListOfID(), theType, SObj->GetName() , SObj->GetID(), theSize, theGroupName);
- if (theSize > 0) {
- if (theGroupName != "") {
- SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshSizeWithGroup( "
- << theSource << ", " << theType << ", " << theSize << ", \"" << theGroupName << "\" )";
- }
- else {
- SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshSize( "
- << theSource << ", " << theType << ", " << theSize << ", \"" << theGroupName << "\" )";
- }
- }
- else {
- if (theGroupName != "") {
+ bool res = this->GetImpl()->SetEnforcedGroup(theGroupOnGeom_i->GetGroupDS()->GetMesh(),theGroupOnGeom_i->GetListOfID(), theType, enfMeshName , SObj->GetID(), theGroupName);
+ if ( theGroupName && theGroupName[0] ) {
SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshWithGroup( "
<< theSource << ", " << theType << ", \"" << theGroupName << "\" )";
}
SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMesh( "
<< theSource << ", " << theType << " )";
}
- }
return res;
}
catch (const std::invalid_argument& ex) {