Curve.InflectionPoints Not Finding Inflection Points

Hi McNeelies,

I only just noticed the Curve.InflectionPoints method and have tried implementing it in GHPython. I might be misunderstanding the method, but for instance in this case I would expect curves 0, 2, 3 and 4 to also return inflection points (i.e. as visible by their curvature graphs):


220921_InflectionPoints_00.gh (8.7 KB)

Hi @AndersDeleuran,

I’m looking into this.

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

– Dale

1 Like

Upon further inspection there appears to be something funky going on with the curvature along several of the curves. I wrote a quick/naive function to find inflection points based on measuring consecutive curvature vector angles. Where with a 90 degree condition yields a similar result to the Curve.InflectionPoints method, but lowering this substantially finds more (i.e. there might not actually be any inflection points on these curves):



220921_InflectionPoints_01.gh (12.9 KB)

Did a bit more digging, the missing inflection points appear in cases where the curve is not planar. And thus yield this more gradual inflection, which is not located at one point (curve 2):

I created this Python script long time ago based on @dale script.
The curve scaled in Y direction to get square shape then we find inflection points.

InflectionPoints_01.gh (13.3 KB)

1 Like

RH-70345 Curvature: Did not finding inflection point should be fixed in the latest RhinoWIP.

1 Like

Cheers @dan and @dale. Would it be possible to have a peek at the updated code? I need a Rhino 7 solution, so I can reimplement it in GHPython there.

Hi @AndersDeleuran,

I’ve cherry-picked this fix back into Rhino 7. You should expect to see this when a Rhino 7 SR25 Service Release candidate is available.

Thanks,

– Dale

2 Likes

That’s fantastic, thanks so much Dale. Much appreciated :raised_hands:

Hi @dale ,

Is it possible to find the the inflection points for this kind of curve?


inflection points.gh (6.2 KB)
I tried using the RhinoCommon API method, but the result is null. I’m not very skilled in GhPhyton Script. Could you give me a hand please. Also I tried this in the Rhino 8 WIP which is supposed to correct the previous bugs. as its mentioned here (Rhino 8 WIP Available Now! - #65 by brian)

If you try with Curvature Graph, there is no inflection points for this curve