I was handling a crash report today, and I ended up running it in debug. What I discovered is that Rhino 8 sometimes does something new when querying a surface for curvature. I’ve never seen it do this in the 4 or 5 years we’ve been doing curvature analysis. See below:
The purple surfaces are yielding curvature (kappa) of ‘null’ instead of ‘zero’, using the following code.
B.Surfaces[0].ClosestPoint(Centroid, out double _u, out double _v);
SurfaceCurvature SC = B.Surfaces[0].CurvatureAt(_u, _v);
temp_K.Add(new double[2] { SC.Kappa(0), SC.Kappa(1) });
This is fine. I can handle this, but just thought I would flag it in case this behavior wasn’t intended. I haven’t seen it happen yet with something that actually had a curvature… I will let you know if that does happen, of course.
It’s not hard to imagine why this surface would generate an odd result… it’s flat and twisted, after all… That said, SelBadObjects does not catch it, so I’m not sure how to filter for this condition.
Let me know if you have any suggestions. If not, I think I’ll abort when I run into a condition where a non-planar surface yields null curvature and has a significant measurable area - or something like that.