Mesh Between 2 Sets of Points Along Curves

I have 2 sets of points along 2 curves that I want to create a mesh between.

If the curves were straight lines, this would be easy - I could just take point n from curve1 and points n & n+1 from curve 2 and create a mesh face - but because they are curves the points do not stay adjacent as the curves bend and the mesh faces do not stay within the curves.

My attempt in the attached definition with internalised point data takes the point n from curve 1, the closest point in curve 2 and then the closest point from that in curve 1 or curve 2. It works in places but not all along the curve.

It feels like I need some script to do this but I would prefer to do it in native GH. (13.2 KB)

2019-09-23%2013_09_25-Window (9.8 KB)
Only late i’ve seen those are not XY flat point sets… but it is still working.
Concept might be handy.
(won’t work with complex 3d point sets)

The concept makes sense but unfortunately not working in R5 although I can’t see why it wouldn’t… I get an invalid mesh out of the CullF component.
I’ll try and recreate it from scratch in R5 and see if it works.

EDIT: Had to change the direction of the SDL Line and it worked

@maje90 gave me some ideas. It looks good but given the snakeiness, it’s kind of hard to tell if it is good.

I forgot to weld the resulting mesh. (9.0 KB)

I think this will have the same issues I faced… because the points do not stay adjacent along the curves (i.e. at the start pt1a is next to pt1b but in the middle pt16a is next to py18b) then the Extruded surfaces you create become crossed over.

You could make a closed polyline and then triangulate it. Like so: (8.3 KB)


Yes, that SDL part is really silly, it was just the simplest method to have a small but working solution.
Any other method to cull unwanted faces will be good.
I just think that delanuary mesh is really useful in this context… if points are enough “projectable” to a plane…

Edit: Anders solution is way better! Well done!

1 Like

Thank you! This is really nice. I’d wondered whether I’d need code to do this and imagined all kinds of complicated ways of looping through the points and connecting them. It would have probably taken me a month and been 1700 lines of code so it’s great to see someone do it so simply!

1 Like

I had looked at delaunay but didn’t think to cull unwanted faces. Certainly a good concept to have in the toolbag for future.

@AndersDeleuran 's solution is pretty sweet! If it’s just 2 lines…You could do something like this as well. (requires weaverbird’s mesh from lines)

1 Like

Any idea why it doesn’t work on these points? (3.7 KB)

I think, if you try this on curves that are close together with high curvature, the mesh faces get messed up if the points become out of sync along the curves… i.e. because the outer curve is longer and the points are evenly spaced, it’s points lag behind the inner curve so the mesh edges cross over the curve boundary.

Ah yes, the triangulate method has been known to not always work predicatively in all cases. A simple/robust/efficient method is to generate ruling lines between the two set of points, and then mesh these (as a two-dimensional point grid), here using the components from Mesh Edit: (8.5 KB)

1 Like

This looks good for when there are equal numbers of points in each curve.

It’ll definitively be more predictably with even points. But you can (as this demonstrates) generate the rulings from uneven amounts as well. Though I’m sure there are cases here as well where this won’t work so well.

1 Like