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

Spiraling #37

Closed
tatyanade opened this issue Jun 19, 2020 · 6 comments
Closed

Spiraling #37

tatyanade opened this issue Jun 19, 2020 · 6 comments

Comments

@tatyanade
Copy link
Contributor

When I call
E.setStitch(10,30,0); E.hatchMode(SPIRAL); E.hatchSpacing(8); E.rect(350, 350, 100, 100);

image

With the inner corners becoming slanted instead of keeping the shape at right angles

a lot less noticable with a stitch length of 40, but you can see it a bit towards the center
image

Also spiraling for circles gets a bit funky depending on stitch length ; this is circle with E.setStitch(10,40,0)
2020-06-19_18h53_57

verses E.setStitch(10,30,0), both with hatch spacing of 4.
2020-06-19_18h55_26

smaller stitch length looks better but im not sure why there would only be one inconsistently lengthen stitch with length 40

I think the circle spiral issue is not as much of a concern (or possibly not a concern at all, easy for the user to fix on their own) but for rectangle spiraling I think special attention should be payed to the inner corners guaranteeing a stitch point at least for more noticeable (non-central) corners

@tatyanade tatyanade changed the title Spiraling for Spiraling Jun 19, 2020
@LingDong-
Copy link
Collaborator

Yes. Spiralling works by interpolating concentric rings, so corners might get interpolated. One way to alleviate this I can think of right now, is to oversample the concentric rings, interpolate into spiral, then downsample while keeping the corners. Will investigate, thanks for raising this

@tatyanade
Copy link
Contributor Author

Screenshot 2020-06-19 at 9 49 35 PM
Here's what it looks like printed (the first image of circle and first square); their smaller than an inch so its not really that noticeable in reality but is a bit more noticeable in the center

@golanlevin
Copy link
Member

Yes, @LingDong- , it would be better if the resampling and interpolation here did a better job preserving corners. To be clear, I'm not concerned about the diagonals on the inside (marked #1 in the image below), I'm very concerned about the snipped corners (marked #2):

85184383-a9e0b500-b25d-11ea-9382-4ffdd844f041

@LingDong-
Copy link
Collaborator

@golanlevin yes I think the diagonals are inevitable -- if all sides are straight, there won't be a spiral. But I'll look into the corners

@LingDong-
Copy link
Collaborator

Fixed spiral corners by oversampling 100x (was 2x): 946609f

@golanlevin
Copy link
Member

OK!

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

No branches or pull requests

3 participants