Pipe control points

Is there a way to predetermine the number of control points when creating pipe? I have a script to create handrails based on round pipe. If I need to explode the extrusions, I find that often the surfaces have way too many control points in both u and v coords.
See example: It seems like a waste of memory to have 40 points around the circle and 12 points on a totally straight path. I can see that some extra points might be needed to control the elbows when they are part of the polysurface before exploding it but the rest of points in the rest of the straight path are unnecessary.
Reducing the accuracy in the units dialog doesn’t seem to make any difference. What determines the subdivisions?

Hello,
seems your script produce many separated pipe sections with high density .
Can you post the file ?

Unfortunately, Rhino will refit the arc elbows, resulting in a less simple surface. Also if the pipe curve is joined lines and arcs, the straight sections of the curve end up as degree 2 - the degree has to be the same everywhere in a joined curve - so even the straight pipe sections will have 4 points, not two.

The simplest surface result would be to explode the pipe curve, pipe the straight sections separately, then create the elbows with revolve and join all. But that’s a bit more complicated to script.

–Mitch

I can see the reason for the same density on the u direction but a circle can be defined with 8 points so I would have thought that the v density could be much less …
Thanks anyway.

If you use the Pipe tool, the V direction should be a rational NURBS surface with 8 points, like a circle…