Contiguous Mesh/Plane Intersection

Hi talented Grasshopper peoples.

I’m trying to take sections of a scanned mesh at various points and orientations, and I’m finding it challenging to sort out and only get the sections I want given the input is one continuous mesh that has multiple protrusions, and I’m looking to only take one intersection per protrusion and limit the range of the intersection to only output the first intersection with the mesh, as originating from planes/points that are identified inside.

I can’t share the original context so I’ve prepared an example definition that shows the general shape of the problem:

ExampleMeshIntersectionQuestion.gh (14.2 KB)

What I’m looking for is rather than getting intersections through the whole mesh on every intersection plane radiating out from each center point on the protrusions, I only want the first intersection, and I expect I’ll either need to generate all intersections and down-filter by the curve with the closest points, or use ray-casting/intersect in a more nuanced way than the default component offers.

What the default gives me:

What I want: (only the unique per-point/per-plane contiguous curves on each protrusion)

Any advice on how to do this procedurally? The end goal is to use medial axis lines and perpendicular frames to cast the sections to segment the mesh.

Use Point in Curve to filter the list of curves generated by each plane

What I struggle with is how to keep the data-tree clean, do you have any examples/structure for how you’d set that up?

If I try to directly test without flattening the incoming curves list I get “outside” results for all 5 points across all curves:

Also, the point projections to the region planes look sensible, so not sure why I’m not getting any “2” results, for “inside” the boundaries.

Then when I do flattening on the section outputs, I get two “2” results from the point-in-curve assessment across the total of 24 results:

So I’m still missing something.

I figured it out and managed to get fitted ellipses as my output. Sharing for posterity here:

I needed to graft the incoming planes to the mesh/plane intersection, so that everything had the correct tree depth. Of course as soon as the section goes from the desired sub-section to overlapping with the base object (due to the angle or height offset) it messes up, but it’s progress:

When the sections touch the base:

ExampleMeshIntersectionQuestion.gh (16.1 KB)

I don’t understand why you are intersecting the entire object instead of just the individual cylinders:

This is just a proxy assemblage to represent something loosely similar to the task I’m up against: the original case isn’t a constructed-and-unioned thing that I can go back into earlier step in the definition and handle separate bodies from. If it was, I would :wink:

Assume the starting point, for all sakes and purposes, is the mesh generated at the end of the construction step, which is loosely equivalent to a 3d scan of an object where I want cross-sections of individual protrusions.

The protrusions are not all normal to the surface, they vary in angle, so the slice angle will be driven by a medial axis running through each one (hence why these aren’t all just horizontal).

@Jonathan_Kolodner
Is this what you’re after?

ExampleMeshIntersectionQuestion_NL.gh (11.5 KB)

1 Like