Closed coryortega closed 9 months ago
The lack of this feature is somewhat in error, but I think maybe I didn't include because you could cover the situation with vpype. The way to do this is to rotate the design before it gets to you, then rotate it back when you're done. Both of these are absolutely permitted in vpype. Just rotate by 20 degrees. Do the efill then rotate by -20 degrees.
Really this is very largely the best methodology for doing a fill like this, the alternative is to actually do the longer lines, then a polycut and fill in the edges every-other per the regular algorithm. But, here using the vector-mononizer code with a scanline to figure out where the particular rung should be placed, is such a great shortcut that it would be very notably harder to use a different methodology.
This sequence of command does what @tatarize suggests:
vpype read input.svg rotate -o 0 0 -- -20deg efill rotate -o 0 0 20deg show
Note the --
trick that's needed when an argument looks like an option, in this case "-20deg" starting with a "-".
Oh wow, worked like magic. Really appreciate the help!
It'd be awesome if we could graph lines that aren't just horizontal. I've tried implementing this myself and while I had some success, I'm no expert in graph theory and my approach was pretty hacky. Would love to see how this would be correctly implemented, or how one would go about implementing it? I'd even be happy to open a PR myself, given some guidance