<p>This is more of a long comment</p>

<p>Yes you can do this. The problem lies in how you measure the surface. I tried to do this manually by progressively extruding tubes along the edges, and finding their intersection with the surface. It would work but is a bit hard to compute. Obviously you may want to take more steps than i did for a more accurate solution. </p>

<p><a href="https://i.sstatic.net/IbXPj.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/IbXPj.png" alt="enter image description here"></a></p>

<p><strong>Image 1</strong> Straight skeleton (magenta)  and insets by finding the intersection of tubes along edges, and then the created edges on mesh (blue) 
From this experiment I can conclude that are many complex cases to consider.</p>

CC BY-SA 3.0
2016-03-30T16:43:19.203Z
2016-03-30T18:15:13.220Z
2016-03-30T18:15:13.220Z
joojaa
<p>I have a set of closed loops on the surface of a non-self-intersecting triangle mesh, and I need to create inset versions of them on the surface of the mesh. In other words, I want to generate a <a href="https://en.wikipedia.org/wiki/Straight_skeleton" rel="noreferrer">straight skeleton</a> from them.</p>

<p>Within each single triangle of the mesh, this algorithm should behave just like a 2D straight skeleton.</p>

<p>I've found several tools for offsetting loops of edges in a mesh, or generating loops equidistant from a point on the mesh, but I need to be able to input arbitrary loops of my own and offset them.</p>

<p>I ran through various corner cases by hand on some graph paper, and it seems to me the algorithm described by <a href="http://www.dma.fi.upm.es/personal/mabellanas/tfcs/skeleton/html/documentacion/Straight%20Skeletons%20Implementation.pdf" rel="noreferrer">Felkel and Obdrzalek</a> should be perfectly applicable, except the wavefront may at times have to switch between contracting and expanding when it encounters geometries that give it more space.</p>

<p>This algorithm seems like it would be useful in several CAM applications, does anyone know of an existing implementation?</p>

CC BY-SA 3.0
2016-03-17T21:41:28.000Z
Do you want the insets to travel on the surface itself?
joojaa
CC BY-SA 3.0
2016-03-17T22:35:39.817Z
Yes, on the surface.

I've found papers for insetting 3D shapes in 3D, but I need to adhere to the surface.
Nick Parker
CC BY-SA 3.0
2016-03-18T18:37:10.940Z
This is easier for cad applications as they have mathematically better surfaces than polygon meshes. But yes you could extrude tubes of varying sizes along edges then repeat and you'd get a good approximation. Its just that defining what distance along internal polygons is shortest and valid one is a bit hard.
joojaa
<geometry><computational-geometry>
Can I run polygon insetting on the surface of a mesh?
Nick Parker
# Can I run polygon insetting on the surface of a mesh?

(Asked by: username_0 on 2016-03-17)

I have a set of closed loops on the surface of a non-self-intersecting triangle mesh, and I need to create inset versions of them on the surface of the mesh. In other words, I want to generate a [straight skeleton](https://en.wikipedia.org/wiki/Straight_skeleton) from them.

Within each single triangle of the mesh, this algorithm should behave just like a 2D straight skeleton.

I've found several tools for offsetting loops of edges in a mesh, or generating loops equidistant from a point on the mesh, but I need to be able to input arbitrary loops of my own and offset them.

I ran through various corner cases by hand on some graph paper, and it seems to me the algorithm described by [Felkel and Obdrzalek](http://www.dma.fi.upm.es/personal/mabellanas/tfcs/skeleton/html/documentacion/Straight%20Skeletons%20Implementation.pdf) should be perfectly applicable, except the wavefront may at times have to switch between contracting and expanding when it encounters geometries that give it more space.

This algorithm seems like it would be useful in several CAM applications, does anyone know of an existing implementation?

**Tags:** geometry, computational-geometry

> **Comments:**
> **username_1**: Do you want the insets to travel on the surface itself?  
> **username_0**: Yes, on the surface.  I've found papers for insetting 3D shapes in 3D, but I need to adhere to the surface.  
> **username_1**: This is easier for cad applications as they have mathematically better surfaces than polygon meshes. But yes you could extrude tubes of varying sizes along edges then repeat and you'd get a good approximation. Its just that defining what distance along internal polygons is shortest and valid one is a bit hard.  

---

## 1 answers

### Answer by username_1 on 2016-03-30. Score: 3 | Accepted answer

This is more of a long comment

Yes you can do this. The problem lies in how you measure the surface. I tried to do this manually by progressively extruding tubes along the edges, and finding their intersection with the surface. It would work but is a bit hard to compute. Obviously you may want to take more steps than i did for a more accurate solution.

[![enter image description here](https://i.sstatic.net/IbXPj.png)](https://i.sstatic.net/IbXPj.png)

**Image 1** Straight skeleton (magenta) and insets by finding the intersection of tubes along edges, and then the created edges on mesh (blue)
From this experiment I can conclude that are many complex cases to consider.


---

