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

GRIDEDIT-617 Added spline snapping to api #208

Merged

Conversation

BillSenior
Copy link
Contributor

No description provided.

landBoundaryPoints[i] = meshkernel::Point({land.coordinates_x[i], land.coordinates_y[i]});
}

for (int i = 0; i < splines.num_coordinates; ++i)
Copy link
Contributor

Choose a reason for hiding this comment

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

what if multiple splines are provided? start/end index refer to the selected spline corner's point

meshkernel::LandBoundary landBoundary(landBoundaryPoints);
meshkernel::Splines splineValues(meshKernelState[meshKernelId].m_mesh2d->m_projection);

splineValues.AddSpline(splinePoints, startSplineIndex, static_cast<meshkernel::UInt>(splinePoints.size()));
Copy link
Contributor

@lucacarniato lucacarniato Jul 31, 2023

Choose a reason for hiding this comment

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

suppose we pass to the API only the spline that needs to be snapped in a set of several splines, the startSplineIndex and endSplineIndex would not be required. what we need instead are the indices of the the corner points defining the portion of the spline that will be snapped

@BillSenior BillSenior merged commit 894e79b into master Aug 4, 2023
4 checks passed
@BillSenior BillSenior deleted the feature/GRIDEDIT-617_api_function_span_spline_to_land branch August 4, 2023 09:42
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