I am writing a Rhinoscript weight estimating program. One part of the program will use curve lengths and centroids to calculate pipe weights/centers. Each curve is assumed to be the same pipe diameter. The centroid in this case is not the same as the midpoint of the curve. The only way I can see to do this is to temporarily wrap a pipe around the curve, interrogate it’s centroid, then delete the pipe. I’m starting with a known curve object. My untested code is a follows:

```
Dim arrDomain
Dim arrCentroid
arrDomain = Rhino.CurveDomain(strCrvObject)
strTempPipeObject = rhino.AddPipe(strCrvObject, Array(arrDomain(0)), Array(4), 1, 0, True)
arrCentroid = Rhino.SurfaceAreaCentroid(strTempPipeObject)
Rhino.DeleteObject strTempPipeObject, True
```

Is there a simpler way to do this that I’m not seeing?