Solid Pipe Centerline

Is there a way to extract the centerlines of solid pipes? See attached geometry.

Solid Pipe (1.5 MB)

This will work only when outside surface of pipe consists of two breps, almost like half-cylinder (as it is in your case), otherwise result may be unexpected or none.
Solid Pipe (1.5 MB)

1 Like

This is what I did. Works if the pipes are straight.

Solid Pipe (7.6 KB)

Generally, your approach is OK.
But in case when pipe is short and “thick” it will fail - see below.
Workaround is to check which face has smaller curvature and assume that it is cap-face. But this will fail in case if cap is not single-surface-brep.

Solid Pipe (17.1 KB)

1 Like

Yeah, I know. And it will only work if the profile is straight. But it is a cool little problem. Maybe there is a way to create an almost universal solution.

When I got it right and if the pipe is made like in Radovans example this could also work:

File:Solid Pipe (1.5 MB)