Curve.DivideByLength

Hi,

just wanted to report possible typo with variable naming in api.

Curve.DivideByLength with overload which takes bool for ‘includeEnds’ linked below… This is a little confusing as it doesn’t include Ends , only start parameter. Maybe this variable needs to be renamed to includesStart? I was wondering why it wasn’t working until i actually read the documentation :]

https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Curve_DivideByLength_2.htm

I’ve always found that a bit odd as well, but renaming the method now would break an awful lot of (my) code :grimacing:

Hi Jeremy,

If the length you want to divide by fits the curve length exactly N times, you will get both the start and end included or excluded.
So the naming is correct.

-Willem