Editor's Path Properties section has no 'spike' / 'sharp corner' detection — user creating a path with a sharp angle (e.g., a 10° corner) gets no warning, embroidery on sharp corners is hard #335
Labels
No labels
blocked:commit-ready-failed
blocked:gate-fetch
blocked:gate-lint
blocked:gate-plan
blocked:gate-research
blocked:needs-attention
blocked:needs-decision
blocked:needs-human
blocked:no-changes
blocked:verify-failed
bug
deferred
feature-request
in-progress
needs-decompose
needs-triage
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/Kimi_Agent_Brother_10_Digitizing_App#335
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding
grep -rn 'sharpCorner\|spikeDetect' src/components/editor/returns 0. The editor has no sharp corner detection.A user drawing a path:
The fix is to detect sharp corners and warn the user (or visually highlight the corner in red).
Where
src/components/editor/EditorRightPanel.tsxsrc/components/editor/canvasRenderer.ts(where the corner is drawn)grep -rn 'sharpCorner' src/components/editor/returns 0Suggested fix shape
Path Properties section: a small "X sharp corners detected" warning with a "List" button to see them.
Auto-fix: a "Smooth sharp corners" button that applies a 30° minimum angle.
Severity
Low. The user can spot sharp corners visually. Power users with production embroidery notice.
Discovered by
Gap analysis (2026-10-02) of editor validation.
Related
Shipped in
37f5f61:snapSettings.showSharpCornerWarning(default ON perconstants.ts).X sharp corners detected (below 30°)) and aSmooth sharp corners (30°)button. The button fans out across every selected path in onesetPaths + pushHistorydispatch.Show Sharp Corner Warningtoggle gates the canvas visual without affecting the right-panel warning + button.geometry.ts):angleAtNode,findSharpCorners,smoothSharpCorners. Smoothing moves the offending anchor onto the chord midpoint of prev/next — preserves node ids and bezier handles, no-op on clean paths. Closed paths cover wraparound corners.27 new tests: 19 in
geometry.test.tspin the math + smoothing, 8 inissue-335.test.tsxpin the panel contract (rendering, hide-on-omit, count copy, button disabled on clean path, toggle in Snap Settings). All tests pass; build + lint clean.Caveat: the bulk smoothing pass currently writes a single history entry per selected path's nodes array. Multi-path selections still produce one setPaths + pushHistory, matching the existing simplify / jitter / offset pattern.