Closed tatyanade closed 4 years ago
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
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
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):
@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
Fixed spiral corners by oversampling 100x (was 2x): 946609f67f4c91cf0557491494fedf6f9d10da8b
OK!
When I call
E.setStitch(10,30,0); E.hatchMode(SPIRAL); E.hatchSpacing(8); E.rect(350, 350, 100, 100);
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](https://user-images.githubusercontent.com/21960277/85184511-08a62e80-b25e-11ea-9371-d83302ae4f8e.png)
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](https://user-images.githubusercontent.com/21960277/85184588-460abc00-b25e-11ea-803c-ade9ee05d2e5.png)
verses E.setStitch(10,30,0), both with hatch spacing of 4.![2020-06-19_18h55_26](https://user-images.githubusercontent.com/21960277/85184640-75b9c400-b25e-11ea-9757-0de5e3a032db.png)
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