fix: address review findings — input validation, exception handling, cleanup
Add argument validation to EllipseConverter.Convert for tolerance and semi-axis parameters. Narrow bare catch in Extensions.cs spline method to log via Debug.WriteLine. Remove unused lineCount variable from SolidWorksBendDetectorTests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using ACadSharp.Entities;
|
||||
using CSMath;
|
||||
using OpenNest.Geometry;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
@@ -68,8 +69,9 @@ namespace OpenNest.IO
|
||||
{
|
||||
curvePoints = spline.PolygonalVertexes(precision > 0 ? precision : 200);
|
||||
}
|
||||
catch
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine($"Spline curve evaluation failed: {ex.Message}");
|
||||
curvePoints = null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user