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

Feature/gridedit 992 add api for inserting edges #319

Merged
merged 10 commits into from
Mar 27, 2024

Conversation

lucacarniato
Copy link
Contributor

No description provided.

Comment on lines 1635 to 1637
{
auto result = meshKernelState[meshKernelId].m_mesh2d->InsertNode(firstNodeCoordinates);
firstNodeId = std::get<0>(result);
Copy link
Contributor

Choose a reason for hiding this comment

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

You may get a sonarcloud warning here to use structured binding.
Could use std::tie

Comment on lines 1645 to 1647
{
auto result = meshKernelState[meshKernelId].m_mesh2d->InsertNode(secondNodeCoordinates);
secondNodeId = std::get<0>(result);
Copy link
Contributor

Choose a reason for hiding this comment

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

here too

Comment on lines 1625 to 1627
const auto newEdgeLength = ComputeDistance(firstNodeCoordinates, secondNodeCoordinates, meshKernelState[meshKernelId].m_projection);
const auto edgeLengths = meshKernelState[meshKernelId].m_mesh2d->m_edgeLengths;
const auto lengthFraction = 0.01;
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps make edgeLengths a reference
Unless mesh->m_edgeLengths is modified later and you do not want t get these updates.

@lucacarniato lucacarniato marked this pull request as ready for review March 27, 2024 16:46
@lucacarniato lucacarniato merged commit 19e08d5 into master Mar 27, 2024
12 of 13 checks passed
@lucacarniato lucacarniato deleted the feature/GRIDEDIT-992_add_api_for_inserting_edges branch March 27, 2024 16:58
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.

None yet

2 participants