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.
STITCH_EDGES_V2.gh (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)
Thanks!
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
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.
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…
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!
@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)
Thanks!
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:
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.