Curve curve intersection bug? How to distinguish between the event types ( i.e. point and overlap ) ? THX

Hi, guys!
I use the curvecurveintersection method to get the intersection point of 2 curves, but I get the event2 (i.e. overlap type). why? Is this a bug?


Sorry if it’s a very basic question.

Thanks

Hi @geomlee,

Are you able to post your file?
The following could be an issue:

  • The objects are very far from origin.
  • The curves are short and there is a a tolerance issue.

These are the only things I can think of.

Hi, @christopher.ho
Thanks for your answer. Here is the file.ccx.gh (4.5 KB)

I tried to move the 2 curves to close to the origin, but the situation didn‘t change.
And the method (curve curve intersection) has not the tolerance parameter.

Can you help me find the problem?
Thank you very much!!!

Hi @geomlee,

The tolerance parameter comes after the y value and is optional, but it doesn’t seem to make a difference here. Maybe @DavidRutten or someone at McNeel might know more.

@christopher.ho
Thanks for your help!

Hi, @DavidRutten
I’m sorry to trouble you.
I want to know if you have time to see the question mentioned above.
Thank you!

Could be that as your end points are near the intersection it is detecting an overlap. You may want to use the rhino common implementation: Rhino.Geometry.Intersect.Intersection.CurveCurve

https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Intersect_Intersection_CurveCurve.htm

This has separate overlap and intersection tolerances.

Hi, @dom.beer43
Thanks for your help.
I tried to use rhinocommon yesterday.
Here is my code.

When the overlap_tolerance = 0, the events count is 1, and the event is overlap.
But when the overlap_tolerance = 0.00000001, the events count is 3, and the event is point.
So I’m very confused :joy:.
Why the events count is 3? There is only 1 intersection point.

Can you tell me what does the tolerance mean?
Thank you very much!!!

Hi, @GregArden
I’m sorry to trouble you. The problem above has confused me a long time.
I have some questions:

  1. Why the point event can be identified as the overlap event.

  2. How dose the method (Rhino.Geometry.Intersect.Intersection.CurveCurve) work?

  3. What do the overlap and intersection tolerances mean?
    Thank you very much !!

Generally you should use Intersection_tolerance = overlap_tolerance = Rhino_Absolute_Tolerance. The suggested Rhino Absolute tolerances provided in the template files range from .01 to .001 an experienced user with might find it useful using numbers from .1 to .0001 in certain circumstances.

Set up the Rhino tolerances as suggested in https://wiki.mcneel.com/rhino/faqtolerances
Use the Rhino model absolute tolerance value for any computations that require a tolerance.

Thank you very much!!!
I will try it.