{"record":{"id":"55432e0f742697f8","repo":"ppy/osu","slug":"bspline-conversion-of-arbitrary-degree-is-not-impl","errorCode":null,"errorMessage":"BSpline conversion of arbitrary degree is not implemented.","messagePattern":"BSpline conversion of arbitrary degree is not implemented\\.","errorType":"exception","errorClass":"NotImplementedException","httpStatus":null,"severity":"error","filePath":"osu.Game/Rulesets/Objects/BezierConverter.cs","lineNumber":89,"sourceCode":"                var segmentType = controlPoints[start].Type ?? PathType.LINEAR;\r\n\r\n                switch (segmentType.Type)\r\n                {\r\n                    case SplineType.Catmull:\r\n                        result.AddRange(from segment in ConvertCatmullToBezierAnchors(segmentVertices) from v in segment select v + position);\r\n                        break;\r\n\r\n                    case SplineType.Linear:\r\n                        result.AddRange(from segment in ConvertLinearToBezierAnchors(segmentVertices) from v in segment select v + position);\r\n                        break;\r\n\r\n                    case SplineType.PerfectCurve:\r\n                        result.AddRange(ConvertCircleToBezierAnchors(segmentVertices).Select(v => v + position));\r\n                        break;\r\n\r\n                    case SplineType.BSpline:\r\n                        if (segmentType.Degree != null)\r\n                            throw new NotImplementedException(\"BSpline conversion of arbitrary degree is not implemented.\");\r\n\r\n                        foreach (Vector2 v in segmentVertices)\r\n                        {\r\n                            result.Add(v + position);\r\n                        }\r\n\r\n                        break;\r\n\r\n                    default:\r\n                        throw new ArgumentOutOfRangeException(nameof(segmentType.Type), segmentType.Type, \"Unsupported segment type found when converting to legacy Bezier\");\r\n                }\r\n\r\n                // Start the new segment at the current vertex\r\n                start = i;\r\n            }\r\n\r\n            return result;\r\n        }\r","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/ppy/osu/blob/d9c73e12adff2feaae4a3e158d36fe5883faf6ca/osu.Game/Rulesets/Objects/BezierConverter.cs#L71-L107","documentation":"Thrown as NotImplementedException by BezierConverter when converting a slider path segment of type SplineType.BSpline that carries a non-null Degree. Only degree-less (uniform) BSplines are handled; arbitrary-degree conversion to legacy Bezier is not implemented.","triggerScenarios":"Converting a slider path that contains a PathControlPoint segment with Type.SplineType == BSpline and a non-null Degree. The conversion path (e.g. serialising to legacy slider anchors) has no implementation for that case.","commonSituations":"Beatmap uses the newer lazer BSpline-with-degree control point type and is run through legacy/Bezier conversion (difficulty calculation legacy path, editor legacy export, certain tools).","solutions":["Avoid arbitrary-degree BSpline control points if the path must pass through legacy/Bezier conversion.","Update to a version that implements the conversion (or implement ConvertBSplineToBezierAnchors for the degree).","Treat the control point as degree-less (null Degree) before conversion, which is supported."],"exampleFix":"// before: control point with arbitrary degree\nnew PathControlPoint(pos, new PathType { Type = SplineType.BSpline, Degree = 3 });\n\n// after: degree-less BSpline is supported\nnew PathControlPoint(pos, PathType.BSpline);","handlingStrategy":"validation","validationCode":"// before conversion, ensure BSpline control points have no arbitrary degree:\nforeach (var cp in path.ControlPoints)\n    if (cp.Type?.Type == SplineType.BSpline && cp.Type.Degree != null)\n        cp.Type = PathType.BSpline; // degree-less is supported","typeGuard":"bool IsConvertible(PathType? t)\n    => t == null || t.Type != SplineType.BSpline || t.Degree == null;","tryCatchPattern":"try { BezierConverter.ConvertToBezierPath(path); }\ncatch (NotImplementedException) { /* arbitrary-degree BSpline: downgrade or skip */ }","preventionTips":["Avoid arbitrary-degree BSpline control points if legacy/Bezier conversion is required.","Pre-flatten BSpline degrees before conversion.","Track support for BSpline conversion in the version you depend on."],"tags":["beatmap","slider","bspline","bezier","not-implemented"],"backgroundTag":null,"analyzedSha":"d9c73e12adff2feaae4a3e158d36fe5883faf6ca","analyzedAt":"2026-08-13T14:12:54.015Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}