Timmmm / robocut

Control vinyl cutters, including Craft Robo, Silhouette, Cameo and Portrait
http://robocut.org/
GNU General Public License v3.0
81 stars 27 forks source link

Invert cutting direction #4

Open newhinton opened 2 years ago

newhinton commented 2 years ago

Hello! I have searched for a tool that can replace the software for a silouette portrait. Yours seems fitting!

However, while trying it out it started cutting "from the bottom". I have no fitting sheets, so robocut "pulls in" a full sheet, and therefore dispensing the sheet altogether. When now trying to cut, the vinyl is missing.

Is it possible to invert the cutting direction, eg. inserting the sheet and starting to cut in the top left corner instead of bottom right?

Timmmm commented 2 years ago

Yeah I could definitely add that. The coordinate system is a bit of a mess! Though, maybe I've misunderstood but couldn't you just edit your SVG in Inkscape to move the content to the other end of the page?

Could you post an example SVG?

On Sat, 16 Apr 2022, 19:04 Felix Nüsse, @.***> wrote:

Hello! I have searched for a tool that can replace the software for a silouette portrait. Yours seems fitting!

However, while trying it out it started cutting "from the bottom". I have no fitting sheets, so robocut "pulls in" a full sheet, and therefore dispensing the sheet altogether. When now trying to cut, the vinyl is missing.

Is it possible to invert the cutting direction, eg. inserting the sheet and starting to cut in the top left corner instead of bottom right?

— Reply to this email directly, view it on GitHub https://github.com/Timmmm/robocut/issues/4, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC4ACX5YDTWSOF73LG76LLVFL6KDANCNFSM5TSVSR5Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>

newhinton commented 2 years ago

test

I have created this ...wonderful... drawing!

Legend: Red: Cutting Area Orange line without arrow: Axis on which the knive moves left to right Blue thick line: Vinyl-feed-roller Grey rectangle: paper/vinyl Turquoise line: Items to be cut. The dot is the first item to be cut, the arrow is the direction in which items should be processed (roughly)

Green Arrow: Movement of vinyl BEFORE cutting starts Yellow Arrow: Movement of vinyl during cutting.

Left side: Observed behaviour of robocut. The vinyl is fully moved through the cutter. If it is shorter than the paper expected by robocut, it looses the connection and the cutter starts moving it around so that it cannot be cut or moved anymore. Its ejection direction is back towards the user.

Right side: How Silouhette Studio does it. There is no movement of the vinyl until the cutting starts. When it starts cutting, it moves the vinyl into the cutter, until it runs out. The benefit is that we dont have to supply a full A4 sheet, because we dont have to pull a full sheet through the printer before cutting can begin. (In reality, after Silouhette Studio is done, it also moves the paper back the same amount it moved it in, so that it pops out, but thats just a nice to have as it can be done with the buttons on the device)

I hope this helps!

Timmmm commented 2 years ago

Ah right I see what you mean. I think this is just because it cuts in SVG order currently. Fortunately I have already written code to cut in a more sensible order. Btw this is basically the Travelling Salesman Problem! Actually it's called the Travelling Salesman Problem with Neighbourhoods (since the things you visit are regions not points).

Anyway I wrote some code a couple of years ago to try and do shortest path sort of stuff. Also added a picture of the vinyl cutter to make the orientation a bit more obvious.

image

I am trying to finally get a new release out soon so I will try to make sure this works as you describe.

mikhailmihalkov commented 2 years ago

https://github.com/Jeinzi/SMTCut Timmmm Tell me where can there be an error in the code? The problem is that no matter how many degrees I turn gerber file in gerbv (180/90/270) Portrait 3 stubbornly cuts from 90 degrees angles relative to the fiducial. Where in the code is this parameter? If you look at the resulting pdf, there it flips in the desired direction but the plotter cuts with a clockwise rotation angle of 90 degrees