-// Copyright (C) 2004-2013 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)
+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() );
}
//=======================================================================
void GHS3DPlugin_Hypothesis_i::SetGradation(CORBA::Double gradation)
{
- if (gradation <= 1)
- THROW_SALOME_CORBA_EXCEPTION( "The volumic gradation must be > 1",SALOME::BAD_PARAM );
ASSERT(myBaseImpl);
if (gradation != GetGradation()) {
this->GetImpl()->SetGradation(gradation);
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();
+}
+
//=======================================================================
//function : SetEnforcedVertex
//=======================================================================
// 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
MESSAGE("Required type is FACE");
break;
default:
- MESSAGE("Incompatible required type: " << theType);
- return false;
+ 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");
string enfMeshName = theName;
if (enfMeshName.empty())
- enfMeshName = SObj->GetName();
+ enfMeshName = SObj->GetName();
if (theMesh_i)
{
try {
- bool res = this->GetImpl()->SetEnforcedMesh(theMesh_i->GetImpl(), theType, enfMeshName , SObj->GetID(), theGroupName);
- if (theGroupName != "") {
- SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMeshWithGroup( "
- << theSource << ".GetMesh(), " << theType << ", \"" << theGroupName << "\" )";
- }
- else {
- SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMesh( "
- << theSource << ".GetMesh(), " << theType << " )";
- }
+ 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 {
+ SMESH::TPythonDump () << "isDone = " << _this() << ".SetEnforcedMesh( "
+ << theSource << ".GetMesh(), " << theType << " )";
+ }
return res;
}
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, enfMeshName , SObj->GetID(), theGroupName);
- 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;
- }
- catch (const std::invalid_argument& ex) {
- SALOME::ExceptionStruct ExDescription;
+ return res;
+ }
+ catch (const std::invalid_argument& ex) {
+ SALOME::ExceptionStruct ExDescription;
ExDescription.text = ex.what();
ExDescription.type = SALOME::BAD_PARAM;
ExDescription.sourceFile = "GHS3DPlugin_Hypothesis_i.cxx";
{
MESSAGE("The source is a group on geom")
try {
- bool res = this->GetImpl()->SetEnforcedGroup(theGroupOnGeom_i->GetGroupDS()->GetMesh(),theGroupOnGeom_i->GetListOfID(), theType, enfMeshName , SObj->GetID(), theGroupName);
- 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 << "\" )";
}