Stubborn curve-self-intersect component

(_corellaman) #1

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?

0 Likes

#2

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

(_corellaman) #3

Thanks @Gijs,

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

0 Likes

#4

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)

0 Likes

(_corellaman) #5

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:



:roll_eyes:

0 Likes

(Dale Fugier) #7

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

0 Likes

(_corellaman) #8

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:

thanks

0 Likes

(Dale Fugier) #9

Hi @corellaman,

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

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

– Dale

0 Likes

(_corellaman) #11

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.

0 Likes

(Seghier khaled) #12

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

1 Like

(Michael Pryor) #13

Just to note, that’s a Pufferfish component.

1 Like

(Michael Pryor) #14

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.

0 Likes

(_corellaman) #15

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:

0 Likes

(Michael Pryor) #16

it’s more of a ‘rule’

You may need new rules :smiley:

0 Likes

(_corellaman) #17

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:)

0 Likes