Script to extract centerline of imported geometry - Rhino 6

Hi everyone,

I am wanting to use the centerline of some imported geometry (simple constant circular sweep) to use as a base to start some surfacing I need to fit onto the imported model. Does anyone know if Rhino 6 has a function to do this?.. Maybe someone knows how to write a script for it?.. I can extract the wireframe mesh, but there is no centerline!!

It would be a wonderfully helpful addition to be able to do this with imported geometry, and give a very useful way to rapidly and accurately integrate with new geometry made in Rhino.

Many thanks.

Hi Michael - if the object is a revolve, then the Cen Osnap will find the centers of any revolved edges - i.e. arcs for a partial revolve, circles for a full revolve (e.g. Line command, snap to the Cen of two circular edges.) - is that what you mean?


Thanks Pascal. The swept part is a polyline with fillets on it s it’s not quite as simple as that. Does your idea work for this?..

Hi Michael - any edge that is a revolved one should work:

If there are none, try DivideAlongCreases > SplitAtTangents=Yes.



Thanks Pascal, I have attached n image of the profile I am trying to get a centerline with to give you an idea…

Ah - a pipe, not a revolve sorry, I misinterpreted - on that you can actually do the same kind of thing - the little circles have centers, and the arc shaped pieces have centers as well on the edge that is along the arc.So you should be able to piece together arcs and lines.

You can try this plug-in -
ExtractCenterline.rhp (19.5 KB)

Unblock it in Windows Explorer then drag and drop it onto Rhino - the command is (if I remember right) ExtractCenterline


A script is exactly what I need, but this one is constantly causing Rhino 6 to crash… Mmmmmm.

Hmm indeed - that’s new, this thing has been pretty reliable it seems to me … can you send me or post the object?
It’s working here…
Yeah, it does not like your object… I’ll investigate. Thanks.

@michael8 - the objects are blocks - use ExplodeBlock on them first. I’ll tune the tool up to either deal correctly with blocks or filter them at selection time. Also, I noticed that although the thing allows multiple selections, it only actually does one surface at a time, apparently I did not finish typing…


Thanks Pascal, I look forward to using the revised script. Cheers.