Alternate for Region Intersection for Non-planar Curves?

Newish grasshopper user here.

Working on some speaker holes for practice. Essentially, I want to be able to do what I have shown with the yellow grouped script, but on a curved/non planar surface. The problem I am running into is finding out how to do an operation like region intersection for the curved surface, because that tool doesn’t work for curves that are not planar.

I tried a different approach with curve | curve intersection tool, but I am unsure how to pull the curve boundary sections that are now a part of the holes, if that makes sense.

The 3rd photo is of the planar surface, showing what I want to end up being able to do with the holes on the non planar surface. As of now, I can’t upload the files to here. Thanks in advance

please upload .gh file, so we do not have to re-create what you already did. Regards, Eef

I guess using Point In Curves component you can you can separate the needed curves and then connect them

But as I started to make the algorithm I guess Using Trim with Region and Collision One|Many components , is a better way to solve this :


Trim with region.gh (19.9 KB)

Collision detection is slow. We can use circle detection to dispatch here.


Region Intersection for Planar Curves VR1.gh (26.0 KB)

Either use Sporph or project the your curves from the plane to the 3D surface.

:sweat_smile:


Region Intersection for Non-planar Curves VR2.gh (42.3 KB)

Thanks for this! Very helpful! Appreciate you being able to work on this even though I couldn’t upload the files!

My solution is crazy overkill.

Depending on the thickness of the part, I wouldn’t do this because the holes will cross over into each other. On the other hand, if you know that the shell is thin, you will be able to get normal vectors from UV points on a surface via Evaluate Surface. Surface Closest Point will transform regular world coordinate points to points in the UV of the surface.

You are not helping us by not posting a script.

Region Intersection for Planar Curves VR3.gh (50.5 KB)

A bit messy. Very slow, as it uses Region Difference. I can clean it up later.