fablabnbg / inkscape-silhouette

An extension to drive Silhouette vinyl cutters (e.g. Cameo, Portrait, Curio series) from within inkscape.
GNU General Public License v2.0
479 stars 113 forks source link

Multi mode: cut in document order rather than batching by tool #283

Open jonhnet opened 5 months ago

jonhnet commented 5 months ago

I'm generating a cutting plan in Python for a very long cut (multiple meters) on roll paper. The plan calls for alternating between cutting out circles with the knife and marking edges with the pen.

Silhouette Multi sorts the actions by tool, which would cause it to cut meters of little circles, then try to wind all the way back to the beginning and do the pen marks. I think this would be a disaster for keeping the paper correctly registered! Is there a way to ask Multi to cut the colors on the assigned tools in the order they appear?

If not, I'll work on it. I'd welcome a pointer to the relevant section of code that presently does the sorting.

t0b3 commented 5 months ago

@jonhnet that's a great idea to have multiple tools working in alternating order. While I didn't test it, maybe it works already if you apply multiple colors A,B,C,D and assign each of them the task cut / pen of your choice.

Feel free to report back to get more input in case it doesn't work yet... the relevant code is somewhere around the color separation https://github.com/fablabnbg/inkscape-silhouette/blob/a15bb02a84b108672a4f4e5dcf9a9b4cd3e32516/silhouette_multi.py#L143 and the list of actions https://github.com/fablabnbg/inkscape-silhouette/blob/a15bb02a84b108672a4f4e5dcf9a9b4cd3e32516/silhouette/MultiFrame.py#L472