Hi Clement- Here is a script that should work in most cases-
PipeCenterline.zip (917 Bytes)
To use the script, extract and save the .rvb file from the attached zip archive, then drag and drop the saved rvb over an open Rhino V4 or v5 window. This will load the script, set it up to load on startup in the future and register the alias
PipeCenterline
that will run the script much like a regular command. An alias can be typed or added to a toolbar button or keyboard shortcut (F-key).
EDIT: a cleaned up version, as a plug-in with the command
ExtractCenterline
Should work on cones, cylinders, torii, pipes of constant radius, spheres (returns a point) and pieces of any of these. It also has the command
SurfaceRadius
ExtractCenterline.rhp (18 KB)
-Pascal