Hi everyone,
I’m working on a workflow to calculate cut and fill volumes between two terrain surfaces:
One mesh represents the existing topography.
The other mesh represents the design surface (building pad levels).
To compare them, I want to generate two topologically similar meshes so I can analyze elevation differences face by face.
My idea is to:
Project all edges from both meshes onto a base plane.
Find all the regions (closed loops) formed by the intersections of these edges.
Use those regions as faces for a new mesh, which I can then project upward to match both original meshes.
So far, I’ve tried using the “Geometric Cell (Create Regions from a List of Curves)” component from Heteroptera, and it works only when the input lines are clearly distinct.
However, when edges are very close but not identical, the component struggles or fails to generate proper regions.
My main question:
How can I robustly compute planar regions (closed curves) from a set of intersecting polylines — especially when many are nearly overlapping?
Any tips or alternative approaches are appreciated.
Thanks!
In this example it works but when I have 2 set of lines with lot of density in certain areas with some lines very close to each other it doesn’t work properly, so I’m searching for a more consistent solution for getting the regions.
Maybe later when I have the chance I’ll post a case where it doesn’t work
[edit]@wim in R8 SR22 (8.22.25196.13001, 2025-07-15) MeshRay component outputs Nulls instead of Falses: the hit/miss output lists only True or Nulls, no Falses
but if I Replace hit/miss Nulls with Falses it produces a result:
[edit] instead of using Heteroptera’s Geometric Region + Boundary Surface (which I guess becomes progressively slower the more dense your Meshes are) you could shatter the projected Mesh Edges into smaller Line fragments using Multiple Curve Intersections, then triangulate those fragments directly? something like this, with noobish use of Mesh.CreateFromLines (but note that you need to increase the Face Valence -in the example to 6: Y variable- to have it working…)
I have rhino7 and my HIT output in the mesh ray component is True or False. I don’t know why you get nulls instead of false in rhino8, but you already solve this thing