Hi,
We came across this bug while testing for our upgrade to Rhino 8. If you run the following code on Rhino 7 it works just fine. On Rhino 8 it returns null.
var tolerance = 1e-3;
var radialTolerance = RhinoMath.ToRadians(1);
var polyLineCurve = new Polyline(new Point3d[] {
new(0, 0, 0),
new(500, 0, 0),
new(500, 1000, 0),
new(0, 1000, 0),
new(0, 0, 0),
}).ToNurbsCurve();
var segments = polyLineCurve.DuplicateSegments();
var curves = Curve.JoinCurves(segments, tolerance);
var curve = curves[0].Simplify(CurveSimplifyOptions.All, tolerance, radialTolerance);
In case it matters, this was tested on Rhino 8.19.25132.1001 and Rhino 7.27.23032.13001 on Windows.
Originally this was add to our code as a workaround for the Simplify code not accounting for co-linearity properly in order to simplify those curves. See this thread for more context.
For now we are skipping the simplification, and might use our own simplification code instead if needed. Still, it is a simple scenario, so a fix would be appreciated.