MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / curveFromPoints

Function curveFromPoints

source/MRMesh/MRAlignContoursToMesh.cpp:271–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271Expected<CurveFunc> curveFromPoints( const CurvePoints& cp, float* outCurveLen )
272{
273 MR_TIMER;
274 auto maybeLens = findPartialLens( cp, outCurveLen );
275 if ( !maybeLens )
276 return unexpected( std::move( maybeLens.error() ) );
277
278 CurveFunc res;
279 res.totalLength = maybeLens->back();
280 res.func = [&cp, lens = std::move( *maybeLens )] ( float p )
281 {
282 return getCurvePoint( cp, lens, p );
283 };
284 return res;
285}
286
287Expected<CurveFunc> curveFromPoints( CurvePoints&& cp, float * outCurveLen )
288{

Callers 2

bendTextAlongCurveFunction · 0.85

Calls 4

findPartialLensFunction · 0.85
getCurvePointFunction · 0.85
errorMethod · 0.80
unexpectedFunction · 0.70

Tested by

no test coverage detected