2 ms·
Ah, very nice. That should reduce the effort needed to something you might be able to make quick work of, yourself, with some thought about how to walk the vec
by 9wzYQbTYsAIc 4y ago
Ah, very nice.
That should reduce the effort needed to something you might be able to make quick work of, yourself, with some thought about how to walk the vectors in a spiral or something like the zigzags.
This website [1] recommends a tool called vpype [2] which might have an option to do what you need or might be able to be tweaked to do what you need.
Apparently vpype makes some trade-offs in exactness of reproduction for better flexibility, but it does claim to try to honor stroke width.
I’d have recommend digging into SuperSlicer’s code, but their algorithm relies on meshes, so it may not translate as readily.
Nonethless, it is worth mentioning that 3d printer slicing software can handle around a dozen or so different patterns. Spirals, rectilinear, star shapes, etc. so you might find inspiration there.
[1] https://www.acrylicode.com/svg-to-gcode-walkthrough/ https://www.acrylicode.com/svg-to-gcode-walkthrough/
[2] https://github.com/abey79/vpype https://github.com/abey79/vpype
- mg 4y agoThanks! From the description on GitHub, vpype looks very good. I will play around with it.
- 9wzYQbTYsAIc 4y agoYou’re welcome! I hope it goes well and that you make a Show HN next.
- mg 4y agoTried vpype and the hatched plugin now. Works, but is very basic. It fills black areas with lines without any regard to the shape of the area. The result looks very "rasterized". One could come up with way better algorithms that take the shape of the source into account when filling it with thin lines. Maybe I'll have to code my own solution.
- 9wzYQbTYsAIc 4y agoWell that is unfortunate. Hopefully vpype is written in a language that you are familiar with and you can make a pull request for an enhancement or two. Or perhaps there’s a different tool that will help save time. If not, I’m sure the plotting community would appreciate anything that you come up with. I’ll try to do some digging later today and let you know if I find anything else, as I’m now curious.