MCPcopy Create free account
hub / github.com/BIMCoderLiang/LNLib / GetTotalChordLength

Method GetTotalChordLength

src/LNLib/Algorithm/Interpolation.cpp:39–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39double LNLib::Interpolation::GetTotalChordLength(const std::vector<XYZ>& throughPoints)
40{
41 int n = throughPoints.size() - 1;
42 double length = 0.0;
43 for (int i = 1; i <= n; i++)
44 {
45 length += throughPoints[i].Distance(throughPoints[i - 1]);
46 }
47 return length;
48}
49
50std::vector<double> LNLib::Interpolation::GetChordParameterization(const std::vector<XYZ>& throughPoints)
51{

Callers

nothing calls this directly

Calls 1

DistanceMethod · 0.45

Tested by

no test coverage detected