Update kisscut_gui.py comments for consistency

This commit is contained in:
2026-01-11 15:08:07 +01:00
parent c5f5c159ba
commit ed6345998b

View File

@@ -257,7 +257,7 @@ def export_mask_as_bezier_svg(mask, path, rdp_epsilon_mm=0.2, spline_smooth=8.0,
# return np.vstack([out[0], out[1]]).T
# def catmull_rom_to_beziers(points, closed=True, max_handle_frac=0.5):
# """CatmullRom to cubic Bézier conversion with handle clamping."""
# """Catmull-Rom to cubic Bezier conversion with handle clamping."""
# points = np.asarray(points)
# n = len(points)
# beziers = []
@@ -315,7 +315,7 @@ def export_mask_as_bezier_svg(mask, path, rdp_epsilon_mm=0.2, spline_smooth=8.0,
# return np.array(interp_points)
# def _legacy_bezier_q(ctrl_poly, t):
# """Cubic Bézier evaluation reused by sampling helpers."""
# """Cubic Bezier evaluation reused by sampling helpers."""
# mt = 1 - t
# return (
# mt**3 * ctrl_poly[0][0] + 3 * mt**2 * t * ctrl_poly[1][0] + 3 * mt * t**2 * ctrl_poly[2][0] + t**3 * ctrl_poly[3][0],
@@ -323,7 +323,7 @@ def export_mask_as_bezier_svg(mask, path, rdp_epsilon_mm=0.2, spline_smooth=8.0,
# )
# def sample_bezier_path(beziers, N=1000):
# """Sample a list of cubic Béziers into N evenly spaced points."""
# """Sample a list of cubic Beziers into N evenly spaced points."""
# samples = []
# segs = len(beziers)
# pts_per_seg = max(2, N // segs)
@@ -335,13 +335,13 @@ def export_mask_as_bezier_svg(mask, path, rdp_epsilon_mm=0.2, spline_smooth=8.0,
# return np.array(samples[:N])
# def find_deviations(poly_points, bezier_points, threshold=5.0):
# """Locate indexes where Bézier samples deviate from the polyline."""
# """Locate indexes where Bezier samples deviate from the polyline."""
# dists = np.linalg.norm(poly_points - bezier_points, axis=1)
# deviations = np.where(dists > threshold)[0]
# return deviations, dists
# def blend_bezier_with_polyline(beziers, poly_points, bezier_points, deviations, alpha=0.7):
# """Pull Bézier handles toward polyline points where error is large."""
# """Pull Bezier handles toward polyline points where error is large."""
# N = len(bezier_points)
# segs = len(beziers)
# pts_per_seg = max(2, N // segs)