#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() : "";
}