Stubborn curve-self-intersect component

Hi all,

I’m dealing with a silly issue, usually unpredictable - why is CX component faulty in this scenario? Could it be an issue with size/dimensions? Model absolute tolerance is 0.001.

CXissue.ghx (721.6 KB)

The issue:

I got a bunch of closed planar curves

Rhino knows they’re closed, grasshopper confirms they’re planar

Some of the curves self-intersect

Curve | Self (CX) component discards [visually] evident self-intersections

CurveBoolean command works in rhino for said curves:

why doesn’t CX work correctly?

not sure why exactly it fails but putting FitCrv in between will help.

btw: the test for planarity (both curves and surfaces) is more loose in Grasshopper than in Rhino. @DavidRutten why is this?

1 Like

Thanks @Gijs,

Yes, rebuilding the curve or fitting a new one into it helps but not entirely :frowning:

yes, tightening the tolerance in that case helps a bit, but still not for all curves. I suspect this is because the curves in those areas are very close to each other (about 0.002 units only)

thanks again, for trying - I’m doing a work-around where I must trim those regions against a closed brep, leaving me with pairs of curves (no longer closed) that I later reconnect to get my regions:

sometimes gh asks of you to be super redundant :crazy_face:


Hi @corellaman,

If the curves are planar, why are you projecting them?

Other than identifying, what do you want to to with the self-intersecting curves?

– Dale

Hi @dale,

Thanks for replying.

…that was just me being redundant, I already know I didn’t need to project them - my apologies if that’s misleading - CX fails regardless.

As stated not all the curves I have self-intersect, so the ones that do I want to trim at their self-intersection parameter (using shatter), as you would with any self-intersecting curve:


Hi @corellaman,

I’ve opened an issue to figure out what’s going on.

– Dale

Thank you @dale !! And for testing further in rhino. I encounter this issue every once in a while, luckily there’s always a work-around.

You can use mesh if you want or try fit curve smooth

1 Like

Just to note, that’s a Pufferfish component.

1 Like

CX seems like a band-aide. The real question is why do they self-intersect in the first place? Can you show us what makes the curves, I’m sure they can just be generated is a way that doesn’t result in that.

For sure, but not in this case - it’s more of a ‘rule’ I have within the script. Which is fine, CX should still take care of it :smile:

it’s more of a ‘rule’

You may need new rules :smiley:

thanks @seghierkhaled - I agree, but I must keep the original curves (no fitting into new ones) plus I must stay ‘plug-in free’ (I’m just as stubborn as the CX :stuck_out_tongue_winking_eye:)