Can you please recommend an algorithm for computing the length of a nurbs curve?
We are using openNURBS to transfer 3D geometry to our meshing application. As part of this geometry transfer, we need to manually control the discretisation of some curves based on their length. OpenNURBS includes functionality for computing the length of all curves bar ON_NurbsCurve:
ON_ArcCurve using ON_Arc::Length()
ON_LineCurve using ON_Line::Length()
ON_PolylineCurve using ON_Polyline::Length()
I followed up on the original posts where it was mentioned that ON_NurbsCurve::GetLength() existed in OpenNURBS earlier versions, but was then removed in later versions. However, the oldest and latest versions I could find with this function present was OPENNURBS_VERSION 200306060 and OPENNURBS_VERSION 201209145, respectively, but both, in their opennurbs_nurbscurve.cpp, only have the following:
const ON_Interval* sub_domain
// 3rd party developers who want to enhance openNURBS
// may provide a working GetLength here.
if ( length )
*length = 0;
Therefore I either haven’t gone back to an old enough version of openNurbs, or something else is going on. To that end, can you please recommend resources/references/etc to develop a working GetLength?