svenhb / GRBL-Plotter

A GCode sender (not only for lasers or plotters) for up to two GRBL controller. SVG, DXF, HPGL import. 6 axis DRO.
https://grbl-plotter.de/
GNU General Public License v3.0
696 stars 176 forks source link

Drag Tool Compensation not using start location #340

Closed Rubix47 closed 1 year ago

Rubix47 commented 1 year ago

Describe the bug It does not appear that start position of the drag tool is used for the start of a cut. When "use of drag knife" is selected, the knife is positioned to the 0 degree (to the right) at the end of a shape. But this information is not used to compensate the blade at the begging of the next cut.

Edit - after some additional testing I can say, the location of the blade in X,Y is correct if the cut starts on a horizontal line in the shape. The issue shows up if there is not a horizontal line in the shape. If the cut is not started on a horizontal line the position and rotation of the blade are wrong for the start of the cut.

To Reproduce When cutting a series of lines that are vertical the blade will be positioned to the right at the end of the cut (if "use of drag knife" is selected). But there is no "arc" to orient the knife at the beginning of the next cut.

Expected behavior If a vertical line is to be cut and the knife is positioned 0 degrees or to the right there should be a compensation arc prior to the start of the cut.

Screenshots image

Drag knife start comp

this is an amazing piece of software and I thank you for that. Drag knife compensation is working great everywhere but the start of cuts that cannot be started to the right (+X). I have a need to cut very detailed stuff so this is a problem for me. If there is already a solution I apologize, but I did not see anything in here.

svenhb commented 1 year ago

Thanks for your feedback. I think the problem is the "sort objects" option: Sort objects off - looks correct: Sort_objects_off

Sort objects on . like your example, looks nok: Sort_objects_on

Rubix47 commented 1 year ago

Thank you so much for helping and I will admit I have a very specific use for my plotter that requires probably unusual accuracy. Most would probably not have an issue with this. (I'm making grit blast masks for 20 sided dice)

What you showed would much improve things but the orientation of the knife would still be off for the first cut. And this still does not solve the multiple vertical lines issue though. each line here would start at the 0 degree (to the right) so the tip of the blade would not be on the line until some time into the cut. I know I could turn off the blade option and this would work fine. But it would not be a solution for my real application. image Something like this would work better. Red path would line up the blade with these cuts. Pardon my art and exaugurated so you can see it. image

I was trying to simply the issue with lines and maybe that's not helpful, maybe I should describe the issue as it is. here is what I'm actually trying to cut and having issue with. It needs to be 6mm tall(I have it a bit larger here to see things). Hedron Final vector 20

When it cuts the side shapes the knife is not lined up with the shapes at the start of the cut because there is not a horizontal surface to start on. in this picture the blade starts outside the shape because its at the 0 position. what would work great is if the tip was plunged into a corner then rotated to line up with the first cut prior to cutting.

image

svenhb commented 1 year ago

In principle, this option expects a knife angle of 0° on start and leaves each figure with 0° angle. I need to check

Rubix47 commented 1 year ago

it definitly leaves each figure at 0. But does not take full advantage of the fact that it knows where the knife tip is for the start (for shapes without horizonal segments). Thanks for looking into it. Cheers

svenhb commented 1 year ago

Try this version, hope I could fix it, my tests looked good: https://github.com/svenhb/GRBL-Plotter/blob/master/GRBL-Plotter_Setup.exe

Rubix47 commented 1 year ago

Yes I think that's it. looks good in my tests too. Thank you very much!