MeshKernel
|
Contains all structs and functions exposed at the API level. More...
Classes | |
struct | BoundingBox |
A struct describing a bounding box. More... | |
struct | Contacts |
A struct used to describe contacts between a 1d and a 2d mesh. More... | |
struct | CurvilinearGrid |
A struct used to describe the values of a curvilinear grid in a C-compatible manner. More... | |
struct | GeometryList |
A struct used to describe a list of geometries in a C-compatible manner. More... | |
struct | GriddedSamples |
A struct describing gridded samples. More... | |
struct | Mesh1D |
A struct used to describe the values of a mesh 1d in a C-compatible manner. More... | |
struct | Mesh2D |
A struct used to describe the values of an unstructured, two-dimensional mesh in a C-compatible manner. More... | |
struct | MeshKernelState |
The class holding the state of the C API library. More... | |
class | MKStateUndoAction |
Undo action for MeshKernelState. More... | |
Functions | |
MKERNEL_API double | mkernel_get_separator () |
Gets the double value used in the back-end library as separator and missing value. More... | |
MKERNEL_API double | mkernel_get_inner_outer_separator () |
Gets the double value used to separate the inner part of a polygon from its outer part. More... | |
MKERNEL_API int | mkernel_allocate_state (int projectionType, int &meshKernelId) |
Creates a new mesh state and returns the generated meshKernelId . More... | |
MKERNEL_API int | mkernel_is_valid_state (int meshKernelId, bool &isValid) |
Determine if the meshKernelId is valid. More... | |
MKERNEL_API int | mkernel_set_undo_size (int undoStackSize) |
Set the maximum size of the undo stack. More... | |
MKERNEL_API int | mkernel_undo_state (bool &undone, int &meshKernelId) |
Attempt to undo by one undo-action. More... | |
MKERNEL_API int | mkernel_undo_state_count (int &committedCount, int &restoredCount) |
Count the number of undo actions. More... | |
MKERNEL_API int | mkernel_undo_state_count_for_id (int meshKernelId, int &committedCount, int &restoredCount) |
Count the number of undo actions for a particular meshKernelId. More... | |
MKERNEL_API int | mkernel_redo_state (bool &redone, int &meshKernelId) |
Attempt to redo by one undo-action. More... | |
MKERNEL_API int | mkernel_clear_state () |
Clear all internal mesh kernel state and undo actions, no undo will be possible after this. More... | |
MKERNEL_API int | mkernel_clear_undo_state () |
Clear the undo state for all mesh kernel ids, no undo is possible after this. More... | |
MKERNEL_API int | mkernel_clear_undo_state_for_id (int meshKernelId) |
Clear the undo state for particular mesh kernel id, no undo for the id is possible after this. More... | |
MKERNEL_API int | mkernel_contacts_compute_boundary (int meshKernelId, const int *oneDNodeMask, const GeometryList &polygons, double searchRadius) |
Computes 1d-2d contacts, where 1d nodes are connected to the closest 2d faces at the boundary (ggeo_make1D2DRiverLinks_dll) More... | |
MKERNEL_API int | mkernel_contacts_compute_multiple (int meshKernelId, const int *oneDNodeMask) |
Computes 1d-2d contacts, where a single 1d node is connected to multiple 2d face circumcenters (ggeo_make1D2Dembeddedlinks_dll) More... | |
MKERNEL_API int | mkernel_contacts_compute_single (int meshKernelId, const int *oneDNodeMask, const GeometryList &polygons, double projectionFactor) |
Computes 1d-2d contacts, where each single 1d node is connected to one mesh2d face circumcenter (ggeo_make1D2Dinternalnetlinks_dll) More... | |
MKERNEL_API int | mkernel_contacts_compute_with_points (int meshKernelId, const int *oneDNodeMask, const GeometryList &points) |
Computes 1d-2d contacts, where 1d nodes are connected to the 2d faces mass centers containing the input point (ggeo_make1D2Dstreetinletpipes_dll) More... | |
MKERNEL_API int | mkernel_contacts_compute_with_polygons (int meshKernelId, const int *oneDNodeMask, const GeometryList &polygons) |
Computes 1d-2d contacts, where a 2d face per polygon is connected to the closest 1d node (ggeo_make1D2Droofgutterpipes_dll) More... | |
MKERNEL_API int | mkernel_contacts_get_data (int meshKernelId, Contacts &contacts) |
Gets the 1d-2d contacts indices (from index / to indices) More... | |
MKERNEL_API int | mkernel_contacts_get_dimensions (int meshKernelId, Contacts &contacts) |
Gets the number of 1d-2d contacts. More... | |
MKERNEL_API int | mkernel_contacts_set (int meshKernelId, const Contacts &contacts) |
Sets the 1d-2d contacts. More... | |
MKERNEL_API int | mkernel_curvilinear_compute_curvature (int meshKernelId, int direction, double *curvature) |
Computes the curvature of a curvilinear grid. More... | |
MKERNEL_API int | mkernel_curvilinear_compute_orthogonal_grid_from_splines (int meshKernelId, const GeometryList &geometryList, const meshkernel::CurvilinearParameters &curvilinearParameters, const meshkernel::SplinesToCurvilinearParameters &splinesToCurvilinearParameters) |
Generates curvilinear grid from splines with the advancing front method. More... | |
MKERNEL_API int | mkernel_curvilinear_compute_grid_from_splines (int meshKernelId, const GeometryList &geometryList, const meshkernel::CurvilinearParameters &curvilinearParameters) |
Generates curvilinear grid from splines. More... | |
MKERNEL_API int | mkernel_curvilinear_compute_smoothness (int meshKernelId, int direction, double *smoothness) |
Computes the smoothness of a curvilinear grid. More... | |
MKERNEL_API int | mkernel_curvilinear_compute_transfinite_from_polygon (int meshKernelId, const GeometryList &polygons, int firstNode, int secondNode, int thirdNode, int useFourthSide) |
Computes a curvilinear grid in a polygon. 3 separate polygon nodes need to be selected. More... | |
MKERNEL_API int | mkernel_curvilinear_compute_transfinite_from_splines (int meshKernelId, const GeometryList &splines, const meshkernel::CurvilinearParameters &curvilinearParameters) |
Generates curvilinear grid from splines with transfinite interpolation. More... | |
MKERNEL_API int | mkernel_curvilinear_compute_transfinite_from_triangle (int meshKernelId, const GeometryList &polygon, int firstNode, int secondNode, int thirdNode) |
Computes a curvilinear grid in a triangle. 3 separate polygon nodes need to be selected. More... | |
MKERNEL_API int | mkernel_curvilinear_convert_to_mesh2d (int meshKernelId) |
Converts a curvilinear grid to an unstructured mesh. | |
MKERNEL_API int | mkernel_curvilinear_delete_exterior (int meshKernelId, double xFirstPointCoordinate, double yFirstPointCoordinate, double xSecondPointCoordinate, double ySecondPointCoordinate) |
Delete the exterior part of a curvilinear gris. More... | |
MKERNEL_API int | mkernel_curvilinear_delete_interior (int meshKernelId, double xFirstPointCoordinate, double yFirstPointCoordinate, double xSecondPointCoordinate, double ySecondPointCoordinate) |
Delete the interior part of a curvilinear gris. More... | |
MKERNEL_API int | mkernel_curvilinear_delete_node (int meshKernelId, double xPointCoordinate, double yPointCoordinate) |
Delete the node closest to a point. More... | |
MKERNEL_API int | mkernel_curvilinear_delete_orthogonal_grid_from_splines (int meshKernelId) |
Finalizes curvilinear grid from splines algorithm. More... | |
MKERNEL_API int | mkernel_curvilinear_derefine (int meshKernelId, double xLowerLeftCorner, double yLowerLeftCorner, double xUpperRightCorner, double yUpperRightCorner) |
Directional curvilinear grid de-refinement. Grid lines are removed perpendicularly to the segment defined by lowerLeftCorner and xUpperRightCorner. More... | |
MKERNEL_API int | mkernel_curvilinear_finalize_line_shift (int meshKernelId) |
Resets the instance of the line shift algorithm in MeshKernelState. More... | |
MKERNEL_API int | mkernel_curvilinear_finalize_orthogonalize (int meshKernelId) |
Resets the CurvilinearGridOrthogonalization instance in MeshKernelState. More... | |
MKERNEL_API int | mkernel_curvilinear_get_data (int meshKernelId, CurvilinearGrid &curvilinearGrid) |
Gets the curvilinear grid data as a CurvilinearGrid struct (converted as set of edges and nodes) More... | |
MKERNEL_API int | mkernel_curvilinear_get_boundaries_as_polygons (int meshKernelId, int lowerLeftN, int lowerLeftM, int upperRightN, int upperRightM, GeometryList &boundaryPolygons) |
Gets the boundary polygon of a curvilinear grid, nodes with invalid coordinates are excluded. More... | |
MKERNEL_API int | mkernel_curvilinear_count_boundaries_as_polygons (int meshKernelId, int lowerLeftN, int lowerLeftM, int upperRightN, int upperRightM, int &numberOfPolygonNodes) |
Count the number of nodes in curvilinear grid boundary polygons. More... | |
MKERNEL_API int | mkernel_curvilinear_get_dimensions (int meshKernelId, CurvilinearGrid &curvilinearGrid) |
Gets the curvilinear grid dimensions as a CurvilinearGrid struct (converted as set of edges and nodes). More... | |
MKERNEL_API int | mkernel_curvilinear_get_location_index (int meshKernelId, double xCoordinate, double yCoordinate, int locationType, const BoundingBox &boundingBox, int &locationIndex) |
Gets the grid location closet to a specific coordinate. More... | |
MKERNEL_API int | mkernel_curvilinear_initialize_line_shift (int meshKernelId) |
Initializes the curvilinear line shift algorithm. More... | |
MKERNEL_API int | mkernel_curvilinear_initialize_orthogonal_grid_from_splines (int meshKernelId, const GeometryList &geometryList, const meshkernel::CurvilinearParameters &curvilinearParameters, const meshkernel::SplinesToCurvilinearParameters &splinesToCurvilinearParameters) |
Generates a curvilinear grid from splines with the advancing front method. Initialization step (interactive) More... | |
MKERNEL_API int | mkernel_curvilinear_initialize_orthogonalize (int meshKernelId, const meshkernel::OrthogonalizationParameters &orthogonalizationParameters) |
Initializes the orthogonal curvilinear algorithm. More... | |
MKERNEL_API int | mkernel_curvilinear_insert_face (int meshKernelId, double xCoordinate, double yCoordinate) |
Inserts a new face on a curvilinear grid. The new face will be inserted on top of the closest edge by linear extrapolation. More... | |
MKERNEL_API int | mkernel_curvilinear_iterate_orthogonal_grid_from_splines (int meshKernelId, int layer) |
One advancement of the front in curvilinear grid from splines (interactive) More... | |
MKERNEL_API int | mkernel_curvilinear_line_attraction_repulsion (int meshKernelId, double repulsionParameter, double xFirstNodeOnTheLine, double yFirstNodeOnTheLine, double xSecondNodeOnTheLine, double ySecondNodeOnTheLine, double xLowerLeftCorner, double yLowerLeftCorner, double xUpperRightCorner, double yUpperRightCorner) |
Attracts/repulses grid lines in a block towards another set grid line. More... | |
MKERNEL_API int | mkernel_curvilinear_line_mirror (int meshKernelId, double mirroringFactor, double xFirstGridLineNode, double yFirstGridLineNode, double xSecondGridLineNode, double ySecondGridLineNode) |
Mirrors a boundary gridline outwards. The boundary grid line is defined by its starting and ending points. More... | |
MKERNEL_API int | mkernel_curvilinear_line_shift (int meshKernelId) |
Computes the new grid, shifting the line towards the moved nodes and distributing the shifting in block specified before. More... | |
MKERNEL_API int | mkernel_curvilinear_compute_rectangular_grid (int meshKernelId, const meshkernel::MakeGridParameters &makeGridParameters) |
Computes a rectangular curvilinear grid. More... | |
MKERNEL_API int | mkernel_curvilinear_compute_rectangular_grid_from_polygon (int meshKernelId, const meshkernel::MakeGridParameters &makeGridParameters, const GeometryList &geometryList) |
Computes a rectangular curvilinear grid from polygon. More... | |
MKERNEL_API int | mkernel_curvilinear_compute_rectangular_grid_on_extension (int meshKernelId, const meshkernel::MakeGridParameters &makeGridParameters) |
Computes a rectangular curvilinear grid on a defined extension. More... | |
MKERNEL_API int | mkernel_curvilinear_compute_circular_grid (int meshKernelId, const meshkernel::MakeGridParameters ¶meters) |
Compute a rectangular or circular curvilinear grid. More... | |
MKERNEL_API int | mkernel_curvilinear_move_node (int meshKernelId, double xFromPoint, double yFromPoint, double xToPoint, double yToPoint) |
Moves a point of a curvilinear grid from one location to another. More... | |
MKERNEL_API int | mkernel_curvilinear_move_node_line_shift (int meshKernelId, double xFromCoordinate, double yFromCoordinate, double xToCoordinate, double yToCoordinate) |
Moves a node of the line to shift, the operation can be performed multiple times. More... | |
MKERNEL_API int | mkernel_curvilinear_orthogonalize (int meshKernelId) |
Orthogonalize a curvilinear grid. More... | |
MKERNEL_API int | mkernel_curvilinear_refine (int meshKernelId, double xLowerLeftCorner, double yLowerLeftCorner, double xUpperRightCorner, double yUpperRightCorner, int refinement) |
Directional curvilinear grid refinement. Additional gridlines are added perpendicularly to the segment defined by lowerLeftCorner and xUpperRightCorner. More... | |
MKERNEL_API int | mkernel_curvilinear_refresh_orthogonal_grid_from_splines (int meshKernelId) |
Converts curvilinear grid to mesh and refreshes the state (interactive) More... | |
MKERNEL_API int | mkernel_curvilinear_full_refine (int meshKernelId, int mRefinement, int nRefinement) |
Curvilinear grid refinement. Additional gridlines are added in both directions, over the entire grid. More... | |
MKERNEL_API int | mkernel_curvilinear_set (int meshKernelId, const CurvilinearGrid &grid) |
Sets the curvilinear grid. More... | |
MKERNEL_API int | mkernel_curvilinear_set_block_line_shift (int meshKernelId, double xLowerLeftCorner, double yLowerLeftCorner, double xUpperRightCorner, double yUpperRightCorner) |
Defines a block on the curvilinear where the shifting is distributed. More... | |
MKERNEL_API int | mkernel_curvilinear_set_block_orthogonalize (int meshKernelId, double xLowerLeftCorner, double yLowerLeftCorner, double xUpperRightCorner, double yUpperRightCorner) |
Define a block on the curvilinear grid where to perform orthogonalization. More... | |
MKERNEL_API int | mkernel_curvilinear_set_frozen_lines_orthogonalize (int meshKernelId, double xFirstGridLineNode, double yFirstGridLineNode, double xSecondGridLineNode, double ySecondGridLineNode) |
Freezes a line in the curvilinear orthogonalization process. More... | |
MKERNEL_API int | mkernel_curvilinear_set_line_line_shift (int meshKernelId, double xFirstGridLineNode, double yFirstGridLineNode, double xSecondGridLineNode, double ySecondGridLineNode) |
Sets the start and end nodes of the line to shift. More... | |
MKERNEL_API int | mkernel_curvilinear_smoothing (int meshKernelId, int smoothingIterations, double xLowerLeftCorner, double yLowerLeftCorner, double xUpperRightCorner, double yUpperRightCorner) |
Smooths a curvilinear grid. More... | |
MKERNEL_API int | mkernel_curvilinear_smoothing_directional (int meshKernelId, int smoothingIterations, double xFirstGridlineNode, double yFirstGridlineNode, double xSecondGridLineNode, double ySecondGridLineNode, double xLowerLeftCornerSmoothingArea, double yLowerLeftCornerSmoothingArea, double xUpperRightCornerSmootingArea, double yUpperRightCornerSmootingArea) |
Smooths a curvilinear grid along the direction specified by a segment. More... | |
MKERNEL_API int | mkernel_curvilinear_snap_to_landboundary (int meshKernelId, const GeometryList &land, double sectionControlPoint1x, double sectionControlPoint1y, double sectionControlPoint2x, double sectionControlPoint2y, double regionControlPointX=mkernel_get_separator(), double regionControlPointY=mkernel_get_separator()) |
Sets the curvilinear grid. More... | |
MKERNEL_API int | mkernel_curvilinear_snap_to_spline (int meshKernelId, const GeometryList &spline, double sectionControlPoint1x, double sectionControlPoint1y, double sectionControlPoint2x, double sectionControlPoint2y, double regionControlPointX=mkernel_get_separator(), double regionControlPointY=mkernel_get_separator()) |
Sets the curvilinear grid. More... | |
MKERNEL_API int | mkernel_deallocate_state (int meshKernelId) |
Deallocate mesh state. More... | |
MKERNEL_API int | mkernel_expunge_state (int meshKernelId) |
Deallocate mesh state and remove it completely, no undo for this meshKernelId will be possible after expunging. More... | |
MKERNEL_API int | mkernel_get_averaging_method_closest_point (int &method) |
Gets an int indicating the closest point averaging method type. More... | |
MKERNEL_API int | mkernel_get_averaging_method_inverse_distance_weighting (int &method) |
Gets an int indicating the inverse distance weights averaging method type. More... | |
MKERNEL_API int | mkernel_get_averaging_method_max (int &method) |
Gets an int indicating the max value averaging method type. More... | |
MKERNEL_API int | mkernel_get_averaging_method_min (int &method) |
Gets an int indicating the minimum averaging method type. More... | |
MKERNEL_API int | mkernel_get_averaging_method_min_absolute_value (int &method) |
Gets an int indicating the minimum absolute value averaging method type. More... | |
MKERNEL_API int | mkernel_get_averaging_method_simple_averaging (int &method) |
Gets an int indicating the simple averaging method type. More... | |
MKERNEL_API int | mkernel_get_edges_location_type (int &type) |
Gets an int indicating the edge location type. More... | |
MKERNEL_API int | mkernel_get_error (char *errorMessage) |
Gets pointer to error message. More... | |
MKERNEL_API int | mkernel_get_exit_code_success (int &exitCode) |
Gets the success exit code. More... | |
MKERNEL_API int | mkernel_get_exit_code_meshkernel_error (int &exitCode) |
Gets the exit code of an exception of type MeshKernelError. More... | |
MKERNEL_API int | mkernel_get_exit_code_not_implemented_error (int &exitCode) |
Gets the exit code of an exception of type NotImplementedCode. More... | |
MKERNEL_API int | mkernel_get_exit_code_algorithm_error (int &exitCode) |
Gets the exit code of an exception of type AlgorithmexitCode. More... | |
MKERNEL_API int | mkernel_get_exit_code_constraint_error (int &exitCode) |
Gets the exit code of an exception of type ConstraintexitCode. More... | |
MKERNEL_API int | mkernel_get_exit_code_mesh_geometry_error (int &exitCode) |
Gets the exit code of an exception of type MeshGeometryexitCode. More... | |
MKERNEL_API int | mkernel_get_exit_code_linear_algebra_error (int &exitCode) |
Gets the exit code of an exception of type LinearAlgebraexitCode. More... | |
MKERNEL_API int | mkernel_get_exit_code_range_error (int &exitCode) |
Gets the exit code of an exception of type RangeexitCode. More... | |
MKERNEL_API int | mkernel_get_exit_code_stdlib_exception (int &exitCode) |
Gets the exit code of an exception of type std::exception. More... | |
MKERNEL_API int | mkernel_get_exit_code_unknown_exception (int &exitCode) |
Gets the exit code of an exception of unknown type. More... | |
MKERNEL_API int | mkernel_get_faces_location_type (int &type) |
Gets an int indicating the faces location type. More... | |
MKERNEL_API int | mkernel_get_geometry_error (int &invalidIndex, int &type) |
Gets the index of the erroneous entity. More... | |
MKERNEL_API int | mkernel_get_interpolation_type_short (int &type) |
Get the integer indicating the interpolation type short. More... | |
MKERNEL_API int | mkernel_get_interpolation_type_float (int &type) |
Get the integer indicating the interpolation type float. More... | |
MKERNEL_API int | mkernel_get_interpolation_type_int (int &type) |
Get the integer indicating the interpolation type int. More... | |
MKERNEL_API int | mkernel_get_interpolation_type_double (int &type) |
Get the integer indicating the interpolation type double. More... | |
MKERNEL_API int | mkernel_get_nodes_location_type (int &type) |
Gets an int indicating the node location type. More... | |
MKERNEL_API int | mkernel_get_projection (int meshKernelId, int &projection) |
Gets the coordinate projection of the meshkernel state. More... | |
MKERNEL_API int | mkernel_get_projection_cartesian (int &projection) |
Gets an int indicating the cartesian projection. More... | |
MKERNEL_API int | mkernel_get_projection_spherical (int &projection) |
Gets an int indicating the spherical projection. More... | |
MKERNEL_API int | mkernel_get_projection_spherical_accurate (int &projection) |
Gets an int indicating the spherical accurate projection. More... | |
MKERNEL_API int | mkernel_get_splines (const GeometryList &geometryListIn, GeometryList &geometryListOut, int numberOfPointsBetweenNodes) |
Get the computed spline points between two corner nodes. More... | |
MKERNEL_API int | mkernel_get_version (char *version) |
Gets pointer to version string. More... | |
MKERNEL_API int | mkernel_mesh1d_get_data (int meshKernelId, Mesh1D &mesh1d) |
Gets the Mesh1D data. More... | |
MKERNEL_API int | mkernel_mesh1d_get_dimensions (int meshKernelId, Mesh1D &mesh1d) |
Gets the Mesh1D data dimensions. More... | |
MKERNEL_API int | mkernel_mesh1d_set (int meshKernelId, const Mesh1D &mesh1d) |
Sets the meshkernel::Mesh1D state. More... | |
MKERNEL_API int | mkernel_mesh1d_add (int meshKernelId, const Mesh1D &mesh1d) |
Adds a mesh to the meshkernel::Mesh1D state. More... | |
MKERNEL_API int | mkernel_mesh2d_averaging_interpolation (int meshKernelId, const GeometryList &samples, int locationType, int averagingMethodType, double relativeSearchSize, size_t minNumSamples, GeometryList &results) |
AveragingInterpolation interpolation (ec_module) More... | |
MKERNEL_API int | mkernel_mesh2d_compute_inner_ortogonalization_iteration (int meshKernelId) |
Performs inner orthogonalization iteration, by slowly moving the mesh nodes to new optimal positions (interactive mode). More... | |
MKERNEL_API int | mkernel_mesh2d_rotate (int meshKernelId, double centreX, double centreY, double theta) |
Rotate a mesh2d about a point. More... | |
MKERNEL_API int | mkernel_splines_snap_to_landboundary (int meshKernelId, const GeometryList &land, GeometryList &splines, int startSplineIndex, int endSplineIndex) |
Snaps the spline (or splines) to the land boundary. More... | |
MKERNEL_API int | mkernel_mesh2d_translate (int meshKernelId, double translationX, double translationY) |
Translate a mesh2d. More... | |
MKERNEL_API int | mkernel_mesh2d_casulli_derefinement_elements (int meshKernelId, GeometryList &elements) |
Get list of elements that will be removed after the Casulli de-refinement algorithm. More... | |
MKERNEL_API int | mkernel_mesh2d_casulli_derefinement_elements_on_polygon (int meshKernelId, const GeometryList &polygonGeometry, GeometryList &elements) |
Get list of elements that will be removed after the Casulli de-refinement algorithm. More... | |
MKERNEL_API int | mkernel_mesh2d_casulli_derefinement (int meshKernelId) |
De-refine mesh using the Casulli de-refinement algorithm. More... | |
MKERNEL_API int | mkernel_mesh2d_casulli_derefinement_on_polygon (int meshKernelId, const GeometryList &polygons) |
De-refine mesh using the Casulli de-refinement algorithm. More... | |
MKERNEL_API int | mkernel_mesh2d_casulli_refinement (int meshKernelId) |
Refine mesh using the Casulli refinement algorithm. More... | |
MKERNEL_API int | mkernel_mesh2d_casulli_refinement_on_polygon (int meshKernelId, const GeometryList &polygons) |
Refine mesh using the Casulli refinement algorithm. More... | |
MKERNEL_API int | mkernel_mesh2d_compute_orthogonalization (int meshKernelId, int projectToLandBoundaryOption, const meshkernel::OrthogonalizationParameters &orthogonalizationParameters, const GeometryList &selectingPolygon, const GeometryList &landBoundaries) |
MKERNEL_API int | mkernel_mesh2d_connect_meshes (int meshKernelId, const Mesh2D &mesh2d, double searchFraction) |
Connect two or more disconnected regions along boundary. More... | |
MKERNEL_API int | mkernel_mesh2d_convert_projection (int meshKernelId, int projectionType, const char *const zoneString) |
Converts the projection of a mesh2d. More... | |
MKERNEL_API int | mkernel_mesh2d_convert_to_curvilinear (int meshKernelId, double xPointCoordinate, double yPointCoordinate) |
Converts a mesh to a curvilinear mesh. More... | |
MKERNEL_API int | mkernel_mesh2d_count_hanging_edges (int meshKernelId, int &numEdges) |
Count the number of hanging edges in a mesh2d. An hanging edge is an edge where one of the two nodes is not connected. More... | |
MKERNEL_API int | mkernel_mesh2d_count_mesh_boundaries_as_polygons (int meshKernelId, int &numberOfPolygonNodes) |
Counts the number of polygon nodes contained in the mesh boundary polygons computed in function mkernel_mesh2d_get_mesh_boundaries_as_polygons More... | |
MKERNEL_API int | mkernel_mesh2d_count_nodes_in_polygons (int meshKernelId, const GeometryList &geometryListIn, int inside, int &numberOfMeshNodes) |
Counts the number of selected mesh node indices. More... | |
MKERNEL_API int | mkernel_mesh2d_count_obtuse_triangles (int meshKernelId, int &numObtuseTriangles) |
Gets the number of obtuse mesh2d triangles. Obtuse triangles are those having one edge longer than the sum of the other two. More... | |
MKERNEL_API int | mkernel_mesh2d_count_small_flow_edge_centers (int meshKernelId, double smallFlowEdgesLengthThreshold, int &numSmallFlowEdges) |
Counts the number of small mesh2d flow edges. The flow edges are the edges connecting faces circumcenters. More... | |
MKERNEL_API int | mkernel_mesh2d_delete (int meshKernelId, const GeometryList &polygon, int deletionOption, int invertDeletion) |
Deletes a mesh in a polygon using several options. More... | |
MKERNEL_API int | mkernel_mesh2d_delete_edge (int meshKernelId, double xCoordinate, double yCoordinate, double xLowerLeftBoundingBox, double yLowerLeftBoundingBox, double xUpperRightBoundingBox, double yUpperRightBoundingBox) |
Deletes the closest mesh2d edge to a point. The coordinates of the edge middle points are used for calculating the distances to the point. More... | |
MKERNEL_API int | mkernel_mesh2d_delete_edge_by_index (int meshKernelId, int edgeIndex) |
Deletes a mesh2d edge given the index of the edge. The coordinates of the edge middle points are used for calculating the distances to the point. More... | |
MKERNEL_API int | mkernel_mesh2d_delete_hanging_edges (int meshKernelId) |
Deletes all hanging edges. An hanging edge is an edge where one of the two nodes is not connected. More... | |
MKERNEL_API int | mkernel_mesh2d_delete_node (int meshKernelId, int nodeIndex) |
Deletes a mesh2d node. More... | |
MKERNEL_API int | mkernel_mesh2d_delete_orthogonalization (int meshKernelId) |
Cleans the orthogonalization algorithm state, allocated in mkernel_mesh2d_initialize_orthogonalization (interactive mode) More... | |
MKERNEL_API int | mkernel_mesh2d_delete_small_flow_edges_and_small_triangles (int meshKernelId, double smallFlowEdgesThreshold, double minFractionalAreaTriangles) |
Deletes all small mesh2d flow edges and small triangles. The flow edges are the edges connecting faces circumcenters. More... | |
MKERNEL_API int | mkernel_mesh2d_finalize_inner_ortogonalization_iteration (int meshKernelId) |
Finalizes the orthogonalization outer iteration, computing the new coefficients for grid adaption and the new face circumcenters (interactive mode). More... | |
MKERNEL_API int | mkernel_mesh2d_flip_edges (int meshKernelId, int isTriangulationRequired, int projectToLandBoundaryRequired, const GeometryList &selectingPolygon, const GeometryList &landBoundaries) |
Flips mesh2d edges, to optimize the mesh smoothness. This operation is usually performed after mkernel_mesh2d_refine_based_on_samples or mkernel_mesh2d_refine_based_on_polygon . More... | |
MKERNEL_API int | mkernel_mesh2d_get_closest_node (int meshKernelId, double xCoordinateIn, double yCoordinateIn, double searchRadius, double xLowerLeftBoundingBox, double yLowerLeftBoundingBox, double xUpperRightBoundingBox, double yUpperRightBoundingBox, double &xCoordinateOut, double &yCoordinateOut) |
Gets the closest mesh2d node coordinates to a point, searching within a radius. More... | |
MKERNEL_API int | mkernel_mesh2d_get_data (int meshKernelId, Mesh2D &mesh2d) |
Gets the Mesh2D dimensions data. More... | |
MKERNEL_API int | mkernel_mesh2d_get_orthogonality_property_type (int &type) |
Gets an int indicating the orthogonality property type for mesh2d. More... | |
MKERNEL_API int | mkernel_mesh2d_get_node_edge_data (int meshKernelId, Mesh2D &mesh2d) |
Gets only the node and edge Mesh2D data. More... | |
MKERNEL_API int | mkernel_mesh2d_get_dimensions (int meshKernelId, Mesh2D &mesh2d) |
Gets the Mesh2D dimensions. More... | |
MKERNEL_API int | mkernel_mesh2d_get_edge (int meshKernelId, double xCoordinate, double yCoordinate, double xLowerLeftBoundingBox, double yLowerLeftBoundingBox, double xUpperRightBoundingBox, double yUpperRightBoundingBox, int &edgeIndex) |
Gets the closest mesh2d edge to a point in a bounding box. More... | |
MKERNEL_API int | mkernel_mesh2d_get_hanging_edges (int meshKernelId, int *edges) |
Gets the indices of hanging edges. An hanging edge is an edge where one of the two nodes is not connected. More... | |
MKERNEL_API int | mkernel_mesh2d_get_face_polygons (int meshKernelId, int numEdges, const GeometryList &facePolygons) |
Gets the faces polygons with a number of edges larger or equal to numEdges. More... | |
MKERNEL_API int | mkernel_mesh2d_get_face_polygons_dimension (int meshKernelId, int numEdges, int &geometryListDimension) |
Gets the dimension of faces polygons with a number of edges larger or equal to numNodes. More... | |
MKERNEL_API int | mkernel_mesh2d_get_filtered_face_polygons_dimension (int meshKernelId, int propertyValue, double minValue, double maxValue, int &geometryListDimension) |
Retrieves the dimension of the geometry list containing the face polygons within the filtering range. More... | |
MKERNEL_API int | mkernel_mesh2d_get_filtered_face_polygons (int meshKernelId, int propertyValue, double minValue, double maxValue, const GeometryList &facePolygons) |
Gets the geometry list containing the face polygons within the filtering range. More... | |
MKERNEL_API int | mkernel_mesh2d_get_location_index (int meshKernelId, double xCoordinate, double yCoordinate, int locationType, const BoundingBox &boundingBox, int &locationIndex) |
Gets the mesh location closet to a specific coordinate. More... | |
MKERNEL_API int | mkernel_mesh2d_get_mesh_boundaries_as_polygons (int meshKernelId, GeometryList &boundaryPolygons) |
Retrieves the boundaries of a mesh as a series of separated polygons. More... | |
MKERNEL_API int | mkernel_mesh2d_get_node_index (int meshKernelId, double xCoordinate, double yCoordinate, double searchRadius, double xLowerLeftBoundingBox, double yLowerLeftBoundingBox, double xUpperRightBoundingBox, double yUpperRightBoundingBox, int &nodeIndex) |
Finds the mesh2d node closest to a point, within a search radius. More... | |
MKERNEL_API int | mkernel_mesh2d_get_nodes_in_polygons (int meshKernelId, const GeometryList &geometryListIn, int inside, int *selectedNodes) |
Gets the indices of the mesh2d nodes selected with a polygon. More... | |
MKERNEL_API int | mkernel_mesh2d_get_obtuse_triangles_mass_centers (int meshKernelId, GeometryList &result) |
Gets the mass centers of obtuse mesh2d triangles. Obtuse triangles are those having one edge longer than the sum of the other two. More... | |
MKERNEL_API int | mkernel_mesh2d_get_orthogonality (int meshKernelId, GeometryList &geometryList) |
Gets the mesh orthogonality, expressed as the ratio between the edges and the segments connecting the face circumcenters. More... | |
MKERNEL_API int | mkernel_mesh2d_get_property (int meshKernelId, int propertyValue, const GeometryList &geometrylist) |
Retrieves a specified property of a 2D mesh. More... | |
MKERNEL_API int | mkernel_mesh2d_get_property_dimension (int meshKernelId, int propertyValue, int &dimension) |
The dimension of a specified property of a 2D mesh. More... | |
MKERNEL_API int | mkernel_mesh2d_get_small_flow_edge_centers (int meshKernelId, double smallFlowEdgesThreshold, GeometryList &result) |
Gets the small mesh2d flow edges. The flow edges are the edges connecting faces circumcenters. More... | |
MKERNEL_API int | mkernel_mesh2d_get_smoothness (int meshKernelId, GeometryList &geometryList) |
Gets the smoothness, expressed as the ratio between the values of two neighboring faces areas. More... | |
MKERNEL_API int | mkernel_mesh2d_initialize_orthogonalization (int meshKernelId, int projectToLandBoundaryOption, meshkernel::OrthogonalizationParameters &orthogonalizationParameters, const GeometryList &selectingPolygon, const GeometryList &landBoundaries) |
Initialization of the meshkernel::OrthogonalizationAndSmoothing algorithm. More... | |
MKERNEL_API int | mkernel_mesh2d_insert_edge (int meshKernelId, int startNode, int endNode, int &newEdgeIndex) |
Insert a new mesh2d edge connecting two nodes. More... | |
MKERNEL_API int | mkernel_mesh2d_insert_edge_from_coordinates (int meshKernelId, double firstNodeX, double firstNodeY, double secondNodeX, double secondNodeY, int &firstNodeIndex, int &secondNodeIndex, int &edgeIndex) |
Insert a new mesh2d edge from 2 coordinates. More... | |
MKERNEL_API int | mkernel_mesh2d_insert_node (int meshKernelId, double xCoordinate, double yCoordinate, int &nodeIndex) |
Insert a new mesh2d node at a specific coordinate. More... | |
MKERNEL_API int | mkernel_mesh2d_intersections_from_polygon (int meshKernelId, const GeometryList &boundaryPolygon, int *edgeNodes, int *edgeIndex, double *edgeDistances, double *segmentDistances, int *segmentIndexes, int *faceIndexes, int *faceNumEdges, int *faceEdgeIndex) |
Gets the edges intersected by a polygon, with additional information on the intersections. More... | |
MKERNEL_API int | mkernel_mesh2d_make_global (int meshKernelId, int numLongitudeNodes, int numLatitudeNodes) |
Compute the global mesh with a given number of points along the longitude and latitude directions. More... | |
MKERNEL_API int | mkernel_mesh2d_make_triangular_mesh_from_polygon (int meshKernelId, const GeometryList &polygonPoints) |
Generates a triangular mesh2d grid within a polygon. The size of the triangles is determined from the length of the polygon edges. More... | |
MKERNEL_API int | mkernel_mesh2d_make_triangular_mesh_from_samples (int meshKernelId, const GeometryList &samples) |
Makes a triangular mesh from a set of samples, triangulating the sample points. More... | |
MKERNEL_API int | mkernel_mesh2d_make_rectangular_mesh (int meshKernelId, const meshkernel::MakeGridParameters &makeGridParameters) |
Makes a rectangular mesh. More... | |
MKERNEL_API int | mkernel_mesh2d_make_rectangular_mesh_from_polygon (int meshKernelId, const meshkernel::MakeGridParameters &makeGridParameters, const GeometryList &geometryList) |
Makes a rectangular mesh from a polygon. More... | |
MKERNEL_API int | mkernel_mesh2d_make_rectangular_mesh_on_extension (int meshKernelId, const meshkernel::MakeGridParameters &makeGridParameters) |
Makes a rectangular mesh on a defined extension. More... | |
MKERNEL_API int | mkernel_mesh2d_merge_nodes (int meshKernelId, const GeometryList &geometryListIn) |
Merges the mesh2d nodes within a distance of 0.001 m, effectively removing all small edges. More... | |
MKERNEL_API int | mkernel_mesh2d_merge_nodes_with_merging_distance (int meshKernelId, const GeometryList &geometryListIn, double mergingDistance) |
Merges the mesh2d nodes within a distance of 0.001 m, effectively removing all small edges. More... | |
MKERNEL_API int | mkernel_mesh2d_merge_two_nodes (int meshKernelId, int firstNode, int secondNode) |
Merges two mesh2d nodes into one. More... | |
MKERNEL_API int | mkernel_mesh2d_move_node (int meshKernelId, double xCoordinate, double yCoordinate, int nodeIndex) |
Moves a mesh2d node to a new position. More... | |
MKERNEL_API int | mkernel_mesh2d_prepare_outer_iteration_orthogonalization (int meshKernelId) |
Prepares an outer orthogonalization iteration, computing the new orthogonalization and smoothing weights from the modified mesh geometry (in interactive mode). More... | |
MKERNEL_API int | mkernel_mesh2d_refine_based_on_gridded_samples (int meshKernelId, const GriddedSamples &griddedSamples, const meshkernel::MeshRefinementParameters &meshRefinementParameters, bool useNodalRefinement) |
Refine based on gridded samples. More... | |
MKERNEL_API int | mkernel_mesh2d_refine_based_on_polygon (int meshKernelId, const GeometryList &geometryList, const meshkernel::MeshRefinementParameters &meshRefinementParameters) |
Refines a mesh2d within a polygon. Refinement is achieved by splitting the edges contained in the polygon by two. More... | |
MKERNEL_API int | mkernel_mesh2d_refine_based_on_samples (int meshKernelId, const GeometryList &samples, double relativeSearchRadius, int minimumNumSamples, const meshkernel::MeshRefinementParameters &meshRefinementParameters) |
Refines a mesh2d based on samples. Refinement is achieved by successive splits of the face edges. More... | |
MKERNEL_API int | mkernel_mesh2d_refine_ridges_based_on_gridded_samples (int meshKernelId, const GriddedSamples &griddedSamples, double relativeSearchRadius, int minimumNumSamples, int numberOfSmoothingIterations, const meshkernel::MeshRefinementParameters &meshRefinementParameters) |
Refines a mesh2d based on samples with ridge refinement. This method automatically detects the ridges in a sample set. More... | |
MKERNEL_API int | mkernel_mesh2d_remove_disconnected_regions (int meshKernelId) |
Remove any disconnected regions from a mesh2d. More... | |
MKERNEL_API int | mkernel_mesh2d_set (int meshKernelId, const Mesh2D &mesh2d) |
Sets the meshkernel::Mesh2D state. More... | |
MKERNEL_API int | mkernel_mesh2d_snap_to_landboundary (int meshKernelId, const GeometryList &selectingPolygon, const GeometryList &landBoundaries) |
Snaps a mesh to a land boundary. More... | |
MKERNEL_API int | mkernel_mesh2d_split_row (int meshKernelId, int firstNode, int secondNode) |
An-isotropically refines the elements along a row or column, given a starting edge. More... | |
MKERNEL_API int | mkernel_mesh2d_add (int meshKernelId, const Mesh2D &mesh2d) |
Adds a mesh to the meshkernel::Mesh2D state. More... | |
MKERNEL_API int | mkernel_mesh2d_triangulation_interpolation (int meshKernelId, const GeometryList &samples, int locationType, GeometryList &results) |
Triangle interpolation (ec_module) More... | |
MKERNEL_API int | mkernel_network1d_compute_fixed_chainages (int meshKernelId, double *fixedChainages, int sizeFixedChainages, double minFaceSize, double fixedChainagesOffset) |
Compute the network chainages from fixed point locations. More... | |
MKERNEL_API int | mkernel_network1d_compute_offsetted_chainages (int meshKernelId, double offset) |
Compute the network chainages at a regular offset. More... | |
MKERNEL_API int | mkernel_network1d_set (int meshKernelId, const GeometryList &polylines) |
Sets the meshkernel::Network1D state. More... | |
MKERNEL_API int | mkernel_network1d_to_mesh1d (int meshKernelId, double minFaceSize) |
Convert network chainages to mesh1d nodes and edges. More... | |
MKERNEL_API int | mkernel_polygon_count_offset (int meshKernelId, const GeometryList &geometryListIn, int innerPolygon, double distance, int &numberOfPolygonNodes) |
Counts the number of polygon nodes resulting from polygon offset. More... | |
MKERNEL_API int | mkernel_polygon_count_refine (int meshKernelId, const GeometryList &polygonToRefine, int firstIndex, int secondIndex, double distance, int &numberOfPolygonNodes) |
Counts the number of polygon nodes resulting from polygon refinement with mkernel_polygon_refine . More... | |
MKERNEL_API int | mkernel_polygon_count_linear_refine (int meshKernelId, const GeometryList &polygonToRefine, int firstIndex, int secondIndex, int &numberOfPolygonNodes) |
Counts the number of polygon nodes resulting from polygon refinement with mkernel_polygon_linear_refine . More... | |
MKERNEL_API int | mkernel_polygon_get_included_points (int meshKernelId, const GeometryList &selectingPolygon, const GeometryList &polygonToSelect, GeometryList &selectionResults) |
Selects the polygon nodes within another polygon. More... | |
MKERNEL_API int | mkernel_polygon_get_offset (int meshKernelId, const GeometryList &geometryListIn, int inWard, double distance, GeometryList &geometryListOut) |
Generate a new polygon from an existing one by offsetting the perimeter by a given distance. More... | |
MKERNEL_API int | mkernel_polygon_refine (int meshKernelId, const GeometryList &polygonToRefine, int firstNodeIndex, int secondNodeIndex, double targetEdgeLength, GeometryList &refinedPolygon) |
Refines the polygon perimeter between two nodes. This interval is refined to achieve a target edge length. More... | |
MKERNEL_API int | mkernel_polygon_linear_refine (int meshKernelId, const GeometryList &polygonToRefine, int firstNodeIndex, int secondNodeIndex, GeometryList &refinedPolygon) |
Linear refines the polygon perimeter between two nodes. More... | |
MKERNEL_API int | mkernel_polygon_snap_to_landboundary (int meshKernelId, const GeometryList &land, GeometryList &polygon, int startIndex, int endIndex) |
Snaps the polygon to the land boundary. More... | |
Contains all structs and functions exposed at the API level.
MKERNEL_API int meshkernelapi::mkernel_allocate_state | ( | int | projectionType, |
int & | meshKernelId | ||
) |
Creates a new mesh state and returns the generated meshKernelId
.
[in] | projectionType | Cartesian (0), spherical (1) or spherical accurate(2) state |
[out] | meshKernelId | The id of the mesh state |
MKERNEL_API int meshkernelapi::mkernel_clear_state | ( | ) |
Clear all internal mesh kernel state and undo actions, no undo will be possible after this.
MKERNEL_API int meshkernelapi::mkernel_clear_undo_state | ( | ) |
Clear the undo state for all mesh kernel ids, no undo is possible after this.
MKERNEL_API int meshkernelapi::mkernel_clear_undo_state_for_id | ( | int | meshKernelId | ) |
Clear the undo state for particular mesh kernel id, no undo for the id is possible after this.
[in] | meshKernelId | The id of the mesh state |
MKERNEL_API int meshkernelapi::mkernel_contacts_compute_boundary | ( | int | meshKernelId, |
const int * | oneDNodeMask, | ||
const GeometryList & | polygons, | ||
double | searchRadius | ||
) |
Computes 1d-2d contacts, where 1d nodes are connected to the closest 2d faces at the boundary (ggeo_make1D2DRiverLinks_dll)
[in] | meshKernelId | The id of the mesh state. |
[in] | oneDNodeMask | The mask to apply to 1d nodes (1 = generate a connection, 0 = do not generate a connection) |
[in] | polygons | The points selecting the faces to connect. |
[in] | searchRadius | The radius used for searching neighboring faces, if equal to constants::missing::doubleValue, the search radius will be calculated internally. |
MKERNEL_API int meshkernelapi::mkernel_contacts_compute_multiple | ( | int | meshKernelId, |
const int * | oneDNodeMask | ||
) |
Computes 1d-2d contacts, where a single 1d node is connected to multiple 2d face circumcenters (ggeo_make1D2Dembeddedlinks_dll)
[in] | meshKernelId | The id of the mesh state |
[in] | oneDNodeMask | The mask to apply to 1d nodes (1 = generate a connection, 0 = do not generate a connection) |
MKERNEL_API int meshkernelapi::mkernel_contacts_compute_single | ( | int | meshKernelId, |
const int * | oneDNodeMask, | ||
const GeometryList & | polygons, | ||
double | projectionFactor | ||
) |
Computes 1d-2d contacts, where each single 1d node is connected to one mesh2d face circumcenter (ggeo_make1D2Dinternalnetlinks_dll)
[in] | meshKernelId | The id of the mesh state |
[in] | oneDNodeMask | The mask to apply to 1d nodes (1 = connect node, 0 = do not connect) |
[in] | polygons | The polygons selecting the area where the 1d-2d contacts will be generated. |
[in] | projectionFactor | The projection factor used for generating links when 1d nodes are not inside mesh2d |
MKERNEL_API int meshkernelapi::mkernel_contacts_compute_with_points | ( | int | meshKernelId, |
const int * | oneDNodeMask, | ||
const GeometryList & | points | ||
) |
Computes 1d-2d contacts, where 1d nodes are connected to the 2d faces mass centers containing the input point (ggeo_make1D2Dstreetinletpipes_dll)
[in] | meshKernelId | The id of the mesh state |
[in] | oneDNodeMask | The mask to apply to 1d nodes (1 = generate a connection, 0 = do not generate a connection) |
[in] | points | The points selecting the faces to connect |
MKERNEL_API int meshkernelapi::mkernel_contacts_compute_with_polygons | ( | int | meshKernelId, |
const int * | oneDNodeMask, | ||
const GeometryList & | polygons | ||
) |
Computes 1d-2d contacts, where a 2d face per polygon is connected to the closest 1d node (ggeo_make1D2Droofgutterpipes_dll)
[in] | meshKernelId | The id of the mesh state |
[in] | oneDNodeMask | The mask to apply to 1d nodes (1 = generate a connection, 0 = do not generate a connection) |
[in] | polygons | The polygons to connect |
MKERNEL_API int meshkernelapi::mkernel_contacts_get_data | ( | int | meshKernelId, |
Contacts & | contacts | ||
) |
Gets the 1d-2d contacts indices (from index / to indices)
[in] | meshKernelId | The id of the mesh state |
[out] | contacts | Contacts data |
MKERNEL_API int meshkernelapi::mkernel_contacts_get_dimensions | ( | int | meshKernelId, |
Contacts & | contacts | ||
) |
Gets the number of 1d-2d contacts.
[in] | meshKernelId | The id of the mesh state |
[out] | contacts | Contacts data |
MKERNEL_API int meshkernelapi::mkernel_contacts_set | ( | int | meshKernelId, |
const Contacts & | contacts | ||
) |
Sets the 1d-2d contacts.
[in] | meshKernelId | The id of the mesh state |
[out] | contacts | Contacts data |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_compute_circular_grid | ( | int | meshKernelId, |
const meshkernel::MakeGridParameters & | parameters | ||
) |
Compute a rectangular or circular curvilinear grid.
[in] | meshKernelId | The id of the mesh state |
[in] | parameters | The structure containing the make grid parameters |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_compute_curvature | ( | int | meshKernelId, |
int | direction, | ||
double * | curvature | ||
) |
Computes the curvature of a curvilinear grid.
[in] | meshKernelId | The id of the mesh state |
[in] | direction | The direction in which to compute the curvature |
[out] | curvature | The grid curvature values in the selected direction |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_compute_grid_from_splines | ( | int | meshKernelId, |
const GeometryList & | geometryList, | ||
const meshkernel::CurvilinearParameters & | curvilinearParameters | ||
) |
Generates curvilinear grid from splines.
[in] | meshKernelId | The id of the mesh state |
[in] | geometryList | The input splines corners |
[in] | curvilinearParameters | The input parameters to generate the curvilinear grid |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_compute_orthogonal_grid_from_splines | ( | int | meshKernelId, |
const GeometryList & | geometryList, | ||
const meshkernel::CurvilinearParameters & | curvilinearParameters, | ||
const meshkernel::SplinesToCurvilinearParameters & | splinesToCurvilinearParameters | ||
) |
Generates curvilinear grid from splines with the advancing front method.
[in] | meshKernelId | The id of the mesh state |
[in] | geometryList | The input splines corners |
[in] | curvilinearParameters | The input parameters to generate the curvilinear grid |
[in] | splinesToCurvilinearParameters | The parameters of the advancing front algorithm |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_compute_rectangular_grid | ( | int | meshKernelId, |
const meshkernel::MakeGridParameters & | makeGridParameters | ||
) |
Computes a rectangular curvilinear grid.
[in] | meshKernelId | The id of the mesh state |
[in] | makeGridParameters | The structure containing the make grid parameters |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_compute_rectangular_grid_from_polygon | ( | int | meshKernelId, |
const meshkernel::MakeGridParameters & | makeGridParameters, | ||
const GeometryList & | geometryList | ||
) |
Computes a rectangular curvilinear grid from polygon.
[in] | meshKernelId | The id of the mesh state |
[in] | makeGridParameters | The structure containing the make grid parameters |
[in] | geometryList | The polygons to account for |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_compute_rectangular_grid_on_extension | ( | int | meshKernelId, |
const meshkernel::MakeGridParameters & | makeGridParameters | ||
) |
Computes a rectangular curvilinear grid on a defined extension.
[in] | meshKernelId | The id of the mesh state |
[in] | makeGridParameters | The structure containing the make grid parameters |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_compute_smoothness | ( | int | meshKernelId, |
int | direction, | ||
double * | smoothness | ||
) |
Computes the smoothness of a curvilinear grid.
[in] | meshKernelId | The id of the mesh state |
[in] | direction | The direction in which to compute the smoothness |
[out] | smoothness | The grid smoothness values in the selected direction |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_compute_transfinite_from_polygon | ( | int | meshKernelId, |
const GeometryList & | polygons, | ||
int | firstNode, | ||
int | secondNode, | ||
int | thirdNode, | ||
int | useFourthSide | ||
) |
Computes a curvilinear grid in a polygon. 3 separate polygon nodes need to be selected.
[in] | meshKernelId | The id of the mesh state |
[in] | polygons | The input polygons |
[in] | firstNode | The first selected node |
[in] | secondNode | The second selected node |
[in] | thirdNode | The third selected node |
[in] | useFourthSide | Use the fourth polygon side to compute the curvilinear grid (0 no, 1 yes) |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_compute_transfinite_from_splines | ( | int | meshKernelId, |
const GeometryList & | splines, | ||
const meshkernel::CurvilinearParameters & | curvilinearParameters | ||
) |
Generates curvilinear grid from splines with transfinite interpolation.
[in] | meshKernelId | The id of the mesh state |
[in] | splines | The splines to use for curvilinear grid generation |
[in] | curvilinearParameters | The curvilinear parameters |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_compute_transfinite_from_triangle | ( | int | meshKernelId, |
const GeometryList & | polygon, | ||
int | firstNode, | ||
int | secondNode, | ||
int | thirdNode | ||
) |
Computes a curvilinear grid in a triangle. 3 separate polygon nodes need to be selected.
[in] | meshKernelId | The id of the mesh state |
[in] | polygon | The input polygons |
[in] | firstNode | The first selected node |
[in] | secondNode | The second selected node |
[in] | thirdNode | The third node |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_count_boundaries_as_polygons | ( | int | meshKernelId, |
int | lowerLeftN, | ||
int | lowerLeftM, | ||
int | upperRightN, | ||
int | upperRightM, | ||
int & | numberOfPolygonNodes | ||
) |
Count the number of nodes in curvilinear grid boundary polygons.
[in] | meshKernelId | The id of the mesh state |
[in] | lowerLeftN | The n index of the lower left corner |
[in] | lowerLeftM | The m index of the lower left corner |
[in] | upperRightN | The n index of the upper right corner |
[in] | upperRightM | The m index of the upper right corner |
[out] | numberOfPolygonNodes | The number of polygon nodes |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_delete_exterior | ( | int | meshKernelId, |
double | xFirstPointCoordinate, | ||
double | yFirstPointCoordinate, | ||
double | xSecondPointCoordinate, | ||
double | ySecondPointCoordinate | ||
) |
Delete the exterior part of a curvilinear gris.
meshKernelId | The id of the mesh state | |
[in] | xFirstPointCoordinate | The x coordinate of the first point |
[in] | yFirstPointCoordinate | The y coordinate of the first point |
[in] | xSecondPointCoordinate | The x coordinate of the second point |
[in] | ySecondPointCoordinate | The y coordinate of the second point |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_delete_interior | ( | int | meshKernelId, |
double | xFirstPointCoordinate, | ||
double | yFirstPointCoordinate, | ||
double | xSecondPointCoordinate, | ||
double | ySecondPointCoordinate | ||
) |
Delete the interior part of a curvilinear gris.
meshKernelId | The id of the mesh state | |
[in] | xFirstPointCoordinate | The x coordinate of the first point |
[in] | yFirstPointCoordinate | The y coordinate of the first point |
[in] | xSecondPointCoordinate | The x coordinate of the second point |
[in] | ySecondPointCoordinate | The y coordinate of the second point |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_delete_node | ( | int | meshKernelId, |
double | xPointCoordinate, | ||
double | yPointCoordinate | ||
) |
Delete the node closest to a point.
meshKernelId | The id of the mesh state | |
[in] | xPointCoordinate | The x coordinate of the point |
[in] | yPointCoordinate | The y coordinate of the point |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_delete_orthogonal_grid_from_splines | ( | int | meshKernelId | ) |
Finalizes curvilinear grid from splines algorithm.
[in] | meshKernelId | The id of the mesh state |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_derefine | ( | int | meshKernelId, |
double | xLowerLeftCorner, | ||
double | yLowerLeftCorner, | ||
double | xUpperRightCorner, | ||
double | yUpperRightCorner | ||
) |
Directional curvilinear grid de-refinement. Grid lines are removed perpendicularly to the segment defined by lowerLeftCorner and xUpperRightCorner.
firstPoint
and secondPoint
must lie on the same grid line.
meshKernelId | The id of the mesh state. | |
[in] | xLowerLeftCorner | The x coordinate of the lower left corner of the block to de-refine |
[in] | yLowerLeftCorner | The y coordinate of the lower left corner of the block to de-refine |
[in] | xUpperRightCorner | The x coordinate of the upper right corner of the block to de-refine |
[in] | yUpperRightCorner | The y coordinate of the upper right corner of the block to de-refine |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_finalize_line_shift | ( | int | meshKernelId | ) |
Resets the instance of the line shift algorithm in MeshKernelState.
[in] | meshKernelId | The id of the mesh state |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_finalize_orthogonalize | ( | int | meshKernelId | ) |
Resets the CurvilinearGridOrthogonalization instance in MeshKernelState.
[in] | meshKernelId | The id of the mesh state |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_full_refine | ( | int | meshKernelId, |
int | mRefinement, | ||
int | nRefinement | ||
) |
Curvilinear grid refinement. Additional gridlines are added in both directions, over the entire grid.
[in] | meshKernelId | The id of the mesh state. |
[in] | mRefinement | The amount of refinement to compute in m-direction |
[in] | nRefinement | The amount of refinement to compute in n-direction |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_get_boundaries_as_polygons | ( | int | meshKernelId, |
int | lowerLeftN, | ||
int | lowerLeftM, | ||
int | upperRightN, | ||
int | upperRightM, | ||
GeometryList & | boundaryPolygons | ||
) |
Gets the boundary polygon of a curvilinear grid, nodes with invalid coordinates are excluded.
[in] | meshKernelId | The id of the mesh state |
[in] | lowerLeftN | The n index of the lower left corner |
[in] | lowerLeftM | The m index of the lower left corner |
[in] | upperRightN | The n index of the upper right corner |
[in] | upperRightM | The m index of the upper right corner |
[out] | boundaryPolygons | The geometry list containing the boundary polygons |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_get_data | ( | int | meshKernelId, |
CurvilinearGrid & | curvilinearGrid | ||
) |
Gets the curvilinear grid data as a CurvilinearGrid struct (converted as set of edges and nodes)
This function ought to be called after mkernel_get_curvilinear_dimension
has been called and the pointers have been set to correctly sized memory.
[in] | meshKernelId | The id of the mesh state |
[out] | curvilinearGrid | The structure containing the curvilinear grid arrays. |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_get_dimensions | ( | int | meshKernelId, |
CurvilinearGrid & | curvilinearGrid | ||
) |
Gets the curvilinear grid dimensions as a CurvilinearGrid struct (converted as set of edges and nodes).
The integer parameters of the CurvilinearGrid struct are set to the corresponding dimensions The pointers are set to null, and must be set to correctly sized memory before passing the struct to mkernel_curvilinear_get_data
.
[in] | meshKernelId | The id of the mesh state. |
[out] | curvilinearGrid | The structure containing the dimensions of the curvilinear grid. |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_get_location_index | ( | int | meshKernelId, |
double | xCoordinate, | ||
double | yCoordinate, | ||
int | locationType, | ||
const BoundingBox & | boundingBox, | ||
int & | locationIndex | ||
) |
Gets the grid location closet to a specific coordinate.
[in] | meshKernelId | The id of the mesh state |
[in] | xCoordinate | The input xCoordinate |
[in] | yCoordinate | The input yCoordinate |
[in] | locationType | The location type |
[in] | boundingBox | The input bounding box |
[out] | locationIndex | The location index |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_initialize_line_shift | ( | int | meshKernelId | ) |
Initializes the curvilinear line shift algorithm.
[in] | meshKernelId | The id of the mesh state |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_initialize_orthogonal_grid_from_splines | ( | int | meshKernelId, |
const GeometryList & | geometryList, | ||
const meshkernel::CurvilinearParameters & | curvilinearParameters, | ||
const meshkernel::SplinesToCurvilinearParameters & | splinesToCurvilinearParameters | ||
) |
Generates a curvilinear grid from splines with the advancing front method. Initialization step (interactive)
[in] | meshKernelId | The id of the mesh state |
[in] | geometryList | The input splines corners |
[in] | curvilinearParameters | The input parameters to generate the curvilinear grid |
[in] | splinesToCurvilinearParameters | The parameters of the advancing front algorithm |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_initialize_orthogonalize | ( | int | meshKernelId, |
const meshkernel::OrthogonalizationParameters & | orthogonalizationParameters | ||
) |
Initializes the orthogonal curvilinear algorithm.
[in] | meshKernelId | The id of the mesh state |
[in] | orthogonalizationParameters | The orthogonalization parameters to use in the algorithm |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_insert_face | ( | int | meshKernelId, |
double | xCoordinate, | ||
double | yCoordinate | ||
) |
Inserts a new face on a curvilinear grid. The new face will be inserted on top of the closest edge by linear extrapolation.
[in] | meshKernelId | The id of the mesh state |
[in] | xCoordinate | The x coordinate of the point used for finding the closest face. |
[in] | yCoordinate | The y coordinate of the point used for finding the closest face. |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_iterate_orthogonal_grid_from_splines | ( | int | meshKernelId, |
int | layer | ||
) |
One advancement of the front in curvilinear grid from splines (interactive)
[in] | meshKernelId | The id of the mesh state |
[in] | layer | The layer index |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_line_attraction_repulsion | ( | int | meshKernelId, |
double | repulsionParameter, | ||
double | xFirstNodeOnTheLine, | ||
double | yFirstNodeOnTheLine, | ||
double | xSecondNodeOnTheLine, | ||
double | ySecondNodeOnTheLine, | ||
double | xLowerLeftCorner, | ||
double | yLowerLeftCorner, | ||
double | xUpperRightCorner, | ||
double | yUpperRightCorner | ||
) |
Attracts/repulses grid lines in a block towards another set grid line.
[in] | meshKernelId | The id of the mesh state |
[in] | repulsionParameter | The attraction/repulsion parameter. If positive the grid lines will be attracted towards the set line, if negative the lines will be repulsed |
[in] | xFirstNodeOnTheLine | The x coordinate of the first node of the set line |
[in] | yFirstNodeOnTheLine | The y coordinate of the first node of the set line |
[in] | xSecondNodeOnTheLine | The x coordinate of the second node of the set line |
[in] | ySecondNodeOnTheLine | The y coordinate of the second node of the set line |
[in] | xLowerLeftCorner | The x coordinate of the lower left corner of the block where the operation is performed |
[in] | yLowerLeftCorner | The y coordinate of the lower left corner of the block where the operation is performed |
[in] | xUpperRightCorner | The x coordinate of the upper right corner of the block where the operation is performed |
[in] | yUpperRightCorner | The y coordinate of the upper right corner of the block where the operation is performed |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_line_mirror | ( | int | meshKernelId, |
double | mirroringFactor, | ||
double | xFirstGridLineNode, | ||
double | yFirstGridLineNode, | ||
double | xSecondGridLineNode, | ||
double | ySecondGridLineNode | ||
) |
Mirrors a boundary gridline outwards. The boundary grid line is defined by its starting and ending points.
[in] | meshKernelId | The id of the mesh state |
[in] | mirroringFactor | The mirroring factor |
[in] | xFirstGridLineNode | The x coordinate of the first grid line point |
[in] | yFirstGridLineNode | The y coordinate of the first grid line point |
[in] | xSecondGridLineNode | The x coordinate of the second grid line point |
[in] | ySecondGridLineNode | The y coordinate of the second grid line point |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_line_shift | ( | int | meshKernelId | ) |
Computes the new grid, shifting the line towards the moved nodes and distributing the shifting in block specified before.
[in] | meshKernelId | The id of the mesh state |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_move_node | ( | int | meshKernelId, |
double | xFromPoint, | ||
double | yFromPoint, | ||
double | xToPoint, | ||
double | yToPoint | ||
) |
Moves a point of a curvilinear grid from one location to another.
meshKernelId | The id of the mesh state | |
[in] | xFromPoint | The x coordinate of point to move |
[in] | yFromPoint | The y coordinate of point to move |
[in] | xToPoint | The new x coordinate of the point |
[in] | yToPoint | The new y coordinate of the point |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_move_node_line_shift | ( | int | meshKernelId, |
double | xFromCoordinate, | ||
double | yFromCoordinate, | ||
double | xToCoordinate, | ||
double | yToCoordinate | ||
) |
Moves a node of the line to shift, the operation can be performed multiple times.
[in] | meshKernelId | The id of the mesh state |
[in] | xFromCoordinate | The x coordinate of the node to move (the closest curvilinear grid node will be found) |
[in] | yFromCoordinate | The y coordinate of the node to move (the closest curvilinear grid node will be found) |
[in] | xToCoordinate | The x coordinate of the new node position |
[in] | yToCoordinate | The y coordinate of the new node position |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_orthogonalize | ( | int | meshKernelId | ) |
Orthogonalize a curvilinear grid.
[in] | meshKernelId | The id of the mesh state |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_refine | ( | int | meshKernelId, |
double | xLowerLeftCorner, | ||
double | yLowerLeftCorner, | ||
double | xUpperRightCorner, | ||
double | yUpperRightCorner, | ||
int | refinement | ||
) |
Directional curvilinear grid refinement. Additional gridlines are added perpendicularly to the segment defined by lowerLeftCorner and xUpperRightCorner.
firstPoint
and secondPoint
must lie on the same grid line.
[in] | meshKernelId | The id of the mesh state. |
[in] | xLowerLeftCorner | The x coordinate of the lower left corner of the block to refine |
[in] | yLowerLeftCorner | The y coordinate of the lower left corner of the block to refine |
[in] | xUpperRightCorner | The x coordinate of the upper right corner of the block to refine |
[in] | yUpperRightCorner | The y coordinate of the upper right corner of the block to refine |
[in] | refinement | The number of grid lines to add between firstPoint and secondPoint |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_refresh_orthogonal_grid_from_splines | ( | int | meshKernelId | ) |
Converts curvilinear grid to mesh and refreshes the state (interactive)
[in] | meshKernelId | The id of the mesh state |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_set | ( | int | meshKernelId, |
const CurvilinearGrid & | grid | ||
) |
Sets the curvilinear grid.
[in] | meshKernelId | The id of the mesh state |
[in] | grid | The curvilinear grid |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_set_block_line_shift | ( | int | meshKernelId, |
double | xLowerLeftCorner, | ||
double | yLowerLeftCorner, | ||
double | xUpperRightCorner, | ||
double | yUpperRightCorner | ||
) |
Defines a block on the curvilinear where the shifting is distributed.
[in] | meshKernelId | The id of the mesh state |
[in] | xLowerLeftCorner | The x coordinate of the lower left corner of the block |
[in] | yLowerLeftCorner | The y coordinate of the lower left corner of the block |
[in] | xUpperRightCorner | The x coordinate of the upper right corner of the block |
[in] | yUpperRightCorner | The y coordinate of the upper right corner of the block |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_set_block_orthogonalize | ( | int | meshKernelId, |
double | xLowerLeftCorner, | ||
double | yLowerLeftCorner, | ||
double | xUpperRightCorner, | ||
double | yUpperRightCorner | ||
) |
Define a block on the curvilinear grid where to perform orthogonalization.
[in] | meshKernelId | The id of the mesh state |
[in] | xLowerLeftCorner | The x coordinate of the lower left corner of the block to orthogonalize |
[in] | yLowerLeftCorner | The y coordinate of the lower left corner of the block to orthogonalize |
[in] | xUpperRightCorner | The x coordinate of the upper right corner of the block to orthogonalize |
[in] | yUpperRightCorner | The y coordinate of the upper right corner of the block to orthogonalize |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_set_frozen_lines_orthogonalize | ( | int | meshKernelId, |
double | xFirstGridLineNode, | ||
double | yFirstGridLineNode, | ||
double | xSecondGridLineNode, | ||
double | ySecondGridLineNode | ||
) |
Freezes a line in the curvilinear orthogonalization process.
[in] | meshKernelId | The id of the mesh state |
[in] | xFirstGridLineNode | The x coordinate of the first point of the line to freeze |
[in] | yFirstGridLineNode | The y coordinate of the first point of the line to freeze |
[in] | xSecondGridLineNode | The x coordinate of the second point of the line to freeze |
[in] | ySecondGridLineNode | The y coordinate of the second point of the line to freeze |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_set_line_line_shift | ( | int | meshKernelId, |
double | xFirstGridLineNode, | ||
double | yFirstGridLineNode, | ||
double | xSecondGridLineNode, | ||
double | ySecondGridLineNode | ||
) |
Sets the start and end nodes of the line to shift.
[in] | meshKernelId | The id of the mesh state |
[in] | xFirstGridLineNode | The x coordinate of the first curvilinear grid node to shift |
[in] | yFirstGridLineNode | The y coordinate of the first curvilinear grid node to shift |
[in] | xSecondGridLineNode | The x coordinate of the second curvilinear grid node to shift |
[in] | ySecondGridLineNode | The y coordinate of the second curvilinear grid node to shift |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_smoothing | ( | int | meshKernelId, |
int | smoothingIterations, | ||
double | xLowerLeftCorner, | ||
double | yLowerLeftCorner, | ||
double | xUpperRightCorner, | ||
double | yUpperRightCorner | ||
) |
Smooths a curvilinear grid.
[in] | meshKernelId | The id of the mesh state |
[in] | smoothingIterations | The number of smoothing iterations to perform |
[in] | xLowerLeftCorner | The x coordinate of the lower left corner of the block to smooth |
[in] | yLowerLeftCorner | The y coordinate of the lower left corner of the block to smooth |
[in] | xUpperRightCorner | The x coordinate of the right corner of the block to smooth |
[in] | yUpperRightCorner | The y coordinate of the upper right corner of the block to smooth |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_smoothing_directional | ( | int | meshKernelId, |
int | smoothingIterations, | ||
double | xFirstGridlineNode, | ||
double | yFirstGridlineNode, | ||
double | xSecondGridLineNode, | ||
double | ySecondGridLineNode, | ||
double | xLowerLeftCornerSmoothingArea, | ||
double | yLowerLeftCornerSmoothingArea, | ||
double | xUpperRightCornerSmootingArea, | ||
double | yUpperRightCornerSmootingArea | ||
) |
Smooths a curvilinear grid along the direction specified by a segment.
[in] | meshKernelId | The id of the mesh state |
[in] | smoothingIterations | The number of smoothing iterations to perform |
[in] | xFirstGridlineNode | The x coordinate of the first curvilinear grid node |
[in] | yFirstGridlineNode | The y coordinate of the first curvilinear grid node |
[in] | xSecondGridLineNode | The x coordinate of the second curvilinear grid node |
[in] | ySecondGridLineNode | The y coordinate of the second curvilinear grid node |
[in] | xLowerLeftCornerSmoothingArea | The x coordinate of the lower left corner of the smoothing area |
[in] | yLowerLeftCornerSmoothingArea | The y coordinate of the lower left corner of the smoothing area |
[in] | xUpperRightCornerSmootingArea | The x coordinate of the upper right corner of the smoothing area |
[in] | yUpperRightCornerSmootingArea | The y coordinate of the upper right corner of the smoothing area |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_snap_to_landboundary | ( | int | meshKernelId, |
const GeometryList & | land, | ||
double | sectionControlPoint1x, | ||
double | sectionControlPoint1y, | ||
double | sectionControlPoint2x, | ||
double | sectionControlPoint2y, | ||
double | regionControlPointX = mkernel_get_separator() , |
||
double | regionControlPointY = mkernel_get_separator() |
||
) |
Sets the curvilinear grid.
[in] | meshKernelId | The id of the mesh state |
[in] | land | The land boundary |
[in] | sectionControlPoint1x | Start point x-coordinate for boundary section |
[in] | sectionControlPoint1y | Start point y-coordinate for boundary section |
[in] | sectionControlPoint2x | End point x-coordinate for boundary section |
[in] | sectionControlPoint2y | End point y-coordinate for boundary section |
[in] | regionControlPointX | X-coordinate of region defining point, if null value then use default region |
[in] | regionControlPointY | Y-coordinate of region defining point, if null value then use default region |
MKERNEL_API int meshkernelapi::mkernel_curvilinear_snap_to_spline | ( | int | meshKernelId, |
const GeometryList & | spline, | ||
double | sectionControlPoint1x, | ||
double | sectionControlPoint1y, | ||
double | sectionControlPoint2x, | ||
double | sectionControlPoint2y, | ||
double | regionControlPointX = mkernel_get_separator() , |
||
double | regionControlPointY = mkernel_get_separator() |
||
) |
Sets the curvilinear grid.
[in] | meshKernelId | The id of the mesh state |
[in] | spline | The spline |
[in] | sectionControlPoint1x | Start point x-coordinate for boundary section |
[in] | sectionControlPoint1y | Start point y-coordinate for boundary section |
[in] | sectionControlPoint2x | End point x-coordinate for boundary section |
[in] | sectionControlPoint2y | End point y-coordinate for boundary section |
[in] | regionControlPointX | X-coordinate of region defining point, if null value then use default region |
[in] | regionControlPointY | Y-coordinate of region defining point, if null value then use default region |
MKERNEL_API int meshkernelapi::mkernel_deallocate_state | ( | int | meshKernelId | ) |
Deallocate mesh state.
[in] | meshKernelId | The id of the mesh state |
MKERNEL_API int meshkernelapi::mkernel_expunge_state | ( | int | meshKernelId | ) |
Deallocate mesh state and remove it completely, no undo for this meshKernelId will be possible after expunging.
[in] | meshKernelId | The id of the mesh state |
MKERNEL_API int meshkernelapi::mkernel_get_averaging_method_closest_point | ( | int & | method | ) |
Gets an int indicating the closest point averaging method type.
[out] | method | The int indicating the closest point averaging method type |
MKERNEL_API int meshkernelapi::mkernel_get_averaging_method_inverse_distance_weighting | ( | int & | method | ) |
Gets an int indicating the inverse distance weights averaging method type.
[out] | method | The int indicating the inverse weight distance averaging method type |
MKERNEL_API int meshkernelapi::mkernel_get_averaging_method_max | ( | int & | method | ) |
Gets an int indicating the max value averaging method type.
[out] | method | The int indicating the max value averaging method type |
MKERNEL_API int meshkernelapi::mkernel_get_averaging_method_min | ( | int & | method | ) |
Gets an int indicating the minimum averaging method type.
[out] | method | The int indicating the minimum averaging method type |
MKERNEL_API int meshkernelapi::mkernel_get_averaging_method_min_absolute_value | ( | int & | method | ) |
Gets an int indicating the minimum absolute value averaging method type.
[out] | method | The int indicating the minimum absolute value averaging method type |
MKERNEL_API int meshkernelapi::mkernel_get_averaging_method_simple_averaging | ( | int & | method | ) |
Gets an int indicating the simple averaging method type.
[out] | method | The int indicating the averaging method type |
MKERNEL_API int meshkernelapi::mkernel_get_edges_location_type | ( | int & | type | ) |
Gets an int indicating the edge location type.
[out] | type | The int indicating the edge location type |
MKERNEL_API int meshkernelapi::mkernel_get_error | ( | char * | errorMessage | ) |
Gets pointer to error message.
[out] | errorMessage | The pointer to the latest error message |
MKERNEL_API int meshkernelapi::mkernel_get_exit_code_algorithm_error | ( | int & | exitCode | ) |
Gets the exit code of an exception of type AlgorithmexitCode.
[in,out] | exitCode | The exit code |
MKERNEL_API int meshkernelapi::mkernel_get_exit_code_constraint_error | ( | int & | exitCode | ) |
Gets the exit code of an exception of type ConstraintexitCode.
[in,out] | exitCode | The exit code |
MKERNEL_API int meshkernelapi::mkernel_get_exit_code_linear_algebra_error | ( | int & | exitCode | ) |
Gets the exit code of an exception of type LinearAlgebraexitCode.
[in,out] | exitCode | The exit code |
MKERNEL_API int meshkernelapi::mkernel_get_exit_code_mesh_geometry_error | ( | int & | exitCode | ) |
Gets the exit code of an exception of type MeshGeometryexitCode.
[in,out] | exitCode | The exit code |
MKERNEL_API int meshkernelapi::mkernel_get_exit_code_meshkernel_error | ( | int & | exitCode | ) |
Gets the exit code of an exception of type MeshKernelError.
[in,out] | exitCode | The exit code |
MKERNEL_API int meshkernelapi::mkernel_get_exit_code_not_implemented_error | ( | int & | exitCode | ) |
Gets the exit code of an exception of type NotImplementedCode.
[in,out] | exitCode | The exit code |
MKERNEL_API int meshkernelapi::mkernel_get_exit_code_range_error | ( | int & | exitCode | ) |
Gets the exit code of an exception of type RangeexitCode.
[in,out] | exitCode | The exit code |
MKERNEL_API int meshkernelapi::mkernel_get_exit_code_stdlib_exception | ( | int & | exitCode | ) |
Gets the exit code of an exception of type std::exception.
[in,out] | exitCode | The exit code |
MKERNEL_API int meshkernelapi::mkernel_get_exit_code_success | ( | int & | exitCode | ) |
Gets the success exit code.
[in,out] | exitCode | The exit code |
MKERNEL_API int meshkernelapi::mkernel_get_exit_code_unknown_exception | ( | int & | exitCode | ) |
Gets the exit code of an exception of unknown type.
[in,out] | exitCode | The exit code |
MKERNEL_API int meshkernelapi::mkernel_get_faces_location_type | ( | int & | type | ) |
Gets an int indicating the faces location type.
[out] | type | The int indicating the face location type |
MKERNEL_API int meshkernelapi::mkernel_get_geometry_error | ( | int & | invalidIndex, |
int & | type | ||
) |
Gets the index of the erroneous entity.
[out] | invalidIndex | The index of the erroneous entity |
[out] | type | The entity type (node, edge or face, see MeshLocations) |
MKERNEL_API double meshkernelapi::mkernel_get_inner_outer_separator | ( | ) |
Gets the double value used to separate the inner part of a polygon from its outer part.
MKERNEL_API int meshkernelapi::mkernel_get_interpolation_type_double | ( | int & | type | ) |
Get the integer indicating the interpolation type double.
[out] | type | The integer indicating the interpolation type double |
MKERNEL_API int meshkernelapi::mkernel_get_interpolation_type_float | ( | int & | type | ) |
Get the integer indicating the interpolation type float.
[out] | type | The integer indicating the interpolation type float |
MKERNEL_API int meshkernelapi::mkernel_get_interpolation_type_int | ( | int & | type | ) |
Get the integer indicating the interpolation type int.
[out] | type | The integer indicating the interpolation type int |
MKERNEL_API int meshkernelapi::mkernel_get_interpolation_type_short | ( | int & | type | ) |
Get the integer indicating the interpolation type short.
[out] | type | The integer indicating the interpolation type short |
MKERNEL_API int meshkernelapi::mkernel_get_nodes_location_type | ( | int & | type | ) |
Gets an int indicating the node location type.
[out] | type | The int indicating the node location type |
MKERNEL_API int meshkernelapi::mkernel_get_projection | ( | int | meshKernelId, |
int & | projection | ||
) |
Gets the coordinate projection of the meshkernel state.
[in] | meshKernelId | The id of the mesh state |
[out] | projection | The int indicating the projection type |
MKERNEL_API int meshkernelapi::mkernel_get_projection_cartesian | ( | int & | projection | ) |
Gets an int indicating the cartesian projection.
[out] | projection | The int indicating the cartesian projection |
MKERNEL_API int meshkernelapi::mkernel_get_projection_spherical | ( | int & | projection | ) |
Gets an int indicating the spherical projection.
[out] | projection | The int indicating the spherical projection |
MKERNEL_API int meshkernelapi::mkernel_get_projection_spherical_accurate | ( | int & | projection | ) |
Gets an int indicating the spherical accurate projection.
[out] | projection | The int indicating the spherical accurate projection |
MKERNEL_API double meshkernelapi::mkernel_get_separator | ( | ) |
Gets the double value used in the back-end library as separator and missing value.
MKERNEL_API int meshkernelapi::mkernel_get_splines | ( | const GeometryList & | geometryListIn, |
GeometryList & | geometryListOut, | ||
int | numberOfPointsBetweenNodes | ||
) |
Get the computed spline points between two corner nodes.
[in] | geometryListIn | The input corner nodes of the splines |
[out] | geometryListOut | The output spline |
[out] | numberOfPointsBetweenNodes | The number of spline points to generate between two corner nodes. |
MKERNEL_API int meshkernelapi::mkernel_get_version | ( | char * | version | ) |
Gets pointer to version string.
[out] | version | Version string |
MKERNEL_API int meshkernelapi::mkernel_is_valid_state | ( | int | meshKernelId, |
bool & | isValid | ||
) |
Determine if the meshKernelId is valid.
[in] | meshKernelId | The id of the mesh state |
[out] | isValid | Indicates if the mesh id is valid, true is its valid, false otherwise |
MKERNEL_API int meshkernelapi::mkernel_mesh1d_add | ( | int | meshKernelId, |
const Mesh1D & | mesh1d | ||
) |
Adds a mesh to the meshkernel::Mesh1D state.
[in] | meshKernelId | The id of the mesh state |
[in] | mesh1d | The Mesh1D data |
MKERNEL_API int meshkernelapi::mkernel_mesh1d_get_data | ( | int | meshKernelId, |
Mesh1D & | mesh1d | ||
) |
MKERNEL_API int meshkernelapi::mkernel_mesh1d_get_dimensions | ( | int | meshKernelId, |
Mesh1D & | mesh1d | ||
) |
Gets the Mesh1D data dimensions.
The integer parameters of the Mesh1D struct are set to the corresponding dimensions The pointers are set to null, and must be set to correctly sized memory before passing the struct to mkernel_mesh1d_get_dimensions
[in] | meshKernelId | The id of the mesh state |
[out] | mesh1d | The structure containing the dimensions of the Mesh1D. |
MKERNEL_API int meshkernelapi::mkernel_mesh1d_set | ( | int | meshKernelId, |
const Mesh1D & | mesh1d | ||
) |
Sets the meshkernel::Mesh1D state.
[in] | meshKernelId | The id of the mesh state |
[in] | mesh1d | The Mesh1D data |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_add | ( | int | meshKernelId, |
const Mesh2D & | mesh2d | ||
) |
Adds a mesh to the meshkernel::Mesh2D state.
[in] | meshKernelId | The id of the mesh state |
[in] | mesh2d | The Mesh2D data |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_averaging_interpolation | ( | int | meshKernelId, |
const GeometryList & | samples, | ||
int | locationType, | ||
int | averagingMethodType, | ||
double | relativeSearchSize, | ||
size_t | minNumSamples, | ||
GeometryList & | results | ||
) |
AveragingInterpolation interpolation (ec_module)
[in] | meshKernelId | The id of the mesh state |
[in] | samples | The samples coordinates and values |
[in] | locationType | The location type (see meshkernel::Location enum) |
[in] | averagingMethodType | The averaging method (see Method enum) |
[in] | relativeSearchSize | The relative search size around the location (larger increases the number of samples considered) |
[in] | minNumSamples | The minimum number of samples used for some interpolation algorithms to perform a valid interpolation |
[in] | results | The interpolation results with x and y coordinates |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_casulli_derefinement | ( | int | meshKernelId | ) |
De-refine mesh using the Casulli de-refinement algorithm.
[in] | meshKernelId | The id of the mesh state |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_casulli_derefinement_elements | ( | int | meshKernelId, |
GeometryList & | elements | ||
) |
Get list of elements that will be removed after the Casulli de-refinement algorithm.
[in] | meshKernelId | The id of the mesh state |
[in,out] | elements | List of elements to be removed. |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_casulli_derefinement_elements_on_polygon | ( | int | meshKernelId, |
const GeometryList & | polygonGeometry, | ||
GeometryList & | elements | ||
) |
Get list of elements that will be removed after the Casulli de-refinement algorithm.
[in] | meshKernelId | The id of the mesh state |
[in] | polygonGeometry | The input polygon geometry |
[in,out] | elements | List of elements to be removed. |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_casulli_derefinement_on_polygon | ( | int | meshKernelId, |
const GeometryList & | polygons | ||
) |
De-refine mesh using the Casulli de-refinement algorithm.
[in] | meshKernelId | The id of the mesh state |
[in] | polygons | The input polygons |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_casulli_refinement | ( | int | meshKernelId | ) |
Refine mesh using the Casulli refinement algorithm.
[in] | meshKernelId | The id of the mesh state |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_casulli_refinement_on_polygon | ( | int | meshKernelId, |
const GeometryList & | polygons | ||
) |
Refine mesh using the Casulli refinement algorithm.
[in] | meshKernelId | The id of the mesh state |
[in] | polygons | The input polygons |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_compute_inner_ortogonalization_iteration | ( | int | meshKernelId | ) |
Performs inner orthogonalization iteration, by slowly moving the mesh nodes to new optimal positions (interactive mode).
mkernel_mesh2d_prepare_outer_iteration_orthogonalization
function must be called before.
[in] | meshKernelId | The id of the mesh state |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_compute_orthogonalization | ( | int | meshKernelId, |
int | projectToLandBoundaryOption, | ||
const meshkernel::OrthogonalizationParameters & | orthogonalizationParameters, | ||
const GeometryList & | selectingPolygon, | ||
const GeometryList & | landBoundaries | ||
) |
The function modifies the mesh for achieving orthogonality between the edges and the segments connecting the face circumcenters. The amount of orthogonality is traded against the mesh smoothing (in this case the equality of face areas). The parameter to regulate the amount of orthogonalization is contained in meshkernel::OrthogonalizationParameters::orthogonalization_to_smoothing_factor
[in] | meshKernelId | The id of the mesh state |
[in] | projectToLandBoundaryOption | The option to determine how to snap to land boundaries |
[in] | orthogonalizationParameters | The structure containing the orthogonalization parameters meshkernel::OrthogonalizationParameters |
[in] | selectingPolygon | The polygon where to perform the orthogonalization (num_coordinates = 0 for an empty polygon) |
[in] | landBoundaries | The land boundaries to account for in the orthogonalization process (num_coordinates = 0 for no land boundaries) |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_connect_meshes | ( | int | meshKernelId, |
const Mesh2D & | mesh2d, | ||
double | searchFraction | ||
) |
Connect two or more disconnected regions along boundary.
[in] | meshKernelId | The id of the mesh states |
[in] | mesh2d | The mesh we want to connect to the main mesh |
[in] | searchFraction | Fraction of the shortest edge (along an edge to be connected) to use when determining neighbour edge closeness |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_convert_projection | ( | int | meshKernelId, |
int | projectionType, | ||
const char *const | zoneString | ||
) |
Converts the projection of a mesh2d.
[in] | meshKernelId | The id of the mesh state |
[in] | projectionType | The new projection for the mesh |
[in] | zoneString | The UTM zone and information string |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_convert_to_curvilinear | ( | int | meshKernelId, |
double | xPointCoordinate, | ||
double | yPointCoordinate | ||
) |
Converts a mesh to a curvilinear mesh.
[in] | meshKernelId | The id of the mesh state |
[in] | xPointCoordinate | The x coordinate of the point where to start the conversion point coordinate |
[in] | yPointCoordinate | The y point coordinate |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_count_hanging_edges | ( | int | meshKernelId, |
int & | numEdges | ||
) |
Count the number of hanging edges in a mesh2d. An hanging edge is an edge where one of the two nodes is not connected.
[in] | meshKernelId | The id of the mesh state |
[out] | numEdges | The number of hanging edges |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_count_mesh_boundaries_as_polygons | ( | int | meshKernelId, |
int & | numberOfPolygonNodes | ||
) |
Counts the number of polygon nodes contained in the mesh boundary polygons computed in function mkernel_mesh2d_get_mesh_boundaries_as_polygons
[in] | meshKernelId | The id of the mesh state |
[out] | numberOfPolygonNodes | The number of polygon nodes |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_count_nodes_in_polygons | ( | int | meshKernelId, |
const GeometryList & | geometryListIn, | ||
int | inside, | ||
int & | numberOfMeshNodes | ||
) |
Counts the number of selected mesh node indices.
This function should be used by clients before mkernel_mesh2d_get_nodes_in_polygons
for allocating an integer array storing the selection results.
[in] | meshKernelId | The id of the mesh state |
[in] | geometryListIn | The input polygon |
[in] | inside | Selection of the nodes inside the polygon (1) or outside (0) |
[out] | numberOfMeshNodes | The number of selected nodes |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_count_obtuse_triangles | ( | int | meshKernelId, |
int & | numObtuseTriangles | ||
) |
Gets the number of obtuse mesh2d triangles. Obtuse triangles are those having one edge longer than the sum of the other two.
[in] | meshKernelId | The id of the mesh state |
[out] | numObtuseTriangles | The number of obtuse triangles |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_count_small_flow_edge_centers | ( | int | meshKernelId, |
double | smallFlowEdgesLengthThreshold, | ||
int & | numSmallFlowEdges | ||
) |
Counts the number of small mesh2d flow edges. The flow edges are the edges connecting faces circumcenters.
[in] | meshKernelId | The id of the mesh state |
[in] | smallFlowEdgesLengthThreshold | The configurable length for detecting a small flow edge |
[out] | numSmallFlowEdges | The number of the small flow edges |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_delete | ( | int | meshKernelId, |
const GeometryList & | polygon, | ||
int | deletionOption, | ||
int | invertDeletion | ||
) |
Deletes a mesh in a polygon using several options.
[in] | meshKernelId | The id of the mesh state |
[in] | polygon | The polygon where to perform the operation |
[in] | deletionOption | The deletion option meshkernel::Mesh2D::DeleteMeshOptions |
[in] | invertDeletion | Whether to invert the deletion of selected features (0 no, 1 yes) |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_delete_edge | ( | int | meshKernelId, |
double | xCoordinate, | ||
double | yCoordinate, | ||
double | xLowerLeftBoundingBox, | ||
double | yLowerLeftBoundingBox, | ||
double | xUpperRightBoundingBox, | ||
double | yUpperRightBoundingBox | ||
) |
Deletes the closest mesh2d edge to a point. The coordinates of the edge middle points are used for calculating the distances to the point.
[in] | meshKernelId | The id of the mesh state |
[in] | xCoordinate | The x coordinate of the point |
[in] | yCoordinate | The y coordinate of the point |
[in] | xLowerLeftBoundingBox | The x coordinate of the lower left corner of the bounding box |
[in] | yLowerLeftBoundingBox | The y coordinate of the lower left corner of the bounding box |
[in] | xUpperRightBoundingBox | The x coordinate of the upper right corner of the bounding box |
[in] | yUpperRightBoundingBox | The y coordinate of the upper right corner of the bounding box |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_delete_edge_by_index | ( | int | meshKernelId, |
int | edgeIndex | ||
) |
Deletes a mesh2d edge given the index of the edge. The coordinates of the edge middle points are used for calculating the distances to the point.
[in] | meshKernelId | The id of the mesh state |
[in] | edgeIndex | The index of the edge to delete |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_delete_hanging_edges | ( | int | meshKernelId | ) |
Deletes all hanging edges. An hanging edge is an edge where one of the two nodes is not connected.
[in] | meshKernelId | The id of the mesh state |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_delete_node | ( | int | meshKernelId, |
int | nodeIndex | ||
) |
Deletes a mesh2d node.
[in] | meshKernelId | The id of the mesh state |
[in] | nodeIndex | The index of the node to delete |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_delete_orthogonalization | ( | int | meshKernelId | ) |
Cleans the orthogonalization algorithm state, allocated in mkernel_mesh2d_initialize_orthogonalization
(interactive mode)
[in] | meshKernelId | The id of the mesh state |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_delete_small_flow_edges_and_small_triangles | ( | int | meshKernelId, |
double | smallFlowEdgesThreshold, | ||
double | minFractionalAreaTriangles | ||
) |
Deletes all small mesh2d flow edges and small triangles. The flow edges are the edges connecting faces circumcenters.
[in] | meshKernelId | The id of the mesh state |
[in] | smallFlowEdgesThreshold | The configurable threshold for detecting the small flow edges |
[in] | minFractionalAreaTriangles | The ratio of the face area to the average area of neighboring non triangular faces. This parameter is used for determining if a triangular face is small. |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_finalize_inner_ortogonalization_iteration | ( | int | meshKernelId | ) |
Finalizes the orthogonalization outer iteration, computing the new coefficients for grid adaption and the new face circumcenters (interactive mode).
[in] | meshKernelId | The id of the mesh state |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_flip_edges | ( | int | meshKernelId, |
int | isTriangulationRequired, | ||
int | projectToLandBoundaryRequired, | ||
const GeometryList & | selectingPolygon, | ||
const GeometryList & | landBoundaries | ||
) |
Flips mesh2d edges, to optimize the mesh smoothness. This operation is usually performed after mkernel_mesh2d_refine_based_on_samples
or mkernel_mesh2d_refine_based_on_polygon
.
Nodes that are connected to more than six other nodes are typically enclosed by faces of highly non-uniform shape and wildly varying areas.
[in] | meshKernelId | The id of the mesh state |
[in] | isTriangulationRequired | The option to triangulate also non triangular cells (if activated squares becomes triangles) |
[in] | projectToLandBoundaryRequired | The option to determine how to snap to land boundaries |
[in] | selectingPolygon | The polygon where to perform the edge flipping (num_coordinates = 0 for an empty polygon) |
[in] | landBoundaries | The land boundaries to account for when flipping the edges (num_coordinates = 0 for no land boundaries) |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_get_closest_node | ( | int | meshKernelId, |
double | xCoordinateIn, | ||
double | yCoordinateIn, | ||
double | searchRadius, | ||
double | xLowerLeftBoundingBox, | ||
double | yLowerLeftBoundingBox, | ||
double | xUpperRightBoundingBox, | ||
double | yUpperRightBoundingBox, | ||
double & | xCoordinateOut, | ||
double & | yCoordinateOut | ||
) |
Gets the closest mesh2d node coordinates to a point, searching within a radius.
[in] | meshKernelId | Id of the grid state |
[in] | xCoordinateIn | The x coordinate of the node to insert |
[in] | yCoordinateIn | The y coordinate of the node to insert |
[in] | searchRadius | The radii where to search for mesh nodes |
[in] | xLowerLeftBoundingBox | The x coordinate of the lower left corner of the bounding box |
[in] | yLowerLeftBoundingBox | The y coordinate of the lower left corner of the bounding box |
[in] | xUpperRightBoundingBox | The x coordinate of the upper right corner of the bounding box |
[in] | yUpperRightBoundingBox | The y coordinate of the upper right corner of the bounding box |
[out] | xCoordinateOut | The x coordinate of the found Mesh2D node |
[out] | yCoordinateOut | The y coordinate of the found Mesh2D node |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_get_data | ( | int | meshKernelId, |
Mesh2D & | mesh2d | ||
) |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_get_dimensions | ( | int | meshKernelId, |
Mesh2D & | mesh2d | ||
) |
Gets the Mesh2D dimensions.
The integer parameters of the Mesh2D struct are set to the corresponding dimensions The pointers are set to null, and must be set to correctly sized memory before passing the struct to mkernel_mesh2d_get_data
.
[in] | meshKernelId | The id of the mesh state |
[out] | mesh2d | The Mesh2D dimensions |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_get_edge | ( | int | meshKernelId, |
double | xCoordinate, | ||
double | yCoordinate, | ||
double | xLowerLeftBoundingBox, | ||
double | yLowerLeftBoundingBox, | ||
double | xUpperRightBoundingBox, | ||
double | yUpperRightBoundingBox, | ||
int & | edgeIndex | ||
) |
Gets the closest mesh2d edge to a point in a bounding box.
[in] | meshKernelId | The id of the mesh state |
[in] | xCoordinate | The x coordinate of the point |
[in] | yCoordinate | The y coordinate of the point |
[in] | xLowerLeftBoundingBox | The x coordinate of the lower left corner of the bounding box |
[in] | yLowerLeftBoundingBox | The y coordinate of the lower left corner of the bounding box |
[in] | xUpperRightBoundingBox | The x coordinate of the upper right corner of the bounding box |
[in] | yUpperRightBoundingBox | The y coordinate of the upper right corner of the bounding box |
[out] | edgeIndex | The found edge index |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_get_face_polygons | ( | int | meshKernelId, |
int | numEdges, | ||
const GeometryList & | facePolygons | ||
) |
Gets the faces polygons with a number of edges larger or equal to numEdges.
[in] | meshKernelId | The id of the mesh state |
[in] | numEdges | The number of edges |
[in] | facePolygons | The resulting face polygons |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_get_face_polygons_dimension | ( | int | meshKernelId, |
int | numEdges, | ||
int & | geometryListDimension | ||
) |
Gets the dimension of faces polygons with a number of edges larger or equal to numNodes.
[in] | meshKernelId | The id of the mesh state |
[in] | numEdges | The number of edges |
[out] | geometryListDimension | The dimension of the geometry list containing the face polygons |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_get_filtered_face_polygons | ( | int | meshKernelId, |
int | propertyValue, | ||
double | minValue, | ||
double | maxValue, | ||
const GeometryList & | facePolygons | ||
) |
Gets the geometry list containing the face polygons within the filtering range.
[in] | meshKernelId | The identifier of the mesh kernel or mesh state. |
[in] | propertyValue | The property used to filter the locations. |
[in] | minValue | The minimum value of the property. |
[in] | maxValue | The maximum value of the property. |
[out] | facePolygons | The geometry list containing the filtered locations. |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_get_filtered_face_polygons_dimension | ( | int | meshKernelId, |
int | propertyValue, | ||
double | minValue, | ||
double | maxValue, | ||
int & | geometryListDimension | ||
) |
Retrieves the dimension of the geometry list containing the face polygons within the filtering range.
This function filters face polygons within a mesh based on a specific property and location, applying a range filter (minimum and maximum values). It then returns the dimension of the filtered geometry list.
[in] | meshKernelId | The identifier of the mesh kernel or mesh state. |
[in] | propertyValue | The property used to filter the locations. |
[in] | minValue | The minimum value of the property. |
[in] | maxValue | The maximum value of the property. |
[out] | geometryListDimension | The output parameter that will store the dimension (size) of the geometry list containing the polygons that match the filtering criteria. |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_get_hanging_edges | ( | int | meshKernelId, |
int * | edges | ||
) |
Gets the indices of hanging edges. An hanging edge is an edge where one of the two nodes is not connected.
[in] | meshKernelId | The id of the mesh state |
[in,out] | edges | Pointer to memory where the indices of the hanging edges will be stored |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_get_location_index | ( | int | meshKernelId, |
double | xCoordinate, | ||
double | yCoordinate, | ||
int | locationType, | ||
const BoundingBox & | boundingBox, | ||
int & | locationIndex | ||
) |
Gets the mesh location closet to a specific coordinate.
[in] | meshKernelId | The id of the mesh state |
[in] | xCoordinate | The input xCoordinate |
[in] | yCoordinate | The input yCoordinate |
[in] | locationType | The location type |
[in] | boundingBox | The input bounding box |
[out] | locationIndex | The location index |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_get_mesh_boundaries_as_polygons | ( | int | meshKernelId, |
GeometryList & | boundaryPolygons | ||
) |
Retrieves the boundaries of a mesh as a series of separated polygons.
For example, if a mesh has an single inner hole, two polygons will be generated, one for the inner boundary and one for the outer boundary.
[in] | meshKernelId | The id of the mesh state |
[out] | boundaryPolygons | The output network boundary polygon |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_get_node_edge_data | ( | int | meshKernelId, |
Mesh2D & | mesh2d | ||
) |
Gets only the node and edge Mesh2D data.
This function ought to be called after mkernel_mesh2d_get_dimensions
has been called and the node_x, node_y and edge_nodes pointers have been set to correctly sized memory.
[in] | meshKernelId | The id of the mesh state |
[in,out] | mesh2d | The Mesh2D data |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_get_node_index | ( | int | meshKernelId, |
double | xCoordinate, | ||
double | yCoordinate, | ||
double | searchRadius, | ||
double | xLowerLeftBoundingBox, | ||
double | yLowerLeftBoundingBox, | ||
double | xUpperRightBoundingBox, | ||
double | yUpperRightBoundingBox, | ||
int & | nodeIndex | ||
) |
Finds the mesh2d node closest to a point, within a search radius.
[in] | meshKernelId | The id of the mesh state |
[in] | xCoordinate | The x coordinate of the point |
[in] | yCoordinate | The y coordinate of the point |
[in] | searchRadius | The search radius |
[in] | xLowerLeftBoundingBox | The x coordinate of the lower left corner of the bounding box |
[in] | yLowerLeftBoundingBox | The y coordinate of the lower left corner of the bounding box |
[in] | xUpperRightBoundingBox | The x coordinate of the upper right corner of the bounding box |
[in] | yUpperRightBoundingBox | The y coordinate of the upper right corner of the bounding box |
[out] | nodeIndex | The index of the found node |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_get_nodes_in_polygons | ( | int | meshKernelId, |
const GeometryList & | geometryListIn, | ||
int | inside, | ||
int * | selectedNodes | ||
) |
Gets the indices of the mesh2d nodes selected with a polygon.
[in] | meshKernelId | The id of the mesh state |
[in] | geometryListIn | The input polygon |
[in] | inside | Selection of the nodes inside the polygon (1) or outside (0) |
[out] | selectedNodes | The selected nodes indices |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_get_obtuse_triangles_mass_centers | ( | int | meshKernelId, |
GeometryList & | result | ||
) |
Gets the mass centers of obtuse mesh2d triangles. Obtuse triangles are those having one edge longer than the sum of the other two.
[in] | meshKernelId | The id of the mesh state |
[out] | result | The coordinates of the obtuse triangles mass centers stored in coordinates_x and coordinates_y of a GeometryList |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_get_orthogonality | ( | int | meshKernelId, |
GeometryList & | geometryList | ||
) |
Gets the mesh orthogonality, expressed as the ratio between the edges and the segments connecting the face circumcenters.
[in] | meshKernelId | The id of the mesh state |
[out] | geometryList | The orthogonality values of each edge |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_get_orthogonality_property_type | ( | int & | type | ) |
Gets an int indicating the orthogonality property type for mesh2d.
[out] | type | The int indicating the orthogonality property type |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_get_property | ( | int | meshKernelId, |
int | propertyValue, | ||
const GeometryList & | geometrylist | ||
) |
Retrieves a specified property of a 2D mesh.
[in] | meshKernelId | The id of the mesh state |
[in] | propertyValue | The value representing the specific property |
[in] | geometrylist | A reference to a GeometryList object that will be populated with the values of the requested property |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_get_property_dimension | ( | int | meshKernelId, |
int | propertyValue, | ||
int & | dimension | ||
) |
The dimension of a specified property of a 2D mesh.
[in] | meshKernelId | The id of the mesh state |
[in] | propertyValue | The value representing the specific property |
[in] | dimension | The dimension of the specified property |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_get_small_flow_edge_centers | ( | int | meshKernelId, |
double | smallFlowEdgesThreshold, | ||
GeometryList & | result | ||
) |
Gets the small mesh2d flow edges. The flow edges are the edges connecting faces circumcenters.
[in] | meshKernelId | The id of the mesh state |
[in] | smallFlowEdgesThreshold | The configurable threshold for detecting a small flow edge |
[out] | result | The middle points of the small flow edges, stored in coordinates_x and coordinates_y of a GeometryList |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_get_smoothness | ( | int | meshKernelId, |
GeometryList & | geometryList | ||
) |
Gets the smoothness, expressed as the ratio between the values of two neighboring faces areas.
[in] | meshKernelId | The id of the mesh state |
[out] | geometryList | The smoothness values at each edge |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_initialize_orthogonalization | ( | int | meshKernelId, |
int | projectToLandBoundaryOption, | ||
meshkernel::OrthogonalizationParameters & | orthogonalizationParameters, | ||
const GeometryList & | selectingPolygon, | ||
const GeometryList & | landBoundaries | ||
) |
Initialization of the meshkernel::OrthogonalizationAndSmoothing algorithm.
This is the first function to call when using orthogonalization in interactive mode (visualizing the grid while it is orthogonalizing), in order to set the internal state of the algorithm reused during the iterations.
[in] | meshKernelId | The id of the mesh state |
[in] | projectToLandBoundaryOption | The option to determine how to snap to land boundaries |
[in] | orthogonalizationParameters | The structure containing the user defined orthogonalization parameters |
[in] | selectingPolygon | The polygon where to perform the orthogonalization (num_coordinates = 0 for an empty polygon) |
[in] | landBoundaries | The land boundaries to account for in the orthogonalization process (num_coordinates = 0 for no land boundaries) |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_insert_edge | ( | int | meshKernelId, |
int | startNode, | ||
int | endNode, | ||
int & | newEdgeIndex | ||
) |
Insert a new mesh2d edge connecting two nodes.
[in] | meshKernelId | The id of the mesh state |
[in] | startNode | The index of the first node to connect |
[in] | endNode | The index of the second node to connect |
[out] | newEdgeIndex | The index of the new generated edge |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_insert_edge_from_coordinates | ( | int | meshKernelId, |
double | firstNodeX, | ||
double | firstNodeY, | ||
double | secondNodeX, | ||
double | secondNodeY, | ||
int & | firstNodeIndex, | ||
int & | secondNodeIndex, | ||
int & | edgeIndex | ||
) |
Insert a new mesh2d edge from 2 coordinates.
[in] | meshKernelId | The id of the mesh state |
[in] | firstNodeX | The index of the first node to connect |
[in] | firstNodeY | The index of the second node to connect |
[in] | secondNodeX | The index of the first node to connect |
[in] | secondNodeY | The index of the second node to connect |
[in] | firstNodeIndex | The index of the first node |
[in] | secondNodeIndex | The index of the second node |
[in] | edgeIndex | The index of the new generated edge |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_insert_node | ( | int | meshKernelId, |
double | xCoordinate, | ||
double | yCoordinate, | ||
int & | nodeIndex | ||
) |
Insert a new mesh2d node at a specific coordinate.
[in] | meshKernelId | The id of the mesh state |
[in] | xCoordinate | The x coordinate of the node to insert |
[in] | yCoordinate | The y coordinate of the node to insert |
[out] | nodeIndex | The index of the new mesh node |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_intersections_from_polygon | ( | int | meshKernelId, |
const GeometryList & | boundaryPolygon, | ||
int * | edgeNodes, | ||
int * | edgeIndex, | ||
double * | edgeDistances, | ||
double * | segmentDistances, | ||
int * | segmentIndexes, | ||
int * | faceIndexes, | ||
int * | faceNumEdges, | ||
int * | faceEdgeIndex | ||
) |
Gets the edges intersected by a polygon, with additional information on the intersections.
[in] | meshKernelId | The id of the mesh state |
[in] | boundaryPolygon | An input polygon, defined as a series of points |
[out] | edgeNodes | The indices of the intersected edge nodes. The first node of the edge is on the left (the virtual node), the second node of the edge is on the right (the inner node) |
[out] | edgeIndex | For each intersected edge, the edge index |
[out] | edgeDistances | For each intersection, the location of the intersection expressed as adimensional distance from the edge starting node |
[out] | segmentDistances | For each intersection, the location of the intersection expressed as adimensional distance from the polygon segment start |
[out] | segmentIndexes | For each intersection, the segment index |
[out] | faceIndexes | For each intersection, the face index |
[out] | faceNumEdges | For each intersection, the number of intersections |
[out] | faceEdgeIndex | For each intersection, the index of the intersected edge |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_make_global | ( | int | meshKernelId, |
int | numLongitudeNodes, | ||
int | numLatitudeNodes | ||
) |
Compute the global mesh with a given number of points along the longitude and latitude directions.
[in] | meshKernelId | The id of the mesh state |
[in] | numLongitudeNodes | The number of points along the longitude. |
[in] | numLatitudeNodes | The number of points along the latitude (half hemisphere). |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_make_rectangular_mesh | ( | int | meshKernelId, |
const meshkernel::MakeGridParameters & | makeGridParameters | ||
) |
Makes a rectangular mesh.
[in] | meshKernelId | The id of the mesh state |
[in] | makeGridParameters | The structure containing the make grid parameters |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_make_rectangular_mesh_from_polygon | ( | int | meshKernelId, |
const meshkernel::MakeGridParameters & | makeGridParameters, | ||
const GeometryList & | geometryList | ||
) |
Makes a rectangular mesh from a polygon.
[in] | meshKernelId | The id of the mesh state |
[in] | makeGridParameters | The structure containing the make grid parameters |
[in] | geometryList | The polygons to account for |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_make_rectangular_mesh_on_extension | ( | int | meshKernelId, |
const meshkernel::MakeGridParameters & | makeGridParameters | ||
) |
Makes a rectangular mesh on a defined extension.
[in] | meshKernelId | The id of the mesh state |
[in] | makeGridParameters | The structure containing the make grid parameters |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_make_triangular_mesh_from_polygon | ( | int | meshKernelId, |
const GeometryList & | polygonPoints | ||
) |
Generates a triangular mesh2d grid within a polygon. The size of the triangles is determined from the length of the polygon edges.
[in] | meshKernelId | The id of the mesh state |
[in] | polygonPoints | The polygon where to triangulate |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_make_triangular_mesh_from_samples | ( | int | meshKernelId, |
const GeometryList & | samples | ||
) |
Makes a triangular mesh from a set of samples, triangulating the sample points.
[in] | meshKernelId | The id of the mesh state |
[in] | samples | The samples where to triangulate |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_merge_nodes | ( | int | meshKernelId, |
const GeometryList & | geometryListIn | ||
) |
Merges the mesh2d nodes within a distance of 0.001 m, effectively removing all small edges.
[in] | meshKernelId | The id of the mesh state |
[in] | geometryListIn | The polygon defining the area where the operation will be performed |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_merge_nodes_with_merging_distance | ( | int | meshKernelId, |
const GeometryList & | geometryListIn, | ||
double | mergingDistance | ||
) |
Merges the mesh2d nodes within a distance of 0.001 m, effectively removing all small edges.
[in] | meshKernelId | The id of the mesh state |
[in] | geometryListIn | The polygon defining the area where the operation will be performed |
[in] | mergingDistance | The distance below which two nodes will be merged |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_merge_two_nodes | ( | int | meshKernelId, |
int | firstNode, | ||
int | secondNode | ||
) |
Merges two mesh2d nodes into one.
[in] | meshKernelId | The id of the mesh state |
[in] | firstNode | The index of the first node to merge |
[in] | secondNode | The index of the second node to merge |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_move_node | ( | int | meshKernelId, |
double | xCoordinate, | ||
double | yCoordinate, | ||
int | nodeIndex | ||
) |
Moves a mesh2d node to a new position.
[in] | meshKernelId | The id of the mesh state |
[in] | xCoordinate | The new x coordinate of the node to move |
[in] | yCoordinate | The new y coordinate of the node to move |
[in] | nodeIndex | The index of the mesh2d node to be moved |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_prepare_outer_iteration_orthogonalization | ( | int | meshKernelId | ) |
Prepares an outer orthogonalization iteration, computing the new orthogonalization and smoothing weights from the modified mesh geometry (in interactive mode).
mkernel_mesh2d_initialize_orthogonalization
function must be called before.
[in] | meshKernelId | The id of the mesh state |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_refine_based_on_gridded_samples | ( | int | meshKernelId, |
const GriddedSamples & | griddedSamples, | ||
const meshkernel::MeshRefinementParameters & | meshRefinementParameters, | ||
bool | useNodalRefinement | ||
) |
Refine based on gridded samples.
The number of successive splits is indicated on the sample value. For example a value of 0 means no split and hence no refinement, a value of 1 a single split (a quadrilateral face generates 4 faces), a value of 2 two splits (a quadrilateral face generates 16 faces).
[in] | meshKernelId | The id of the mesh state |
[in] | griddedSamples | The gridded samples |
[in] | meshRefinementParameters | The mesh refinement parameters |
[in] | useNodalRefinement | Use nodal refinement |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_refine_based_on_polygon | ( | int | meshKernelId, |
const GeometryList & | geometryList, | ||
const meshkernel::MeshRefinementParameters & | meshRefinementParameters | ||
) |
Refines a mesh2d within a polygon. Refinement is achieved by splitting the edges contained in the polygon by two.
[in] | meshKernelId | The id of the mesh state |
[in] | geometryList | The closed polygon where to perform the refinement |
[in] | meshRefinementParameters | The mesh refinement parameters |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_refine_based_on_samples | ( | int | meshKernelId, |
const GeometryList & | samples, | ||
double | relativeSearchRadius, | ||
int | minimumNumSamples, | ||
const meshkernel::MeshRefinementParameters & | meshRefinementParameters | ||
) |
Refines a mesh2d based on samples. Refinement is achieved by successive splits of the face edges.
The number of successive splits is indicated on the sample value. For example a value of 0 means no split and hence no refinement, a value of 1 a single split (a quadrilateral face generates 4 faces), a value of 2 two splits (a quadrilateral face generates 16 faces).
[in] | meshKernelId | The id of the mesh state |
[in] | samples | The sample set |
[in] | relativeSearchRadius | The relative search radius relative to the face size, used for some interpolation algorithms |
[in] | minimumNumSamples | The minimum number of samples used for some averaging algorithms |
[in] | meshRefinementParameters | The mesh refinement parameters |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_refine_ridges_based_on_gridded_samples | ( | int | meshKernelId, |
const GriddedSamples & | griddedSamples, | ||
double | relativeSearchRadius, | ||
int | minimumNumSamples, | ||
int | numberOfSmoothingIterations, | ||
const meshkernel::MeshRefinementParameters & | meshRefinementParameters | ||
) |
Refines a mesh2d based on samples with ridge refinement. This method automatically detects the ridges in a sample set.
The number of successive splits is indicated on the sample value. For example a value of 0 means no split and hence no refinement, a value of 1 a single split (a quadrilateral face generates 4 faces), a value of 2 two splits (a quadrilateral face generates 16 faces).
[in] | meshKernelId | The id of the mesh state |
[in] | griddedSamples | The gridded samples |
[in] | relativeSearchRadius | The relative search radius relative to the face size, used for some interpolation algorithms |
[in] | minimumNumSamples | The minimum number of samples used for some averaging algorithms |
[in] | numberOfSmoothingIterations | The number of smoothing iterations to apply to the input sample set |
[in] | meshRefinementParameters | The mesh refinement parameters |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_remove_disconnected_regions | ( | int | meshKernelId | ) |
Remove any disconnected regions from a mesh2d.
The assumption is that the main region of interest has the largest number of elements. Regions with fewer elements that this will be removed.
[in] | meshKernelId | The id of the mesh state |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_rotate | ( | int | meshKernelId, |
double | centreX, | ||
double | centreY, | ||
double | theta | ||
) |
Rotate a mesh2d about a point.
[in] | meshKernelId | The id of the mesh state |
[in] | centreX | X-coordinate of the centre of rotation |
[in] | centreY | Y-coordinate of the centre of rotation |
[in] | theta | Angle of rotation |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_set | ( | int | meshKernelId, |
const Mesh2D & | mesh2d | ||
) |
Sets the meshkernel::Mesh2D state.
[in] | meshKernelId | The id of the mesh state |
[in] | mesh2d | The Mesh2D data |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_snap_to_landboundary | ( | int | meshKernelId, |
const GeometryList & | selectingPolygon, | ||
const GeometryList & | landBoundaries | ||
) |
Snaps a mesh to a land boundary.
[in] | meshKernelId | The id of the mesh state |
[in] | selectingPolygon | The polygon where to perform the snapping |
[in] | landBoundaries | The input land boundaries |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_split_row | ( | int | meshKernelId, |
int | firstNode, | ||
int | secondNode | ||
) |
An-isotropically refines the elements along a row or column, given a starting edge.
Only quadrilateral elements will be refined. Refinement will continue upto the boundary of the domain or when a non-quadrilateral element is encountered.
[in] | meshKernelId | The id of the mesh state |
[in] | firstNode | The first node of the edge |
[in] | secondNode | The second node of the edge |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_translate | ( | int | meshKernelId, |
double | translationX, | ||
double | translationY | ||
) |
Translate a mesh2d.
[in] | meshKernelId | The id of the mesh state |
[in] | translationX | X-component of the translation vector |
[in] | translationY | Y-component of the translation vector |
MKERNEL_API int meshkernelapi::mkernel_mesh2d_triangulation_interpolation | ( | int | meshKernelId, |
const GeometryList & | samples, | ||
int | locationType, | ||
GeometryList & | results | ||
) |
Triangle interpolation (ec_module)
[in] | meshKernelId | The id of the mesh state |
[in] | samples | The samples coordinates and values |
[in] | locationType | The location type (see meshkernel::Location enum) |
[in] | results | The interpolation results with x and y coordinates |
MKERNEL_API int meshkernelapi::mkernel_network1d_compute_fixed_chainages | ( | int | meshKernelId, |
double * | fixedChainages, | ||
int | sizeFixedChainages, | ||
double | minFaceSize, | ||
double | fixedChainagesOffset | ||
) |
Compute the network chainages from fixed point locations.
[in] | meshKernelId | The id of the mesh state |
[in] | fixedChainages | The fixed chainages for each polyline. Chunks are separated by the separator, each chunk corresponds to a polyline |
[in] | sizeFixedChainages | The size of fixed chainages vector |
[in] | minFaceSize | The minimum face size. The distance between two chainages must be no less than this length |
[in] | fixedChainagesOffset | The offset to use for fixed chainages |
MKERNEL_API int meshkernelapi::mkernel_network1d_compute_offsetted_chainages | ( | int | meshKernelId, |
double | offset | ||
) |
Compute the network chainages at a regular offset.
[in] | meshKernelId | The id of the mesh state |
[in] | offset | The offset between points |
MKERNEL_API int meshkernelapi::mkernel_network1d_set | ( | int | meshKernelId, |
const GeometryList & | polylines | ||
) |
Sets the meshkernel::Network1D state.
[in] | meshKernelId | The id of the mesh state |
[in] | polylines | The polylines describing the network |
MKERNEL_API int meshkernelapi::mkernel_network1d_to_mesh1d | ( | int | meshKernelId, |
double | minFaceSize | ||
) |
Convert network chainages to mesh1d nodes and edges.
[in] | meshKernelId | The id of the mesh state |
[in] | minFaceSize | The minimum face size below which two nodes will be merged |
MKERNEL_API int meshkernelapi::mkernel_polygon_count_linear_refine | ( | int | meshKernelId, |
const GeometryList & | polygonToRefine, | ||
int | firstIndex, | ||
int | secondIndex, | ||
int & | numberOfPolygonNodes | ||
) |
Counts the number of polygon nodes resulting from polygon refinement with mkernel_polygon_linear_refine
.
This function should be used by clients before mkernel_polygon_linear_refine
for allocating GeometryList containing the refinement result.
[in] | meshKernelId | The id of the mesh state |
[in] | polygonToRefine | The input polygon to refine |
[in] | firstIndex | The first index of the refinement interval |
[in] | secondIndex | The second index of the refinement interval |
[out] | numberOfPolygonNodes | The number of nodes after refinement |
MKERNEL_API int meshkernelapi::mkernel_polygon_count_offset | ( | int | meshKernelId, |
const GeometryList & | geometryListIn, | ||
int | innerPolygon, | ||
double | distance, | ||
int & | numberOfPolygonNodes | ||
) |
Counts the number of polygon nodes resulting from polygon offset.
This function should be used by clients before mkernel_polygon_get_offset
for allocating the GeometryList containing the offset result.
[in] | meshKernelId | The id of the mesh state |
[in] | geometryListIn | The polygon to offset |
[in] | innerPolygon | Whether to compute inner (1) or outer offset (0) |
[in] | distance | The offset distance |
[out] | numberOfPolygonNodes | The number of nodes in the offset polygon |
MKERNEL_API int meshkernelapi::mkernel_polygon_count_refine | ( | int | meshKernelId, |
const GeometryList & | polygonToRefine, | ||
int | firstIndex, | ||
int | secondIndex, | ||
double | distance, | ||
int & | numberOfPolygonNodes | ||
) |
Counts the number of polygon nodes resulting from polygon refinement with mkernel_polygon_refine
.
This function should be used by clients before mkernel_polygon_refine
for allocating GeometryList containing the refinement result.
[in] | meshKernelId | The id of the mesh state |
[in] | polygonToRefine | The input polygon to refine |
[in] | firstIndex | The first index of the refinement interval |
[in] | secondIndex | The second index of the refinement interval |
[in] | distance | The target interval edge length |
[out] | numberOfPolygonNodes | The number of nodes after refinement |
MKERNEL_API int meshkernelapi::mkernel_polygon_get_included_points | ( | int | meshKernelId, |
const GeometryList & | selectingPolygon, | ||
const GeometryList & | polygonToSelect, | ||
GeometryList & | selectionResults | ||
) |
Selects the polygon nodes within another polygon.
[in] | meshKernelId | The id of the mesh state |
[in] | selectingPolygon | The selecting polygon (num_coordinates = 0 for an empty polygon) |
[in] | polygonToSelect | The polygon to select |
[out] | selectionResults | The selection result, contained in the in the values field of GeometryList (0.0 not selected, 1.0 selected). Note that the selection selectionResults variable must be allocated by the client. |
MKERNEL_API int meshkernelapi::mkernel_polygon_get_offset | ( | int | meshKernelId, |
const GeometryList & | geometryListIn, | ||
int | inWard, | ||
double | distance, | ||
GeometryList & | geometryListOut | ||
) |
Generate a new polygon from an existing one by offsetting the perimeter by a given distance.
Offsetting can be done inward or outward the existing polygon.
[in] | meshKernelId | The id of the mesh state |
[in] | geometryListIn | The polygon to offset |
[in] | inWard | Compute the inner offset (1) or outer offset offset (0) |
[in] | distance | The offset distance |
[out] | geometryListOut | The resulting offset polygon |
MKERNEL_API int meshkernelapi::mkernel_polygon_linear_refine | ( | int | meshKernelId, |
const GeometryList & | polygonToRefine, | ||
int | firstNodeIndex, | ||
int | secondNodeIndex, | ||
GeometryList & | refinedPolygon | ||
) |
Linear refines the polygon perimeter between two nodes.
[in] | meshKernelId | The id of the mesh state |
[in] | polygonToRefine | The input polygon to refine |
[in] | firstNodeIndex | The first index of the refinement interval |
[in] | secondNodeIndex | The second index of the refinement interval |
[out] | refinedPolygon | The refined polygon |
MKERNEL_API int meshkernelapi::mkernel_polygon_refine | ( | int | meshKernelId, |
const GeometryList & | polygonToRefine, | ||
int | firstNodeIndex, | ||
int | secondNodeIndex, | ||
double | targetEdgeLength, | ||
GeometryList & | refinedPolygon | ||
) |
Refines the polygon perimeter between two nodes. This interval is refined to achieve a target edge length.
The function is often used before mkernel_mesh2d_make_triangular_mesh_from_polygon
, for generating a triangular mesh where edges have a desired length.
[in] | meshKernelId | The id of the mesh state |
[in] | polygonToRefine | The input polygon to refine |
[in] | firstNodeIndex | The first index of the refinement interval |
[in] | secondNodeIndex | The second index of the refinement interval |
[in] | targetEdgeLength | The target interval edge length |
[out] | refinedPolygon | The refined polygon |
MKERNEL_API int meshkernelapi::mkernel_polygon_snap_to_landboundary | ( | int | meshKernelId, |
const GeometryList & | land, | ||
GeometryList & | polygon, | ||
int | startIndex, | ||
int | endIndex | ||
) |
Snaps the polygon to the land boundary.
[in] | meshKernelId | The id of the mesh state |
[in] | land | The land boundary |
[in] | polygon | The polygon values to be snapped |
[in] | startIndex | The start index of the polygon points to be snapped |
[in] | endIndex | The end index of the polygon points to be snapped |
MKERNEL_API int meshkernelapi::mkernel_redo_state | ( | bool & | redone, |
int & | meshKernelId | ||
) |
Attempt to redo by one undo-action.
[out] | redone | Indicates if the redo action was actually redone |
[out] | meshKernelId | The mesh kernel id related to the undo action |
MKERNEL_API int meshkernelapi::mkernel_set_undo_size | ( | int | undoStackSize | ) |
Set the maximum size of the undo stack.
Setting the size to zero will disable the undo.
[in] | undoStackSize | The maximum size of the undo stack |
MKERNEL_API int meshkernelapi::mkernel_splines_snap_to_landboundary | ( | int | meshKernelId, |
const GeometryList & | land, | ||
GeometryList & | splines, | ||
int | startSplineIndex, | ||
int | endSplineIndex | ||
) |
Snaps the spline (or splines) to the land boundary.
[in] | meshKernelId | The id of the mesh state |
[in] | land | The land boundary |
[in] | splines | The spline values to be snapped |
[in] | startSplineIndex | The start index of the splines to be snapped |
[in] | endSplineIndex | The end index of the splines to be snapped |
MKERNEL_API int meshkernelapi::mkernel_undo_state | ( | bool & | undone, |
int & | meshKernelId | ||
) |
Attempt to undo by one undo-action.
[out] | undone | Indicates if the undo action was actually undone |
[out] | meshKernelId | The mesh kernel id related to the undo action |
MKERNEL_API int meshkernelapi::mkernel_undo_state_count | ( | int & | committedCount, |
int & | restoredCount | ||
) |
Count the number of undo actions.
[out] | committedCount | The number of undo actions. |
[out] | restoredCount | The number of restored undo actions. |
MKERNEL_API int meshkernelapi::mkernel_undo_state_count_for_id | ( | int | meshKernelId, |
int & | committedCount, | ||
int & | restoredCount | ||
) |
Count the number of undo actions for a particular meshKernelId.
[in] | meshKernelId | The id of the mesh state |
[out] | committedCount | The number of undo actions. |
[out] | restoredCount | The number of restored undo actions. |