Skip to content

cleanCoords removes points too aggressively from retraced vertical lines #2740

@smallsaucepan

Description

@smallsaucepan

cleanCoords is too aggressive when dealing with straight vertical lines that start and stop at the same point.

Working clockwise:

🟥 North [0,0],[0,2],[0,0] -> [0,0],[0,0]
🟩 East [0,0],[2,0],[0,0] -> [0,0],[2,0],[0,0]
🟥 South [0,0],[0,-2],[0,0] -> [0,0],[0,0]
🟩 West [0,0],[2,0],[0,0] -> [0,0],[2,0],[0,0]

Adding extra points does not help:

🟥 [0,0],[0,1],[0,2],[0,3],[0,0] -> [0,0],[0,0]

Going off axis or deviating the line does help:

🟩 [0,0],[0,2],[1,2],[0,2],[0,0] -> [0,0],[0,2],[1,2],[0,2],[0,0] // retraced but not straight
🟩 [0,0],[0,2],[1,2],[0,0] -> [0,0],[0,2],[1,2],[0,0] // not retraced a.k.a. triangle
🟩 [0,0],[1,2],[0,0] -> [0,0],[1,2],[0,0] // retraced but off axis

Different start and end points are fine:

🟩 [0,0],[0,2] -> [0,0],[0,2]

v7.1.0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions