else if ( name == "boundary_layer_max_element_angle" )
SetBoundaryLayersMaxElemAngle( GetImpl()->ToDbl( optionValue ));
+ else if ( name == "boundary_layer_height_relative_to_local_surface_size" )
+ SetHeightIsRelative( GetImpl()->ToBool( optionValue ));
+
else if ( name == "gradation" )
SetGradation( GetImpl()->ToDbl( optionValue ));
{
if ( !optionsAndValues ) return;
- SMESH::TPythonDump dump;
+ //SMESH::TPythonDump dump;
std::istringstream strm( optionsAndValues );
std::istream_iterator<std::string> sIt( strm ), sEnd;
AddOption( option.c_str(), "" );
}
}
- dump << _this() << ".SetAdvancedOption( '" << optionsAndValues << "' )";
+ //dump << _this() << ".SetAdvancedOption( '" << optionsAndValues << "' )";
}
//=============================================================================
void HYBRIDPlugin_Hypothesis_i::AddOption(const char* optionName, const char* optionValue)
{
- ASSERT(myBaseImpl);
+ if ( strncmp( "--", optionName, 2 ) == 0 )
+ optionName += 2;
+
bool valueChanged = ( !this->GetImpl()->HasOptionDefined(optionName) ||
this->GetImpl()->GetOptionValue(optionName) != optionValue );
- if (valueChanged) {
- this->GetImpl()->SetOptionValue(optionName, optionValue);
- SMESH::TPythonDump() << _this() << ".SetOptionValue( '" << optionName << "', '" << optionValue << "' )";
+ if ( valueChanged )
+ {
+ SetOptionValue(optionName, optionValue);
+
+ SMESH_Comment optVal("--");
+ optVal << optionName << " " << optionValue;
+ std::string cmd = ::HYBRIDPlugin_Hypothesis::CommandToRun( GetImpl() );
+ if ( cmd.find( optVal ) == std::string::npos )
+ {
+ this->GetImpl()->SetOptionValue(optionName, optionValue);
+ SMESH::TPythonDump() << _this() << ".AddOption( '" << optionName << "', '" << optionValue << "' )";
+ }
}
}