<p>Assume you have two meshes <span class="math-container">$M1$</span> and <span class="math-container">$M2$</span> and that each has a boundary <span class="math-container">$b1, b2$</span>. You want to connect the two boundaries together.</p>
<p>If both boundaries had the exact same number of vertices, then you could add a line between each point of <span class="math-container">$b1$</span> and each point of <span class="math-container">$b2$</span> and triangulate the resulting quads.</p>
<p>I am at a bit of a loss for the more general case where the number of points in the boundary don't necessarily match.</p>

CC BY-SA 4.0
2024-10-12T20:57:31.923Z
Even in the case where the vertices are of equal count it is not clear that what you described is "the correct" gluing. In fact any parametrization would probably do. So the problem is underdetermined. If you wish you could parametrize by arclength divided by total length - then both parametrizations would go from $0$ to $1$, and you can match them as such - you'll still have to choose a starting point for both though. Also the part that glues is homeomorphic to a cylinder, but there are infinitely many meshes homeomorphic to a cylinder.
lightxbulb
CC BY-SA 4.0
2024-10-12T22:04:58.057Z
@lightxbulb This works in the case where you are stitching together parametrized boundaries. But if you have a discretized mesh then you have to deal with a quantization of how one maps to the other.

I know how to do the stitching in the continuous setting, but in here I must stich meshes without introducing new points.
Makogan
CC BY-SA 4.0
2024-10-12T22:20:31.587Z
Ok, additional constraint: no new vertices. Even with it there are a large number of ways you can match the vertices from one of the boundaries to the others. To simplify the problem unroll the cylinder. That is, fix a vertex $v_1^0$ from $b_1$ and a vertex $v_2^0$ from $b_2$, and let those be connected. Then you can draw the sequence: $v_1^0, \ldots, v_1^n, v_1^0$ as a flat line segment along $Y=0$ and the sequence $v_2^0,\ldots,v_2^m, v_2^0$ along say $Y=1$. There are a very large number of valid triangulation that you can form between these. It's not clear which of them you should prefer.
lightxbulb
<mathematics><computational-geometry><geometry>
Stitching two mesh borders with non-equal vertex counts?
Makogan
# Stitching two mesh borders with non-equal vertex counts?

(Asked by: username_0 on 2024-10-12)

Assume you have two meshes $M1$ and $M2$ and that each has a boundary $b1, b2$. You want to connect the two boundaries together.

If both boundaries had the exact same number of vertices, then you could add a line between each point of $b1$ and each point of $b2$ and triangulate the resulting quads.

I am at a bit of a loss for the more general case where the number of points in the boundary don't necessarily match.

**Tags:** mathematics, computational-geometry, geometry

> **Comments:**
> **username_1**: Even in the case where the vertices are of equal count it is not clear that what you described is "the correct" gluing. In fact any parametrization would probably do. So the problem is underdetermined. If you wish you could parametrize by arclength divided by total length - then both parametrizations would go from $0$ to $1$, and you can match them as such - you'll still have to choose a starting point for both though. Also the part that glues is homeomorphic to a cylinder, but there are infinitely many meshes homeomorphic to a cylinder.  
> **username_0**: @username_1 This works in the case where you are stitching together parametrized boundaries. But if you have a discretized mesh then you have to deal with a quantization of how one maps to the other.  I know how to do the stitching in the continuous setting, but in here I must stich meshes without introducing new points.  
> **username_1**: Ok, additional constraint: no new vertices. Even with it there are a large number of ways you can match the vertices from one of the boundaries to the others. To simplify the problem unroll the cylinder. That is, fix a vertex $v_1^0$ from $b_1$ and a vertex $v_2^0$ from $b_2$, and let those be connected. Then you can draw the sequence: $v_1^0, \ldots, v_1^n, v_1^0$ as a flat line segment along $Y=0$ and the sequence $v_2^0,\ldots,v_2^m, v_2^0$ along say $Y=1$. There are a very large number of valid triangulation that you can form between these. It's not clear which of them you should prefer.  

---

## 0 answers

