]> SALOME platform Git repositories - plugins/hexoticplugin.git/commitdiff
Salome HOME
Fix for the "0022515: [CEA 1074] Hexotic does not work under Windows 7 64 bits" issue.
authorrnv <rnv@opencascade.com>
Tue, 18 Mar 2014 08:33:44 +0000 (12:33 +0400)
committerrnv <rnv@opencascade.com>
Tue, 18 Mar 2014 08:33:44 +0000 (12:33 +0400)
src/GUI/HexoticPluginGUI_HypothesisCreator.cxx
src/HexoticPlugin/HexoticPlugin_Hexotic.cxx

index 992913333dce4859eb74d94d43dd363522df6c57..76d15bc7e7a16670d10fa6c7ec7f5a2b9d3a7cfd 100644 (file)
@@ -194,6 +194,10 @@ QFrame* HexoticPluginGUI_HypothesisCreator::buildFrame()
   HexoticPlugin::HexoticPlugin_Hypothesis::_narrow( initParamsHypothesis() );
   
   myStdWidget = new HexoticPluginGUI_StdWidget(aStdGroup);
+#ifdef WIN32
+  myStdWidget->label_6->hide();
+  myStdWidget->myHexoticNbProc->hide();
+#endif
   l->addWidget( myStdWidget, row++, 0, 1, 3 );
   myStdWidget->onSdModeSelected(SD_MODE_4);
 
@@ -407,8 +411,9 @@ void HexoticPluginGUI_HypothesisCreator::retrieveParams() const
     myStdWidget->myHexoticSharpAngleThreshold->setText("");
   else
     myStdWidget->myHexoticSharpAngleThreshold->setValue( data.myHexoticSharpAngleThreshold );
-
+#ifndef WIN32
   myStdWidget->myHexoticNbProc->setValue( data.myHexoticNbProc );
+#endif
   myStdWidget->myHexoticWorkingDir->setText( data.myHexoticWorkingDir );
 
   myStdWidget->myHexoticVerbosity->setValue( data.myHexoticVerbosity );
@@ -567,8 +572,9 @@ bool HexoticPluginGUI_HypothesisCreator::readParamsFromWidgets( HexoticHypothesi
 
   h_data.myHexoticIgnoreRidges = myStdWidget->myHexoticIgnoreRidges->isChecked();
   h_data.myHexoticInvalidElements = myStdWidget->myHexoticInvalidElements->isChecked();
-
+#ifndef WIN32
   h_data.myHexoticNbProc = myStdWidget->myHexoticNbProc->value();
+#endif
   h_data.myHexoticWorkingDir = myStdWidget->myHexoticWorkingDir->text();
   h_data.myHexoticVerbosity = myStdWidget->myHexoticVerbosity->value();
   h_data.myHexoticMaxMemory = myStdWidget->myHexoticMaxMemory->value();
index fd8688c15bab4dc44ac59bbd37a6be3dfc19ce22..588d40888578230d10d280936350189fad01c9b2 100644 (file)
@@ -922,7 +922,11 @@ static TCollection_AsciiString getSuffix()
 {
   TCollection_AsciiString aSuffix = "";
   aSuffix += "_";
+#ifndef WIN32
   aSuffix += getenv("USER");
+#else
+  aSuffix += getenv("USERNAME");
+#endif
   aSuffix += "_";
   aSuffix += Kernel_Utils::GetHostname().c_str();
   aSuffix += "_";
@@ -969,7 +973,9 @@ std::string HexoticPlugin_Hexotic::getHexoticCommand(const TCollection_AsciiStri
   TCollection_AsciiString sizeMap = " --read_sizemap ";
   TCollection_AsciiString ignoreRidges = " --compute_ridges no ", invalideElements = " --allow_invalid_elements yes ";
   TCollection_AsciiString subdom = " --components ";
+#ifndef WIN32
   TCollection_AsciiString proc = " --max_number_of_threads ";
+#endif
   TCollection_AsciiString verb = " --verbose ";
   TCollection_AsciiString maxmem = " --max_memory ";
 
@@ -1025,7 +1031,9 @@ std::string HexoticPlugin_Hexotic::getHexoticCommand(const TCollection_AsciiStri
 
   run_Hexotic += in + Hexotic_In + out + Hexotic_Out;
   run_Hexotic += subdom + mode;
+#ifndef WIN32
   run_Hexotic += proc + nbproc;
+#endif
   run_Hexotic += verb + verbosity;
   run_Hexotic += maxmem + maxMemory;