Skip to content

Inconsistent intersection points with line and path #47

@bob-pasabi

Description

@bob-pasabi

I’m having an issue getting intersections to work correctly with a path and a line. I’ve been using kld-intersections to do intersections for my custom polygon nodes and it works great. I’ve been adding a cloud node to the DAG and wanted to get the edge arrows to line up nicely with the edges of the cloud but I can’t seem to get reliable intersection points for the path.

If I take a cloud path

ShapeInfo.path(“M80,80 a20,20 0 0,0 0,40 h50 a20,20 0 0,0 0,-40 a10,10 0 0,0 -15,-10 a15,15 0 0,0 -35,10z"

And a line through it like

ShapeInfo.line([-105, -45, 245, 230])

It won’t pick up the intersections on the arc part. If I move the line it may pick up intersections inside the cloud rather that along its path.
I'm not sure if I'm doing something wrong here, I've seen way more complicated path and line intersections working so I'm unsure what is going on.

Screenshot 2019-12-24 at 18 29 22

(circles are drawn for reported intersections, I added a rect to the background as well just to check the line was ok)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions