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
674 stars 176 forks source link

Detecting tools from layers #202

Closed amoineau closed 3 years ago

amoineau commented 3 years ago

Describe the bug Not sure if it's actually a bug, maybe I'm just missing something. I use these options to detect which tool the machine is supposed to use :

image

The tool table looks something like that :

image

And the detection is not consistent. I can have a file with an empty default layer and a second layer called LASER with the forms to cut and GRBL-P will pair the layer with the ENCRE tool.

I recently had the idea to match the color as well and it seems to be much more consistent. If it works like that it's not a huge problem but it makes creating the DXFs and tool tables a bit more tedious and prone to error.

svenhb commented 3 years ago

Did you select the desired properties here? image

svenhb commented 3 years ago

Perhaps differences in uppercase lowercase? I use the LevenshteinDistanceAlgorithm to judge tool-name versus layer-name. I guess "LASER" gives the same score as "encre" if you look for "ENCRE" (5 chars needs to be replaced).

amoineau commented 3 years ago

Hi, yes I made sure the case was the same on both sides and both tools. I did select "XY feedrate from TT" and "Spindle Speed from TT" but not the Z axis one. Although I don't use a Z axis and this window is different on my version (1.5.8.2): image

(Am I using too many decimal places ?)

svenhb commented 3 years ago

Last "unreleased" version: https://github.com/svenhb/GRBL-Plotter/blob/master/GRBL-Plotter_1583_publish.zip But would not fix this problem. Did you saved your new tool-table? Can you try different layer-name length? I can't check the code before weekend.

amoineau commented 3 years ago

Did you saved your new tool-table?

laser_and_pen_ISP.zip

Can you try different layer-name length?

Sure, I can try. Do you mean that each layer should have a different length than the others, or that the layer name should be longer ?

I can't check the code before weekend.

No problem ! Thank you for your help.

svenhb commented 3 years ago

I don't know why: in your tool table the seperators are not consistent. All my examples uses "," comma, but yours also shows ";" semicolons - could be a problem. Different name-length would be good as a test: yes: Do you mean that each layer should have a different length than the others.

amoineau commented 3 years ago

If you mean the last column, it's a separator for the commands to execute when switching to the tool, not a csv separator. I played around with different name length and casing and it didn't solve the problem, but matching the colours does.

One file where this problem appears :
ia21a1342pmi0002-01_slc.zip

svenhb commented 3 years ago

I think the problem is, that this DXF file has only one layer with objects. Because of a problem in earlier time #147, grouping with just one group-item will not be performed...

I need to check for a workarround

amoineau commented 3 years ago

I thought so because there are information in the g-code header about that, so I tried earlier this week to add an empty ENCRE layer on another version of this file and it didn't change anything :(

Edit : but maybe because it was empty it didn't count, idk ?

svenhb commented 3 years ago

Hope it is fixed: https://github.com/svenhb/GRBL-Plotter/releases

amoineau commented 3 years ago

Thx, I'll try it this week !