Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Mesh2dInsertEdgeFromCoordinates #58

Merged
merged 5 commits into from
Mar 28, 2024

Conversation

lucacarniato
Copy link
Contributor

No description provided.

@lucacarniato lucacarniato marked this pull request as ready for review March 27, 2024 16:44
@@ -1040,6 +1040,25 @@ public interface IMeshKernelApi : IDisposable
/// <returns>Error code</returns>
int Mesh2dInsertEdge(int meshKernelId, int startVertexIndex, int endVertexIndex, ref int edgeIndex);

/// @brief Insert a new mesh2d edge from 2 coordinates
/// <param name="meshKernelId"> The id of the mesh state
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an explanation that if the coordinate does not (exactly? within some radius?) match a vertex, then a new one is created.

@@ -156,6 +156,67 @@ public void Mesh2dInsertEdgeThroughApi()
}
}

[Test]
public void Mesh2dInsertEdgeFromCoordinatesThroughApi()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to also have a test with inserting an edge with only one coordinate matching an existing vertex, and one with no coordinate matching an existing vertex.

@lucacarniato lucacarniato merged commit e0a604f into main Mar 28, 2024
@lucacarniato lucacarniato deleted the feature/GRIDEDIT-992_add_api_for_inserting_edges branch March 28, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants