Line.Intersection gives incorrect Result?

Line.Intersection gives incorrect Result?

Spyrite
Contributor Contributor
539 Views
2 Replies
Message 1 of 3

Line.Intersection gives incorrect Result?

Spyrite
Contributor
Contributor

Greetings!

 

Why when I try to find intersection between (for example) Line.CreateBound(XYZ(0,0,0), XYZ(100,0,0)) and Line.CreateBound(XYZ(25,0,0), XYZ(75,0,0))
I've got SetComparisonResult.Equal instead of SetComparisonResult.SubSet or SetComparisonResult.SuperSet?

 

Thank's.

0 Likes
Accepted solutions (1)
540 Views
2 Replies
Replies (2)
Message 2 of 3

RPTHOMAS108
Mentor
Mentor
Accepted solution

By description your arrangement of lines doesn't match any of the conditions noted since Subset and Superset mention one of the two curves being unbound.

 

Subset: unbound curve passed are argument

Superset: unbound curve used to invoke check

 

So perhaps they check the parameters of curve 'A' between its limits against those of curve 'B' and find it is equal without considering the limits of curve 'B' match (they only check for unbound status).

 

Then again I struggle to understand how parallel lines can have one common intersection (as noted by Subset). Perhaps they are parallel lines joined at ends only? These are the problems with descriptions, always open to interpretation.

 

 

Message 3 of 3

Spyrite
Contributor
Contributor

Thank's for your answer!

 

By the way, I've found that intersection between (this is an example) Line.CreateBound(XYZ(0,0,0), XYZ(10,0,0)) and Line.CrateBound(XYZ(0,0,0), XYZ(-10,0,0)) gives right Subset result, so it's actual even for two bound curves.

 

Perhaps, "parallel lines" mentioned in API discription means a common case, including that case when distance between those parallel lines is equal to zero. It's really hard to understand...

0 Likes