#include <TopoDS_Vertex.hxx>
#include <gp_Pnt.hxx>
+#include <Basics_DirUtils.hxx>
#include <Basics_Utils.hxx>
#include <GEOMImpl_Types.hxx>
#include <GEOM_wrap.hxx>
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 = " --read_sizemap ";
+ TCollection_AsciiString sizeMap = " --sizemap ";
TCollection_AsciiString ignoreRidges = " --compute_ridges no ", invalideElements = " --allow_invalid_elements yes ";
TCollection_AsciiString subdom = " --components ";
#ifndef WIN32
run_Hexotic += angle + sharpAngle;
if (_sizeMaps.begin() != _sizeMaps.end() && forExecutable )
- run_Hexotic += sizeMap + Hexotic_SizeMap_Prefix;
+ run_Hexotic += sizeMap + Hexotic_SizeMap_Prefix + ".sol";
if (_nbLayers > 0 &&
_firstLayerSize > 0 &&
SetParameters(_hypothesis);
- TCollection_AsciiString aTmpDir = _hexoticWorkingDirectory.c_str();
+ TCollection_AsciiString aTmpDir = Kernel_Utils::GetTmpDirByPath(_hexoticWorkingDirectory).c_str();
TCollection_AsciiString aQuote("");
#ifdef WIN32
aQuote = "\"";
{
MESSAGE("Use output file from blsurf as input file from hexotic: " << Hexotic_In);
mgHexa.SetUseExecutable();
+ mgHexa.SetInputFile( _blsurfHypo->GetGMFFile() );
defaultInputFile = false;
}
}
#define NOMINMAX
#endif
+#include <DriverGMF_Read.hxx>
#include <SMESH_Comment.hxx>
#include <SMESH_File.hxx>
#include <SMESH_MGLicenseKeyGen.hxx>
if ( iMesh == 1 && _isMesh )
{
switch ( what ) {
- case GmfVertices: _nbNodes = nb; break;
- case GmfEdges: _nbEdges = nb; break;
- case GmfTriangles: _nbFaces = nb; break;
+ case GmfVertices: _nbNodes += nb; break;
+ case GmfEdges: _nbEdges += nb; break;
+ case GmfTriangles: _nbFaces += nb; break;
default:;
}
}
::GmfSetKwd(iMesh, what, nb );
}
+//================================================================================
+/*!
+ * \brief Set GMF file made by MG-CADSurf to get nb of mesh entities from it
+ */
+//================================================================================
+
+void MG_Hexotic_API::SetInputFile( const std::string mesh2DFile )
+{
+ DriverGMF_Read fileReader;
+ fileReader.SetFile( mesh2DFile );
+
+ smIdType nbVertex, nbEdge, nbFace, nbVol;
+ if ( fileReader.GetMeshInfo(nbVertex, nbEdge, nbFace, nbVol))
+ {
+ _nbNodes += nbVertex;
+ _nbEdges += nbEdge;
+ _nbFaces += nbFace;
+ }
+}
+
//================================================================================
/*!
* \brief Add coordinates of a node
#endif
}
SMESH_File file( _logFile );
- return file.getPos();
+ return file.exists() ? file.getPos() : "";
}
bool IsLibrary();
bool IsExecutable() { return !IsLibrary(); }
void SetUseExecutable();
+ void SetInputFile( const std::string mesh2DFile );
// IN to MESHGEMS
int GmfOpenMesh(const char* theFile, int rdOrWr, int ver, int dim);