[Closed] Automatically detect intersections in a spline and add vertex's
Hello all…I would like to know if there is a possible way to detect intersections in two splines and add vertex’s wherever there is an intersection.
That’s a good question. For straight lines it wouldn’t be hard calculating the vector intersections, but with smooth/bezier segments? No idea.
On the other hand, you can already display the intersection points with the shape check utility. Unfortunately there is no way to use this data I’m afraid.
Probably the way to go is segmenting the spline to straight segments, and then calculating the intersections.
Bbox around each selected spline
Aabb tests
Bbox around each segment of each returned spline
Aabb tests (octree to accelerate if you want), store as key/vals (segment, intersectors)
Bbox around each curve segment in result and filter out non intersectors
Step through each returned curve segment to find actual intersection points