Here’s another script based off particleToCurve which extrudes a tube. This script will create a curve and then create a disk with one internal face. The nice thing about the disk being created with a nurbs circle lofted, is that when the construction history is left on you have the ability to add control vertices to the circle. If your resolution is too high or low you can quickly edit this without having to re-run the script. This could also be adjusted within the script if desired along with the length of the edges produced. To get a proper number of spans I query the length of the curve, then multiply that value based off the density desired. When you have dense geometry and a lot of tubes you can quickly get into the millions of polys.
The original script used a nurbs circle and a nurbs curve to extrude a poly tube using the extrude command. This seemed like a great idea at first but when it came to rendering it posed a lot of issues, most notably being an issue with the poly count increasing on the geometry in every frame. Mental Ray and Octane threw fits when these values changed and sometimes refused to render (or crashed completely).
In the end I used a disk with one face and extruded the face down the curve using the polyExtrudeFacet command. This way the poly count is fixed permanently and is much cleaner to work with. You can find the script here.