Rework cutter specifics - add option to fine-tune cutter resolution #21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When trying to get a Silhouette Cameo 2 (updated to most recent firmware version 1.6) running under Linux with inkscape and inkscape-silhouette I noticed that the operation was quite flaky: in 9 out of 10 cutting runs the cutter would not output anything but simply jerk around a bit and then proclaim it was finished. 1 out of 10 times the results were fine.
After sniffing USB-communication of Silhouette Studio with the Cameo 2 and a fair bit of reverse engineering I came up with a set of changes I would like to propose. I factored them into four chunks (each commit in the branch), so cherry-picking should be easier:
1. commit
The biggest problem was the non-standard communication between software and cutter. There seem to be a lot of left-overs from previous work and also quite a bit of mis-interpretation.
My approach:
This results in much more stable and reliable operation with my cutter. I think other users could also benefit.
2. commit
The Cameo will get lost in communication if any new data is send while the machine is busy cutting. Also data chunk size in Silhouette Studio is limited to 3k chars at most and 1k is standard. In response a method "safe_write" was added as a wrapper for the write method to further split large data words (from plot commands) into more digestible chunks. Also inkscape-silhouette will now wait for the cutter to be ready before sending new data.
This results in the cutter returning to the main menu after the complete job is finished (e.g. the nifty option to advance the media into a position where the very handy cross-cutter can be used is offered). Without waiting the machine will only offer to eject the media after cutting.
3. commit
In GUI and plot code an option is implemented to chose the end position of the blade after cutting. This can be useful for some jobs. There was already some code which seemed to be intended for this purpose but was left unfinished. Frankly, I had some difficulties understanding the logic and implemented my own approach.
4. commit
The resolution of my cutter was slightly different from the magic number found in the code which was quite annoying in my use-case. I added two parameters for easier tuning and also allowed different resolutions for the two axes (in an ideal world this should not be necessary, but the Cameo 2 has its limitations, it seems)
I hope something useful can be found among my changes. Please have a look. Everything can be released under any license.