line-intersect icon indicating copy to clipboard operation
line-intersect copied to clipboard

point data is not returned even though type is intersecting

Open obara-cct opened this issue 4 years ago • 3 comments

I used checkIntersection API and got the result with type="intersecting".
I expected that return object include point data but didnt as shown below image.
May I know why how I can get intersection point from checkIntersection API?
無題

obara-cct avatar May 20 '21 01:05 obara-cct

That looks like a bug.

Are you able to show your code so I can see how you are calling checkIntersection?

If not, do you remember what values were passed to checkIntersection that caused this to happen?

psalaets avatar May 20 '21 12:05 psalaets

Is following code enough for you to debug?

const intersectResult=checkIntersection(lineA.p1[0],lineA.p1[1],lineA.p2[0],lineA.p2[1],lineB.p1[0],lineB.p1[1],lineB.p2[0],lineB.p2[1]);
console.log('intersectResult',intersectResult);

obara-cct avatar May 21 '21 01:05 obara-cct

Hmm everything looks correct there.

Can you print out lineA and lineB with console.log() and show me what values are being passed into the function?

psalaets avatar May 21 '21 02:05 psalaets