Curve Intersection Node

Hi All,

I’ve packaged the curves intersection node patch I’ve been working on. It would be useful to get user feedback on performance and usefulness of the node in its current state. (Usual caveats of package builds apply)
Download: Blender Builds - blender.org
PR: https://projects.blender.org/blender/blender/pulls/109393

This uses a bvhtree to store the curve segments. These are then sampled according to the mode.

Outputs curve intersections as a collection of points with the following attributes.

  • position
  • curve_index
  • length (intersection as length along curve)
  • factor (intersection as factor of curve length)
  • direction (of the curve segment where intersection is found)
  • duplicate (mark if intersection between two curves is duplicate of first match)

Four modes:
Self - checks a spline for self intersections only
All - checks all spline edges for intersections
Plane - checks all spline edges for intersections with a plane
Surface - checks all spline edges for intersections with a mesh

Inspired by this post in stackexchange:

Surface intersections (1000 lines, two monkeys, 23ms)
image

13 Likes

Just humble user experience here:
For a long time I was trying to make my “sections” setup (there is existing solution from Higgsas, which I cannot understand).
With this node + for each Zone it is super easy, snappy, made it in no time!
For planes existing node groups might work (though with much more complicated setup), but “Surface” option could unlock crazy possibilites.

*edit: merge by distance node in For Each Zone is a mistake, ignore please

Thank you so much for this patch! I hope it will land soon in Master, super useful!


blender file

1 Like

Thanks for the feedback and test file. Highlights a crash bug I need to fix.

1 Like

Crash bug fixed and repackaged. There is also a surface intersection speed improvement but that will be in next package.

1 Like