I am trying to utilise paper.js to get a node and its handle positions resulting from an intersection of two paths. I don’t need to render the result, I only need to position for further processing. The two open paths are as the following image illustrates:
I would know the exact coordinates of the red highlighted node and handles. How can I pull this information out of the path object? Does that work with non-closed paths?
You can get path intersections with path.getIntersections()
and split it with path.splitAt()
.
The path.firstSegment.handleIn and path.lastSegment.handleOut will give you the handle positions.