[QUESTION] ON_Curve::IntersectCurve()

Hello everyone,
I meet some problem when I use ON_Curve::IntersectCurve() to find which curves are overlapping.
These are two tolerance in ON_Curve::IntersectCurve().
1. intersection_tolerance
2. overlap_tolerance
I adjust overlap_tolerance to find the overlapping curve,but I found that intersection_tolerance value influences result.
For example,These are two very closed curves. Max distance between two curves is 0.005.
when I set intersection_tolerance = 1 ,overlap_tolerance = 0.004 ,I got one overlapping curve.
when I set intersection_tolerance = 0.1 ,overlap_tolerance = 0.004 ,I got three overlapping curves.
I want to know why adjust intersection_tolerance value will influences the overlapping result?
If I just want to get overlapping result how much intersection_tolerance value I should adjust?

@GregArden is this something you can help with?

In Rhino I think we usually have IntersectTolerance == OverlapTolerance.

Other combinations are not used and therefore have only been lightly tested. So if you want overlap tolerance of .004 I suggest you also set intersection tolerance to .004.

In the example you show I believe the right answer is a single overlap like you show on the left.

Looking at the code a little more it seems that OverlapTolerance< IntersectionTolerance is likely to be a problem. I opened a bug .

However, the real solution is to use OverlapTolaerance == IntersectionTolerance.

1 Like