Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: combine arcs #1748 #1754

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

jguddas
Copy link

@jguddas jguddas commented Feb 27, 2023

It works, but there are still a couple of to-dos I currently don't have the time to fix.

for (
j = index;
// @ts-ignore
path[j++] &&
// @ts-ignore
(nextArc = findArc(arc.item.coords, path[j - 1], {
error,
arcThreshold,
arcTolerance,
})) &&
nextArc;
) {
// TODO: if (nextArc is full circle) break;
// TODO: if (nextArc center is outside of tolerance) break;
// @ts-ignore
arc.item.coords = nextArc.item.coords;
// @ts-ignore
arc.item.args[5] = arc.item.coords[0] - arc.item.base[0];
// @ts-ignore
arc.item.args[6] = arc.item.coords[1] - arc.item.base[1];
}
// TODO check that stringify is shorter
command = 'a';
data = arc.item.args;
// @ts-ignore
item.coords = arc.item.coords;
// filter out consumed next items
path.splice(index + 1, j);

This provides the foundation for #1748.

data = arc.item.args;
// @ts-ignore
item.coords = arc.item.coords;
// TODO: filter out consumed next items
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This currently creates useless 0 width path segments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant