Sorry but yet another thing that’s bugging me and that I can’t figure out.
The developers kit lists this method for polylines:
CenterPoint Compute the center point of the polyline as the weighted average of all segments.
Here is a polyline set at the origin (the center is a point placed at the center Osnap):
Here is the excel calculation for the 8 line segments:
So why does Rhino show (2, 2.25) for the centre and excel has (2.11, 2.39)?
Thanks for clearing that up. I thought the picture of the curve was in the post but here it is again.
Since the method indicated a “weighted average of all segments”, I was multiplying the segment length by the x and y positions of the segment centres. Summing
them up and dividing by the polyline length. I’ll have to think about how/why/when I might use the average of the segment endpoints. But at least I now know what the calculation is doing!!