evil-mad / wcb-ink

WaterColorBot extensions for Inkscape
22 stars 8 forks source link

Add option for backtracking after reinking #13

Open RoboGenius opened 11 years ago

RoboGenius commented 11 years ago

Due to the length of the bristles (default brush), when the carriage lifts to reink, then sets the brush back down to complete a given line, you are left with a gap in the line that does not get painted. This may be acceptable for shorter bristled brushes, pens, pencils, etc., but i believe it would be a "nice-to-have" option in the WCB extension to backtrack from the reink point % (var.) inches before setting back down. This should close the gap.

techninja commented 11 years ago

For what it's worth: RoboPaint simply calculates from the last two points the angle to "over-stroke" and moves forward enough to offset for brush bend before lifting the brush, allowing for both re-ink gap closing, and line ending accuracy.

oskay commented 11 years ago

Interesting idea! My first guess is that it would be difficult to implement this given the nature of the algorithm that we use. Recursively parsing the SVG file can be paused, but it's hard to advance forwards or backwards a few steps.

One thing that we could do-- much easier to add into the code --would be to add a "lead in." That is to say, when going back to resume painting, we determine the direction of movement, and begin a little further back in that direction. (While I've been typing, Techninja commented that they do the same thing in RoboPaint.)

RoboGenius commented 11 years ago

I, admittedly, have not had any luck using RoboPaint (I need to try to reinstall it), but that solution sounds great for art created within that program!

Can layered SVGs created in inkscape be imported into (or exported to) RoboPaint and then accurately plotted? If so, then that may be something that may be worth adding to the wiki for seamless lines, or, rather, non-broken lines. That is, if the implementation within the WCB extension would be too cumbersome.

techninja commented 11 years ago

@RoboGenius I believe the two "applications" have their use cases. You can open an inkscape SVG into robopaints edit mode, then print it, though it's still alpha level stuff, it does work for the most part. If you end up trying it out, feel free and log any problems you find to its issue queue.

oskay commented 11 years ago

@RoboGenius Implementing the lead-in lead-out method (with approximated lines), in the same way that RoboPaint does would not be difficult. It should be reasonably straightforward. Adding an accurate look-ahead would be much harder.

techninja commented 11 years ago

Something to note about RoboPaint, it currently has no concept of Water Wash or understanding of Inkscape layers, so the cherry blossom SVG is currently unsupported. I'm forced to wonder how something like that would even work.. detected via transparency perhaps? Hmph.

oskay commented 11 years ago

This seems to be wandering off-topic. Perhaps layer support should be added as a feature request over at RoboPaint?

techninja commented 11 years ago

I agree, but I didn't say so as that would be too off topic from this issue. ;)