From 5148ef1b3d114b235f092275c59179d5da51bf84 Mon Sep 17 00:00:00 2001 From: Fedor Chelnokov Date: Sun, 5 Jan 2025 23:56:05 +0300 Subject: [PATCH] SplineSettings/normals in MRMarkedContour.h --- source/MRMesh/MRMarkedContour.cpp | 2 +- source/MRMesh/MRMarkedContour.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source/MRMesh/MRMarkedContour.cpp b/source/MRMesh/MRMarkedContour.cpp index 84e81444b86b..218a2fa2935f 100644 --- a/source/MRMesh/MRMarkedContour.cpp +++ b/source/MRMesh/MRMarkedContour.cpp @@ -209,7 +209,7 @@ MarkedContour3f makeSpline( const Contour3f & controlPoints, const SplineSetting for ( auto m : res.marks ) res.contour[m] = controlPoints[n++]; } - res = makeSpline( resample( res, settings.samplingStep ), settings.controlStability ); + res = makeSpline( resample( res, settings.samplingStep, settings.normals ), settings.controlStability ); } return res; } diff --git a/source/MRMesh/MRMarkedContour.h b/source/MRMesh/MRMarkedContour.h index 45e5f10a3659..14305d825176 100644 --- a/source/MRMesh/MRMarkedContour.h +++ b/source/MRMesh/MRMarkedContour.h @@ -54,6 +54,9 @@ struct SplineSettings /// which in turn depends on the length of input contour being sampled; /// setting iterations greater than one allows you to pass a constructed spline as a better input contour to the next run of the algorithm int iterations = 1; + + /// optional parameter with the normals of input points that will be resampled to become normals of output points + Contour3f * normals = nullptr; }; /// \param controlPoints ordered point the spline to interpolate