Skip to content
Permalink
Browse files

update MDAL to 0.6.93 (#38443)

  • Loading branch information
PeterPetrik committed Aug 25, 2020
1 parent 46acc34 commit 8b08c479376bbd59e6211bea0c576735ba8da7c5
@@ -231,6 +231,16 @@ MDAL_EXPORT const char *MDAL_MeshNames( const char *uri );
*/
MDAL_EXPORT void MDAL_CloseMesh( MDAL_MeshH mesh );

/**
* Creates a empty mesh in memory
*
* \since MDAL 0.7
*
* \note the mesh is editable (vertices and faces can be added, see MDAL_M_addVertices() and MDAL_M_addFaces()),
* and can be saved with MDAL_SaveMesh()
*/
MDAL_EXPORT MDAL_MeshH MDAL_CreateMesh( MDAL_DriverH driver );

/**
* Saves mesh (only mesh structure) on a file with the specified driver. On error see MDAL_LastStatus for error type.
*/
@@ -242,12 +252,48 @@ MDAL_EXPORT void MDAL_SaveMesh( MDAL_MeshH mesh, const char *meshFile, const cha
*/
MDAL_EXPORT const char *MDAL_M_projection( MDAL_MeshH mesh );

/**
* Sets mesh projection
* not thread-safe and valid only till next call
*
* \since MDAL 0.7
*/
MDAL_EXPORT void MDAL_M_setProjection( MDAL_MeshH mesh, const char *projection );

/**
* Returns mesh extent in native projection
* Returns NaN on error
*/
MDAL_EXPORT void MDAL_M_extent( MDAL_MeshH mesh, double *minX, double *maxX, double *minY, double *maxY );

/**
* Adds vertices to the mesh
* \param mesh the mesh which the vertices are added
* \param vertexCount the count of vertices
* \param coordinates coordinates of vertices (x0,y0,z0,x1,y1,z1,...,xn,yn,zn)
*
* \note to avoid incompatible datasets, adding faces removes all the existing dataset group
*
* \since MDAL 0.7
*/
MDAL_EXPORT void MDAL_M_addVertices( MDAL_MeshH mesh, int vertexCount, double *coordinates );

/**
* Adds faces to the mesh
* \param mesh the mesh which the faces are added
* \param faceCount the count of faces
* \param faceSizes a pointer to an array of integer containing the number of vertices per each faces
* \param vertexIndices a pointer to an array of integer containing the indices of vertices of each faces
*
* \note to avoid incompatible datasets, adding faces removes all the existing dataset group
*
* \since MDAL 0.7
*/
MDAL_EXPORT void MDAL_M_addFaces( MDAL_MeshH mesh,
int faceCount,
int *faceSizes,
int *vertexIndices );

/**
* Returns vertex count for the mesh
*/
@@ -1060,7 +1060,7 @@ std::unique_ptr< MDAL::Mesh > MDAL::DriverFlo2D::load( const std::string &result
std::string mesh2DTopologyFile( fileNameFromDir( resultsFile, "FPLAIN.DAT" ) );
std::string mesh1DTopologyFile( fileNameFromDir( resultsFile, "CHAN.DAT" ) );

if ( meshName == "mesh2d" || fileExists( mesh2DTopologyFile ) )
if ( meshName == "mesh2d" || ( meshName.empty() && fileExists( mesh2DTopologyFile ) ) )
return loadMesh2d();

if ( meshName == "mesh1d" || fileExists( mesh1DTopologyFile ) )

0 comments on commit 8b08c47

Please sign in to comment.
You can’t perform that action at this time.