Automatically detect edges to loft?

Hi all,

I’m working on a script that generates a series of ‘platforms’ based on the intersection between a topo mesh and a series of rectangular boundaries (these are the grey shapes in the image). The aim is to be able to create a solid shape that I can then cut the topo mesh with.

In order to do this I want to be able to join these platforms together into a single element. As the levels and shapes of the platforms will vary depending on the topo mesh, I’m not sure of the best way to automatically generate the infill pieces (those shown in red).

If it were simpler geometry I could do a series of loft commands, but I don’t believe this will work/be very efficient due to the number of platforms potentially generated and the differing lengths of some edges.

Is there some sort of way that grasshopper can automatically detect edges immediately above one another in the z axis and loft them? Or any other alternative way of achieving this result? Many thanks in advance!

Connect Planes_Test.gh (14.2 KB)

Hi stu!

Assuming we are working with planar, XY-parallel surfaces with congruent projected edges, this can be a fast solution:


Connect Planes_Test_re.gh (15.1 KB)

The “trick” i’ve done is by picking the “interior edges” of the joined total; casting a vertical ray from the mid-point of every found edge to intersecting the surfaces (only 2 intersection per point must be found, i didn’t add a check). Then using Z-coordinate of found intersection points to move and extrude the edges.

Hope it helps!

2 Likes

Another approach by shattering the edges, then group pairs, clean and loft.


Connect Planes_Test_ev.gh (22.8 KB)

1 Like

You can also use Boolean intersection
Connect Planes_bool.gh (11.7 KB)

1 Like

Two other solutions
Connect Planes_bool_2.gh (21.4 KB)

1 Like

Who knew there were so many ways to skin a cat?! Thanks guys, this has all been very helpful and informative :slight_smile:

@maje90 - Something doesn’t seem to be working in your script for the Extrude command just at the end. The Z vector has a value of 1, if I add a slider etc I can change the height of the extrusion, but I’m not entirely sure of how to extrude each curve by the distance between it and its associated curve. Any thoughts?

@anon39580149 - I love the bounding box concept, this seems so simple and actually applies to another issue I’d been happening so thanks for showing me this one!

You are missing a subtraction component there… Probably we have different gh version.
See the pic in my post.