Notifications
Clear all

[Closed] Bridge continuous open edges?

Hey guys!

I’m working on a tool to close holes in geometry and for this I need to able to bridge two continuous open edges in a nice and clean fashion:

Using 3dsmax’s bridge yields a result, but usually it’s messy, because the borders have different vertex number and distribution.
From searching the web, it seems that looking into the delaunay triangulation is a step in the right direction, but even then it’s tricky because in this case I already have some faces and only need to add some – a simple convex hull around the border vertices would not be usable.

The thought of having to implement a 2.5-dimensional delaunay trianglulation algorithm makes my head spin… :s

How would you deal with this problem in the most effective manner?

Cheers!
-sascha

4 Replies

Well… an easier method might be to select one side of the open area, and convert to a vert selection.

Then the script could convert all those edges to verts, and subtract chosen verts from those. So then it could do distance checks for each vert in the original selection, and the next closest one it finds (of the second vert array), it would weld that extruded vert to that one.

Does that make sense?

Yeah, I tried what I kind of mentioned but… ya… this is a bitch, haha.

The hardest part is just trying to get the triangles to not overlap as they are created… as I’m sure you know.

I’m trying to figure out how to loop through a vertex selection in a way that it creates a tri, then excludes some of the verts it just used, so that when it tries to create the next one, it cant use those verts and create an overlapped face.

I’ve just been doing distance checks for each vertex in the selection as it goes along. So it finds the 2 closest ones to the current one in the loop, to make the tri.

Anyone else have an idea about how to do this… :banghead:

Thanks for the inspiration!

It took a while, but ended up with a solution – making many assumptions about the input geometry.
I would have loved to come up with a very general algogrithm, but it seems that even in the field of triangulation math, there’s no one-size-fits-all solution and those that exist are complicated to implement for my case.

So in the end I went by vertex proximity really.
First I extrude all border-edges of one island and weld the new verts to the closest vert of the other island. After that step all verts of the first island will be connected.
Then I loop through the remaining verts of the other island, find the closest open edge on the other island and divide that edge as close to the vert as possible – then the new verts gets welded again.
Here’s an animation to illustrate the steps:

It sounds simple on paper, but I needed to do use a lot of sorting and vert-flagging tricks, because the vertex-order changes constantly.
Also the algorithm will generate overlapping triangles if an edge has exotic ‘cavities’ or if there are very many vertices in a small area, but for my purpose this should happen rarely.

Very cool :applause: Yes, I know what you mean about vertex order changing… that can be a nightmare… 🙁

I was trying to mess with this more, but I never tried my original idea exactly that I posted :P.

Good work.