MG_Hexa = Mesh_mghexa_vl.Hexahedron(algo=smeshBuilder.MG_Hexa)
MG_Hexa_Parameters = MG_Hexa.Parameters()
-MG_Hexa.SetViscousLayers(5,5,3,MG_Hexa.Inward,[13,23])
+MG_Hexa.SetViscousLayers(5,5,3,smeshBuilder.Inward,[13,23])
MG_Hexa_Parameters.SetMinSize( 2 )
MG_Hexa_Parameters.SetMaxSize( 4 )
MG_Hexa_Parameters.SetHexesMinLevel( 2 )
<li>sd 4 : meshes non-manifold geometries as such and generates subdomains accordingly.</li>
</ul>
</li>
+
+<li><b>Options as text</b> - allows to input in the command line any text for MG-Hexa, for example, advanced options.
+</li>
</ul>
\note If MG-CADSurf is used as 2D algo, and if a GMF file is defined as output file (using SetGMFFile(my2Dmesh.mesh)), then MG-Hexa will use this file as input.
void SetHexoticMaxMemory(in long value);
long GetHexoticMaxMemory();
+
+ void SetTextOptions(in string option);
+ string GetTextOptions();
void SetSizeMapEntry(in string entry,
in double size);
<source>Hexotic_SD_MODE_4</source>
<translation>Non-manifold geometries</translation>
</message>
+ <message>
+ <source>Hexotic_ADVANCED</source>
+ <translation>Advanced options</translation>
+ </message>
+ <message>
+ <source>Hexotic_TEXT_OPTIONS</source>
+ <translation>Options as text</translation>
+ </message>
<message>
<source>Hexotic_ADD</source>
<translation>Add</translation>
<source>Hexotic_SD_MODE_4</source>
<translation>Géométries "non-manifold"</translation>
</message>
+ <message>
+ <source>Hexotic_ADVANCED</source>
+ <translation>Options avancées</translation>
+ </message>
+ <message>
+ <source>Hexotic_TEXT_OPTIONS</source>
+ <translation>Options comme texte</translation>
+ </message>
<message>
<source>Hexotic_ADD</source>
<translation>Ajouter</translation>
<source>Hexotic_SD_MODE_4</source>
<translation>ジオメトリ「マニホールド」</translation>
</message>
+ <message>
+ <source>Hexotic_ADVANCED</source>
+ <translation type="unfinished">Advanced options</translation>
+ </message>
+ <message>
+ <source>Hexotic_TEXT_OPTIONS</source>
+ <translation type="unfinished">Option as text</translation>
+ </message>
<message>
<source>Hexotic_ADD</source>
<translation>追加</translation>
myStdWidget->myHexoticSdMode->setCurrentIndex(data.myHexoticSdMode);
+ myStdWidget->myTextOptions->setText(data.myTextOptions);
+
HexoticPlugin_Hypothesis::THexoticSizeMaps::const_iterator it = data.mySizeMaps.begin();
for ( int row = 0; it != data.mySizeMaps.end(); it++, row++ )
{
valStr += tr("Hexotic_VERBOSITY") + " = " + QString::number( data.myHexoticVerbosity ) + "; ";
valStr += tr("Hexotic_MAX_MEMORY") + " = " + QString::number( data.myHexoticMaxMemory ) + "; ";
valStr += tr("Hexotic_SD_MODE") + " = " + QString::number( data.myHexoticSdMode ) + "; ";
+ valStr += tr("Hexotic_TEXT_OPTIONS") + " = " + data.myTextOptions + ";";
std::cout << "Data: " << valStr.toStdString() << std::endl;
}
valStr += tr("Hexotic_VERBOSITY") + " = " + QString::number( data.myHexoticVerbosity) + "; ";
valStr += tr("Hexotic_MAX_MEMORY") + " = " + QString::number( data.myHexoticMaxMemory ) + "; ";
valStr += tr("Hexotic_SD_MODE") + " = " + QString::number( data.myHexoticSdMode) + "; ";
+ valStr += tr("Hexotic_TEXT_OPTIONS") + " = " + data.myTextOptions + "; ";
valStr += tr("Hexotic_NB_LAYERS") + " = " + QString::number(data.myNbLayers) + ";";
valStr += tr("Hexotic_FIRST_LAYER_SIZE") + " = " + QString::number(data.myFirstLayerSize) + ";";
h_data.myHexoticVerbosity = h->GetHexoticVerbosity();
h_data.myHexoticMaxMemory = h->GetHexoticMaxMemory();
h_data.myHexoticSdMode = h->GetHexoticSdMode()-1;
+ h_data.myTextOptions = h->GetTextOptions();
// Size maps
HexoticPlugin::HexoticPluginSizeMapsList_var sizeMaps = h->GetSizeMaps();
h->SetHexoticVerbosity( h_data.myHexoticVerbosity );
h->SetHexoticMaxMemory( h_data.myHexoticMaxMemory );
h->SetHexoticSdMode( h_data.myHexoticSdMode+1 );
+ h->SetTextOptions( h_data.myTextOptions.toLatin1().constData() );
HexoticPlugin_Hypothesis::THexoticSizeMaps::const_iterator it;
h_data.myHexoticVerbosity = myStdWidget->myHexoticVerbosity->value();
h_data.myHexoticMaxMemory = myStdWidget->myHexoticMaxMemory->value();
h_data.myHexoticSdMode = myStdWidget->myHexoticSdMode->currentIndex();
+ h_data.myTextOptions = myStdWidget->myTextOptions->text();
h_data.myMinSize = myStdWidget->myMinSize->text().isEmpty() ? 0.0 : myStdWidget->myMinSize->value();
h_data.myMaxSize = myStdWidget->myMaxSize->text().isEmpty() ? 0.0 : myStdWidget->myMaxSize->value();
int myHexoticVerbosity;
int myHexoticMaxMemory;
int myHexoticSdMode;
+ QString myTextOptions;
HexoticPlugin_Hypothesis::THexoticSizeMaps mySizeMaps;
int myNbLayers;
double myFirstLayerSize;
<x>0</x>
<y>0</y>
<width>561</width>
- <height>581</height>
+ <height>908</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
</layout>
</widget>
</item>
+ <item row="9" column="0" colspan="4">
+ <widget class="QGroupBox" name="groupBoxAdvanced">
+ <property name="title">
+ <string>Hexotic_ADVANCED</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="margin">
+ <number>6</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_10">
+ <property name="text">
+ <string>Hexotic_TEXT_OPTIONS</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="myTextOptions"/>
+ </item>
+ </layout>
+ </widget>
+ </item>
<item row="1" column="2" colspan="2">
<widget class="QCheckBox" name="myHexoticInvalidElements">
<property name="text">
MG_Hexa = "MG-Hexa"
Hexotic = MG_Hexa
+## Direction of viscous layers for MG_Hexa algorithm
+Inward = True
+Outward = False
+
#----------------------------
# Algorithms
#----------------------------
# @internal
docHelper = "Creates hexahedron 3D algorithm for volumes"
- ## Direction of viscous layers
- # @internal
- Inward = True
- Outward = False
-
## Private constructor.
# @param mesh parent mesh object algorithm is assigned to
# @param geom geometry (shape/sub-shape) algorithm is assigned to;
_hexoticVerbosity = hyp->GetHexoticVerbosity();
_hexoticMaxMemory = hyp->GetHexoticMaxMemory();
_hexoticSdMode = hyp->GetHexoticSdMode();
+ _textOptions = hyp->GetTextOptions();
_sizeMaps = hyp->GetSizeMaps();
_nbLayers = hyp->GetNbLayers();
_firstLayerSize = hyp->GetFirstLayerSize();
_hexoticVerbosity = hyp->GetDefaultHexoticVerbosity();
_hexoticMaxMemory = hyp->GetDefaultHexoticMaxMemory();
_hexoticSdMode = hyp->GetDefaultHexoticSdMode();
+ _textOptions = hyp->GetDefaultTextOptions();
_sizeMaps = hyp->GetDefaultHexoticSizeMaps();
_nbLayers = hyp->GetDefaultNbLayers();
_firstLayerSize = hyp->GetDefaultFirstLayerSize();
cout << " " << _name << " Number of threads = " << _hexoticNbProc << std::endl;
cout << " " << _name << " Working directory = \"" << _hexoticWorkingDirectory << "\"" << std::endl;
cout << " " << _name << " Sub. Dom mode = " << _hexoticSdMode << std::endl;
+ cout << " " << _name << " Text options = \"" << _textOptions << "\"" << std::endl;
cout << " " << _name << " Number of layers = " << _nbLayers << std::endl;
cout << " " << _name << " Size of the first layer = " << _firstLayerSize << std::endl;
cout << " " << _name << " Direction of the layers = " << ( _direction ? "Inward" : "Outward" ) << std::endl;
TCollection_AsciiString comImptintedFaces = " --imprinted_surface_ids ";
TCollection_AsciiString minLevel, maxLevel, minSize, maxSize, sharpAngle, mode, nbproc, verbosity, maxMemory,
- nbLayers, firstLayerSize, direction, growth, facesWithLayers, imprintedFaces;
+ textOptions, nbLayers, firstLayerSize, direction, growth, facesWithLayers, imprintedFaces;
minLevel = _hexesMinLevel;
maxLevel = _hexesMaxLevel;
minSize = _hexesMinSize;
nbproc = _hexoticNbProc;
verbosity = _hexoticVerbosity;
maxMemory = _hexoticMaxMemory;
+ textOptions = (" " + _textOptions + " ").c_str();
nbLayers = _nbLayers;
firstLayerSize = _firstLayerSize;
direction = _direction ? "1" : "-1";
run_Hexotic += verb + verbosity;
run_Hexotic += maxmem + maxMemory;
+ if (!_textOptions.empty())
+ run_Hexotic += textOptions;
+
return run_Hexotic.ToCString();
}
int _hexoticVerbosity;
int _hexoticMaxMemory;
int _hexoticSdMode;
+ std::string _textOptions;
HexoticPlugin_Hypothesis::THexoticSizeMaps _sizeMaps;
int _nbLayers;
double _firstLayerSize;
_hexoticSdMode(GetDefaultHexoticSdMode()),
_hexoticVerbosity(GetDefaultHexoticVerbosity()),
_hexoticMaxMemory(GetDefaultHexoticMaxMemory()),
+ _textOptions(GetDefaultTextOptions()),
_sizeMaps(GetDefaultHexoticSizeMaps()),
_nbLayers(GetDefaultNbLayers()),
_firstLayerSize(GetDefaultFirstLayerSize()),
}
}
+void HexoticPlugin_Hypothesis::SetTextOptions(const std::string& theOptions)
+{
+ if (_textOptions != theOptions ) {
+ _textOptions = theOptions;
+ NotifySubMeshesHypothesisModification();
+ }
+}
+
bool HexoticPlugin_Hypothesis::AddSizeMap(std::string theEntry, double theSize) {
THexoticSizeMaps::iterator it;
it=_sizeMaps.find(theEntry);
save<<"hexoticSdMode="<<_hexoticSdMode<<";";
save<<"hexoticVerbosity="<<_hexoticVerbosity<<";";
save<<"hexoticMaxMemory="<<_hexoticMaxMemory<<";";
+ replace(_textOptions.begin(), _textOptions.end(), ' ', '*');
+ save<<"textOptions="<<_textOptions<<";";
THexoticSizeMaps::iterator it = _sizeMaps.begin();
if ( it != _sizeMaps.end() )
{
if (str3=="hexoticSdMode") _hexoticSdMode = atoi(str4.c_str());
if (str3=="hexoticVerbosity") _hexoticVerbosity = atoi(str4.c_str());
if (str3=="hexoticMaxMemory") _hexoticMaxMemory = atoi(str4.c_str());
+ if (str3=="textOptions")
+ {
+ replace(str4.begin(), str4.end(), '*', ' ');
+ _textOptions = str4;
+ }
if (str3=="sizeMaps")
{
std::string sm_substr, sm_substr1, sm_substr2;
return 2048;
}
+std::string HexoticPlugin_Hypothesis::GetDefaultTextOptions()
+{
+ return "";
+}
+
HexoticPlugin_Hypothesis::THexoticSizeMaps HexoticPlugin_Hypothesis::GetDefaultHexoticSizeMaps()
{
return THexoticSizeMaps();
void SetHexoticMaxMemory(int theVal);
int GetHexoticMaxMemory() const { return _hexoticMaxMemory; }
+ void SetTextOptions(const std::string& theOptions);
+ std::string GetTextOptions() const { return _textOptions; }
+
// Size Maps
typedef std::map<std::string,double> THexoticSizeMaps;
static int GetDefaultHexoticSdMode();
static int GetDefaultHexoticVerbosity();
static int GetDefaultHexoticMaxMemory();
+ static std::string GetDefaultTextOptions();
static THexoticSizeMaps GetDefaultHexoticSizeMaps();
static int GetDefaultNbLayers();
static double GetDefaultFirstLayerSize();
int _hexoticSdMode;
int _hexoticVerbosity;
int _hexoticMaxMemory;
+ std::string _textOptions;
THexoticSizeMaps _sizeMaps;
- std::string _hexoticWorkingDirectory ;
+ std::string _hexoticWorkingDirectory;
int _nbLayers;
double _firstLayerSize;
bool _direction;
* HexoticPlugin_Hypothesis_i::SetHexoticSdMode
* HexoticPlugin_Hypothesis_i::SetVerbosity
* HexoticPlugin_Hypothesis_i::SetHexoticMaxMemory
+ * HexoticPlugin_Hypothesis_i::SetTextOptions
* HexoticPlugin_Hypothesis_i::SetNbLayers
* HexoticPlugin_Hypothesis_i::SetFirstLayerSize
* HexoticPlugin_Hypothesis_i::SetDirection
SMESH::TPythonDump() << _this() << ".SetHexoticMaxMemory( " << theValue << " )";
}
+void HexoticPlugin_Hypothesis_i::SetTextOptions(const char* theOptions)
+{
+ // MESSAGE("HexoticPlugin_Hypothesis_i::SetTextOptions");
+ ASSERT(myBaseImpl);
+ string oldValue(GetTextOptions());
+ this->GetImpl()->SetTextOptions(theOptions);
+ if (theOptions != oldValue)
+ SMESH::TPythonDump() << _this() << ".SetTextOptions( '" << theOptions << "' )";
+}
+
HexoticPlugin::HexoticPluginSizeMapsList* HexoticPlugin_Hypothesis_i::GetSizeMaps ()
{
// Get the std::map < string entry, double size >
* HexoticPlugin_Hypothesis_i::GetHexoticSdMode
* HexoticPlugin_Hypothesis_i::GetVerbosity
* HexoticPlugin_Hypothesis_i::GetHexoticMaxMemory
+ * HexoticPlugin_Hypothesis_i::GetTextOptions
* HexoticPlugin_Hypothesis_i::GetNbLayers
* HexoticPlugin_Hypothesis_i::GetFirstLayerSize
* HexoticPlugin_Hypothesis_i::GetDirection
return this->GetImpl()->GetHexoticMaxMemory();
}
+char* HexoticPlugin_Hypothesis_i::GetTextOptions()
+{
+ // MESSAGE("HexoticPlugin_Hypothesis_i::GetTextOptions");
+ ASSERT(myBaseImpl);
+ return CORBA::string_dup( this->GetImpl()->GetTextOptions().c_str() );
+}
+
CORBA::Long HexoticPlugin_Hypothesis_i::GetNbLayers()
{
// MESSAGE("HexoticPlugin_Hypothesis_i::GetNbLayers");
void SetHexoticMaxMemory(CORBA::Long theVal);
CORBA::Long GetHexoticMaxMemory();
+ void SetTextOptions(const char* theOptions);
+ char* GetTextOptions();
+
void SetSizeMapEntry(const char* theEntry, CORBA::Double theSize);
void UnsetSizeMapEntry(const char* theEntry);