Medial Axis Generation from 2D Mesh or Multiple Curves

Hello everyone,

I am currently working on a topology optimization task and have a 2D mesh, may I ask is there any workflow / ways that I can extract the medial axis (red curves) from the mesh or its smoothed naked curves? Thank you very much!

Hello
best advice do it by hand !
There many examples on this forum of tools to find Medial Axis.

Here one result using curve

A bitt better with using a tool to have a Skeleton of an image (image thinner 3 in Nautilus plugin)

I had a similar problem and found an approach described here, which seems to be the same as the one used by the Nautilus component.
If you want a better understanding of the solution, take a look at steps one and two of the article.

Yes I use one like this and one more “geometric” but under the hood it transform curve to lines and arcs then it make a “roof” => 3 types of medial Axis
Butt, Round, Square



I have another question @laurent_delrieu:
both workflows ( the one described in the link, or the one wrapped in your components), works for planar curves.
What if the curve is non planar (some curvature, like the boundary of a road I need to use for terrain cutting)? the axis is not in the middle anymore but it’s shifted depending on the position of the curves. do you have some ideas for that? I cannot find a stable solution…

Hello
this tools uses some Rhinocommon tool to make geometry, line becomes a planar surface, arc become part of cone. So if there is tool in Rhincommon that can generate a surface using a curve and a slope it could be possible to enhance the tool. BUT it will become difficult to have a reliable tool that output Breps.
When I need something reliable I often end with Clipper. Like his one

I have difficulties navigating the differences between these components:

Are the “to Roof” components supposed to be the straight skeleton instead of the medial axes?

You are right it is a bit of a mess, I kept some old components.
“Medial Axis From Region TREE” is there to not mess with datatree


I should surely hide the “Medial Axis From Region”

Not sure it is straight skeleton as contours curves are lines and arcs.


This is the most precise Medial Axis Tool I have.

One day I must look at these tools and make some cleaning.