PolylineCurve with CurveSelf Intersection not acting as expected

Hi All,

I’m trying to wrap my head around how the Rhino.Geometry.Intersect.Intersection.CurveSelf class deals with Polyline Curves. See images below and attached files for case reference.

As far as I can tell it works as expected when the intersection event type is a point (see Case C). However it seems to miss cases where the intersection event type is an overlap (see Case D and E). This might just be me misunderstanding how the class is supposed to work. However, I’ve made two additional observations that makes me think that this might not be the case:

  1. Performing Curve-Curve intersections on two polylines returns the results I would have expected. That is, a single point-point intersection returns one event and the event.IsOverlap property is False (see Case A), and, a single overlap intersection returns one event and the event.IsOverlap property is True (see Case B).

  2. When performing Curve-Self intersection on a polyline where overlapping edges/vertices lie on a line, only the first and last vertices are considered intersections (see Case D). When the edges/vertices are NOT on a line, all the vertices are considered intersections.

In the attached Grasshopper file I’m calling the intersection functions using GHPython to get the IsOverlap property, but I have also verified this behaviour using the respective GH components.

Any ideas?

Best,

Anders

Ps. Cross-post on the Grasshopper forum. Apologies, but I figured that you McNeel devs might not see this over there.

160122_PolylineCurve_CurveSelfIntersectionOverlaps_01.gh (90.0 KB)

Came up with a workaround that does what I was looking for. In case anyone else comes across this issue. /Anders

Can you post some geometry that does not work as you would expect?

Hi Dale. I attached a Grasshopper file with the five cases in the original post, which has the geometry and annotations internalized in the file. I have also attached just the geometry as a Rhino file below. Best, Anders

160126_PolylineCurve_CurveSelfIntersectionOverlaps_01.gh.3dm (475.8 KB)

Hi @AndersDeleuran,

Thanks - I’ve reported this. I appears point intersections are detect, but not overlap.

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

– Dale

2 Likes

Yeah, I seem to recall hearing this in the past as well. --Mitch

Encountering the same issue using Intersection.CurveSelf() in an application I’m currently developing on top of Rhino.
Any update?

Hi @iltabe,

Can you provide the curve and some sample code that does not work for you?

– Dale

Hi @dale.
Thanks for the support.

This is the curve:

PolylineCurve curve = new PolylineCurve(new Polyline { new Point3d(100, 100, 0), new Point3d(100, 100, 100), new Point3d(100, 100, 50) })

Thanks - I’ve added your example to the issue.

– Dale

Check next weeks release of the Rhino WIP. ON_Curve::IntersectSelf now reports overlaps as well as point events.

2 Likes