]> SALOME platform Git repositories - plugins/hexoticplugin.git/blobdiff - src/HexoticPlugin/HexoticPlugin_Hexotic.cxx
Salome HOME
Copyright update 2022
[plugins/hexoticplugin.git] / src / HexoticPlugin / HexoticPlugin_Hexotic.cxx
index 2e87506228ec5bac09bf435d7df1b250a675e50a..4c6ec601551f1b1eb749cba2a959241172d07a52 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2021  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2022  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
@@ -350,7 +350,8 @@ static void writeInput(MG_Hexotic_API*     theHexaInput,
                        const SMESHDS_Mesh* theMeshDS)
 {
   int meshID = theHexaInput->GmfOpenMesh( theFile, GmfWrite, GMFVERSION, GMFDIMENSION);
-  
+  theHexaInput->SetIsInputMesh( true ); // it's a mesh file
+
   // nodes
   int iN = 0;
   smIdType nbNodes = theMeshDS->NbNodes();
@@ -789,7 +790,8 @@ HexoticPlugin_Hexotic::getHexoticCommand(const TCollection_AsciiString& Hexotic_
   TCollection_AsciiString minl         = " --min_level ", maxl = " --max_level ", angle = " --ridge_angle ";
   TCollection_AsciiString mins         = " --min_size ", maxs = " --max_size ";
   TCollection_AsciiString in           = " --in ",   out  = " --out ";
-  TCollection_AsciiString sizeMap      = " --sizemap ";
+  TCollection_AsciiString sizeMap      = " --background_sizemap ";
+  TCollection_AsciiString sizeMapMesh  = " --background_mesh ";
   TCollection_AsciiString ignoreRidges = " --compute_ridges no ", invalideElements = " --allow_invalid_elements yes ";
   TCollection_AsciiString subdom       = " --components ";
 #ifndef WIN32
@@ -869,9 +871,10 @@ HexoticPlugin_Hexotic::getHexoticCommand(const TCollection_AsciiString& Hexotic_
 
   if (_hexoticSharpAngleThreshold > 0)
     run_Hexotic +=  angle + sharpAngle;
-  
-  if (_sizeMaps.begin() != _sizeMaps.end() && forExecutable )
-    run_Hexotic += sizeMap + Hexotic_SizeMap_Prefix + ".sol";
+
+  if ( !_sizeMaps.empty() && forExecutable )
+    run_Hexotic += ( sizeMap     + Hexotic_SizeMap_Prefix + ".sol " +
+                     sizeMapMesh + Hexotic_SizeMap_Prefix + ".mesh " );
 
   if (_nbLayers       > 0 &&
       _firstLayerSize > 0 &&
@@ -953,6 +956,8 @@ std::vector<std::string> HexoticPlugin_Hexotic::writeSizeMapFile( MG_Hexotic_API
     mgInput->GmfOpenMesh( myVerticesFile.c_str(), GmfWrite, GMFVERSION, GMFDIMENSION );  
   int solFileID =
     mgInput->GmfOpenMesh( mySolFile.c_str(), GmfWrite, GMFVERSION, GMFDIMENSION );
+
+  mgInput->SetIsInputMesh( false ); // they are not mesh files
   
   int pointsNumber = points.size();