Curve overlap issue / find matching edges

crv_deviation.3dm (167.7 KB)
@dale
I’m using this method to analyse relations between curves, but run into an issue that Rhino finds overlap while in my opinion it shouldn’t, see the attached example file.
I’m using it to find matching edges of surfaces, but maybe there is a better way?

Hi Gijs,

my2c:

I’ve a note in our codebase to avoid Curve.GetDistancesBetweenCurves
also see:

Possibly for other reasons but still, if like in your case you know the context is always curves touching on either end (or not) I’d check for that:
test the the 4 distances between ends and starts to draw your own conclusion about the relationship.

-Willem

1 Like

Hi Willem, thanks for this. That looks indeed very unreliable. In my case it’s a bit more complicated than touching on either end or not. I figured out there are 9 different cases for an edge pair to be considered ‘joinable’. Edges don’t need to be of same length, but I think I can test for distances of the ends to the other edge bidirectional and figure out if I have at least two matches…

Hi @Gijs,

The results seem consistent with the CrvDeviation command. What am I missing?

– Dale

yes it is consistent, but it’s strange that it finds overlap in the first place for the first two curves, while not for the third case, isn’t it? I would expect that neither of the curves would return an overlap, right?

The Intersect command finds overlaps in all three cases. So I agree that it’s odd that CrvDeviation reports not overlap for the 3rd set. I’ve logged this so we can have a better look.

https://mcneel.myjetbrains.com/youtrack/issue/RH-66836

– Dale

1 Like