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

Tangential knife cut different size of figure when cutting by CW and CCW #401

Closed voleoo closed 6 months ago

voleoo commented 6 months ago

I made tangential knife for cutting and now have some strange issue.

I open the SVG file in GRBL-Plotter and it generates g-code. G-code for first figure generated cutting direction by CW and cutting the second figure CCW.

The figure that was cut CCW has the wrong dimensions. Should be 230mm but actual size 234mm. Looks like we have some compensations for tools. If direction CW sizes is correct.

How to generate g-code with direction by CW.

SVG

<svg enable-background="new 0 0 55.5 70" height="70cm" viewBox="0 0 55.5 70" width="55.5cm" xmlns="http://www.w3.org/2000/svg"><g stroke-linecap="round" stroke-linejoin="round" transform="matrix(1 0 0 -1 11.5 11.5)"><path d="m0-12h-10.5a1 1 90 0 1 -1-1v-21a1 1 180 0 1 1-1h10.5 10.5a1 1 270 0 1 1 1v21a1 1 0 0 1 -1 1z"/><path d="m41-21a3 3 90 0 0 3-3v-26a3 3 0 0 0 -3-3h-13-13a3 3 270 0 0 -3 3v26a3 3 180 0 0 3 3h13z"/><path d="m-10.5-11.5a1 1 270 0 0 -1 1v21a1 1 180 0 0 1 1h10.5 10.5a1 1 90 0 0 1-1v-21a1 1 0 0 0 -1-1h-10.5z"/><path d="m28-20.5h13a3 3 270 0 1 3 3v26a3 3 0 0 1 -3 3h-13-13a3 3 90 0 1 -3-3v-26a3 3 180 0 1 3-3z"/><path d="m10.5-35.5a1 1 90 0 0 1-1v-21a1 1 0 0 0 -1-1h-10.5-10.5a1 1 270 0 0 -1 1v21a1 1 180 0 0 1 1h10.5z"/></g></svg>

G-CODE

( Use case: ? )
( SVG import by GRBL-Plotter 1.7.3.2 )
( Source: SQUARES_5.svg )
(<Header >)
( G-Code lines: 306 )
( Pen Down/Up : 5 times )
( Path length : 5165.2 mm )
( Duration ca.: 00:05:09 h:m:s )
( Conv. time  : 00:00:00.0879049 )
( SVG dimension : 555.00 700.00 )
( Graphic offset: 0.00 0.00 new origin: 0.00 0.00)
( Original graphic dimension min:0.000;0.000  max:555.000;700.000)
( Option: Tangential axis: 'Z')
( Dimension XY: 555.0 700.0 )
(</Header >)
(<Tangential Axis="Z" UnitsFullTurn="3.6"/>)
G54 (Setup - GCode-Header)
G90

(<Figure Id="1" Geometry="path" PenColor="000000" PenWidth="0.1" Layer="001" PathLength="902.8"> )
G00 X20.000 Y-240.000 Z1.762

M3 S1000 (PD)

G04 P2

G01 X18.643 Y-239.909 Z1.762 F1000
G01 Z1.685
G01 X17.342 Y-239.643 Z1.685
G01 Z1.608
G01 X16.108 Y-239.214 Z1.608
G01 Z1.534
G01 X14.953 Y-238.635 Z1.534
G01 Z1.460
G01 X13.889 Y-237.916 Z1.460
G01 Z1.386
G01 X12.929 Y-237.071 Z1.386
G01 Z1.314
G01 X12.084 Y-236.111 Z1.314
G01 Z1.240
G01 X11.365 Y-235.047 Z1.240
G01 Z1.166
G01 X10.786 Y-233.892 Z1.166
G01 Z1.092
G01 X10.357 Y-232.658 Z1.092
G01 Z1.015
G01 X10.091 Y-231.357 Z1.015
G01 Z0.938
G01 X10.000 Y-230.000 Z0.938
G01 X10.000 Y-20.000 Z0.900
G01 X10.091 Y-18.643 Z0.862
G01 Z0.785
G01 X10.357 Y-17.342 Z0.785
G01 Z0.708
G01 X10.786 Y-16.108 Z0.708
G01 Z0.634
G01 X11.365 Y-14.953 Z0.634
G01 Z0.560
G01 X12.084 Y-13.889 Z0.560
G01 Z0.486
G01 X12.929 Y-12.929 Z0.486
G01 Z0.414
G01 X13.889 Y-12.084 Z0.414
G01 Z0.340
G01 X14.953 Y-11.365 Z0.340
G01 Z0.266
G01 X16.108 Y-10.786 Z0.266
G01 Z0.192
G01 X17.342 Y-10.357 Z0.192
G01 Z0.115
G01 X18.643 Y-10.091 Z0.115
G01 Z0.038
G01 X20.000 Y-10.000 Z0.038
G01 X230.000 Y-10.000 Z0.000
G01 X231.357 Y-10.091 Z-0.038
G01 Z-0.115
G01 X232.658 Y-10.357 Z-0.115
G01 Z-0.192
G01 X233.892 Y-10.786 Z-0.192
G01 Z-0.266
G01 X235.047 Y-11.365 Z-0.266
G01 Z-0.340
G01 X236.111 Y-12.084 Z-0.340
G01 Z-0.414
G01 X237.071 Y-12.929 Z-0.414
G01 Z-0.486
G01 X237.916 Y-13.889 Z-0.486
G01 Z-0.560
G01 X238.635 Y-14.953 Z-0.560
G01 Z-0.634
G01 X239.214 Y-16.108 Z-0.634
G01 Z-0.708
G01 X239.643 Y-17.342 Z-0.708
G01 Z-0.785
G01 X239.909 Y-18.643 Z-0.785
G01 Z-0.862
G01 X240.000 Y-20.000 Z-0.862
G01 X240.000 Y-230.000 Z-0.900
G01 X239.909 Y-231.357 Z-0.938
G01 Z-1.015
G01 X239.643 Y-232.658 Z-1.015
G01 Z-1.092
G01 X239.214 Y-233.892 Z-1.092
G01 Z-1.166
G01 X238.635 Y-235.047 Z-1.166
G01 Z-1.240
G01 X237.916 Y-236.111 Z-1.240
G01 Z-1.314
G01 X237.071 Y-237.071 Z-1.314
G01 Z-1.386
G01 X236.111 Y-237.916 Z-1.386
G01 Z-1.460
G01 X235.047 Y-238.635 Z-1.460
G01 Z-1.534
G01 X233.892 Y-239.214 Z-1.534
G01 Z-1.608
G01 X232.658 Y-239.643 Z-1.608
G01 Z-1.685
G01 X231.357 Y-239.909 Z-1.685
G01 Z-1.762
G01 X230.000 Y-240.000 Z-1.762
G01 X20.000 Y-240.000 Z-1.800
M5 (PU)
G04 P2
(</Figure>)

(<Figure Id="2" Geometry="path" PenColor="000000" PenWidth="0.1" Layer="001" PathLength="902.8"> )
G00 X125.000 Y-245.000 Z1.800
M3 S1000 (PD)
G04 P2

G01 X20.000 Y-245.000 Z1.800
G01 X19.340 Y-245.022 Z1.819
G01 X18.686 Y-245.087 Z1.857
G01 X18.040 Y-245.194 Z1.894
G01 X17.405 Y-245.343 Z1.932
G01 X16.782 Y-245.532 Z1.969
G01 X16.173 Y-245.761 Z2.006
G01 X15.581 Y-246.030 Z2.044
G01 X15.006 Y-246.336 Z2.081
G01 X14.452 Y-246.680 Z2.118
G01 X13.920 Y-247.061 Z2.156
G01 X13.411 Y-247.477 Z2.193
G01 X12.929 Y-247.929 Z2.231
G01 X12.477 Y-248.411 Z2.269
G01 X12.061 Y-248.920 Z2.307
G01 X11.680 Y-249.452 Z2.344
G01 X11.336 Y-250.006 Z2.382
G01 X11.030 Y-250.581 Z2.419
G01 X10.761 Y-251.173 Z2.456
G01 X10.532 Y-251.782 Z2.494
G01 X10.343 Y-252.405 Z2.531
G01 X10.194 Y-253.040 Z2.568
G01 X10.087 Y-253.686 Z2.606
G01 X10.022 Y-254.340 Z2.643
G01 X10.000 Y-255.000 Z2.681
G01 X10.000 Y-465.000 Z2.700
G01 X10.022 Y-465.660 Z2.719
G01 X10.087 Y-466.314 Z2.757
G01 X10.194 Y-466.960 Z2.794
G01 X10.343 Y-467.595 Z2.832
G01 X10.532 Y-468.218 Z2.869
G01 X10.761 Y-468.827 Z2.906
G01 X11.030 Y-469.419 Z2.944
G01 X11.336 Y-469.994 Z2.981
G01 X11.680 Y-470.548 Z3.018
G01 X12.061 Y-471.080 Z3.056
G01 X12.477 Y-471.589 Z3.093
G01 X12.929 Y-472.071 Z3.131
G01 X13.411 Y-472.523 Z3.169
G01 X13.920 Y-472.939 Z3.207
G01 X14.452 Y-473.320 Z3.244
G01 X15.006 Y-473.664 Z3.282
G01 X15.581 Y-473.970 Z3.319
G01 X16.173 Y-474.239 Z3.356
G01 X16.782 Y-474.468 Z3.394
G01 X17.405 Y-474.657 Z3.431
G01 X18.040 Y-474.806 Z3.468
G01 X18.686 Y-474.913 Z3.506
G01 X19.340 Y-474.978 Z3.543
G01 X20.000 Y-475.000 Z3.581
G01 X230.000 Y-475.000 Z3.600
G01 X231.357 Y-474.909 Z3.638
G01 Z3.715
G01 X232.658 Y-474.643 Z3.715
G01 Z3.792
G01 X233.892 Y-474.214 Z3.792
G01 Z3.866
G01 X235.047 Y-473.635 Z3.866
G01 Z3.940
G01 X236.111 Y-472.916 Z3.940
G01 Z4.014
G01 X237.071 Y-472.071 Z4.014
G01 Z4.086
G01 X237.916 Y-471.111 Z4.086
G01 Z4.160
G01 X238.635 Y-470.047 Z4.160
G01 Z4.234
G01 X239.214 Y-468.892 Z4.234
G01 Z4.308
G01 X239.643 Y-467.658 Z4.308
G01 Z4.385
G01 X239.909 Y-466.357 Z4.385
G01 Z4.462
G01 X240.000 Y-465.000 Z4.462
G01 X240.000 Y-255.000 Z4.500
G01 X239.909 Y-253.643 Z4.538
G01 Z4.615
G01 X239.643 Y-252.342 Z4.615
G01 Z4.692
G01 X239.214 Y-251.108 Z4.692
G01 Z4.766
G01 X238.635 Y-249.953 Z4.766
G01 Z4.840
G01 X237.916 Y-248.889 Z4.840
G01 Z4.914
G01 X237.071 Y-247.929 Z4.914
G01 Z4.986
G01 X236.111 Y-247.084 Z4.986
G01 Z5.060
G01 X235.047 Y-246.365 Z5.060
G01 Z5.134
G01 X233.892 Y-245.786 Z5.134
G01 Z5.208
G01 X232.658 Y-245.357 Z5.208
G01 Z5.285
G01 X231.357 Y-245.091 Z5.285
G01 Z5.362
G01 X230.000 Y-245.000 Z5.362
G01 X125.000 Y-245.000 Z5.400
M5 (PU)
G04 P2
(</Figure>)

(<Figure Id="3" Geometry="path" PenColor="000000" PenWidth="0.1" Layer="001" PathLength="902.8"> )
G00 X230.000 Y-480.000 Z-0.038
M3 S1000 (PD)
G04 P2

G01 X231.357 Y-480.091 Z-0.038
G01 Z-0.115
G01 X232.658 Y-480.357 Z-0.115
G01 Z-0.192
G01 X233.892 Y-480.786 Z-0.192
G01 Z-0.266
G01 X235.047 Y-481.365 Z-0.266
G01 Z-0.340
G01 X236.111 Y-482.084 Z-0.340
G01 Z-0.414
G01 X237.071 Y-482.929 Z-0.414
G01 Z-0.486
G01 X237.916 Y-483.889 Z-0.486
G01 Z-0.560
G01 X238.635 Y-484.953 Z-0.560
G01 Z-0.634
G01 X239.214 Y-486.108 Z-0.634
G01 Z-0.708
G01 X239.643 Y-487.342 Z-0.708
G01 Z-0.785
G01 X239.909 Y-488.643 Z-0.785
G01 Z-0.862
G01 X240.000 Y-490.000 Z-0.862
G01 X240.000 Y-700.000 Z-0.900
G01 X239.909 Y-701.357 Z-0.938
G01 Z-1.015
G01 X239.643 Y-702.658 Z-1.015
G01 Z-1.092
G01 X239.214 Y-703.892 Z-1.092
G01 Z-1.166
G01 X238.635 Y-705.047 Z-1.166
G01 Z-1.240
G01 X237.916 Y-706.111 Z-1.240
G01 Z-1.314
G01 X237.071 Y-707.071 Z-1.314
G01 Z-1.386
G01 X236.111 Y-707.916 Z-1.386
G01 Z-1.460
G01 X235.047 Y-708.635 Z-1.460
G01 Z-1.534
G01 X233.892 Y-709.214 Z-1.534
G01 Z-1.608
G01 X232.658 Y-709.643 Z-1.608
G01 Z-1.685
G01 X231.357 Y-709.909 Z-1.685
G01 Z-1.762
G01 X230.000 Y-710.000 Z-1.762
G01 X20.000 Y-710.000 Z-1.800
G01 X18.643 Y-709.909 Z-1.838
G01 Z-1.915
G01 X17.342 Y-709.643 Z-1.915
G01 Z-1.992
G01 X16.108 Y-709.214 Z-1.992
G01 Z-2.066
G01 X14.953 Y-708.635 Z-2.066
G01 Z-2.140
G01 X13.889 Y-707.916 Z-2.140
G01 Z-2.214
G01 X12.929 Y-707.071 Z-2.214
G01 Z-2.286
G01 X12.084 Y-706.111 Z-2.286
G01 Z-2.360
G01 X11.365 Y-705.047 Z-2.360
G01 Z-2.434
G01 X10.786 Y-703.892 Z-2.434
G01 Z-2.508
G01 X10.357 Y-702.658 Z-2.508
G01 Z-2.585
G01 X10.091 Y-701.357 Z-2.585
G01 Z-2.662
G01 X10.000 Y-700.000 Z-2.662
G01 X10.000 Y-490.000 Z-2.700
G01 X10.091 Y-488.643 Z-2.738
G01 Z-2.815
G01 X10.357 Y-487.342 Z-2.815
G01 Z-2.892
G01 X10.786 Y-486.108 Z-2.892
G01 Z-2.966
G01 X11.365 Y-484.953 Z-2.966
G01 Z-3.040
G01 X12.084 Y-483.889 Z-3.040
G01 Z-3.114
G01 X12.929 Y-482.929 Z-3.114
G01 Z-3.186
G01 X13.889 Y-482.084 Z-3.186
G01 Z-3.260
G01 X14.953 Y-481.365 Z-3.260
G01 Z-3.334
G01 X16.108 Y-480.786 Z-3.334
G01 Z-3.408
G01 X17.342 Y-480.357 Z-3.408
G01 Z-3.485
G01 X18.643 Y-480.091 Z-3.485
G01 Z-3.562
G01 X20.000 Y-480.000 Z-3.562
G01 X230.000 Y-480.000 Z-3.600
M5 (PU)
G04 P2

(</Figure>)
(<Figure Id="4" Geometry="path" PenColor="000000" PenWidth="0.1" Layer="001" PathLength="1228.4"> )
G00 X405.000 Y-330.000 Z0.000
M5 (PD)
G04 P2

G01 X535.000 Y-330.000 Z0.000
G01 X539.071 Y-329.726 Z0.038
G01 Z0.115
G01 X542.975 Y-328.928 Z0.115
G01 Z0.192
G01 X546.677 Y-327.642 Z0.192
G01 Z0.266
G01 X550.142 Y-325.904 Z0.266
G01 Z0.340
G01 X553.332 Y-323.749 Z0.340
G01 Z0.414
G01 X556.213 Y-321.213 Z0.414
G01 Z0.486
G01 X558.749 Y-318.332 Z0.486
G01 Z0.560
G01 X560.904 Y-315.142 Z0.560
G01 Z0.634
G01 X562.642 Y-311.677 Z0.634
G01 Z0.708
G01 X563.928 Y-307.975 Z0.708
G01 Z0.785
G01 X564.726 Y-304.071 Z0.785
G01 Z0.862
G01 X565.000 Y-300.000 Z0.862
G01 X565.000 Y-40.000 Z0.900
G01 X564.726 Y-35.929 Z0.938
G01 Z1.015
G01 X563.928 Y-32.025 Z1.015
G01 Z1.092
G01 X562.642 Y-28.323 Z1.092
G01 Z1.166
G01 X560.904 Y-24.858 Z1.166
G01 Z1.240
G01 X558.749 Y-21.668 Z1.240
G01 Z1.314
G01 X556.213 Y-18.787 Z1.314
G01 Z1.386
G01 X553.332 Y-16.251 Z1.386
G01 Z1.460
G01 X550.142 Y-14.096 Z1.460
G01 Z1.534
G01 X546.677 Y-12.358 Z1.534
G01 Z1.608
G01 X542.975 Y-11.072 Z1.608
G01 Z1.685
G01 X539.071 Y-10.274 Z1.685
G01 Z1.762
G01 X535.000 Y-10.000 Z1.762
G01 X275.000 Y-10.000 Z1.800
G01 X270.929 Y-10.274 Z1.838
G01 Z1.915
G01 X267.025 Y-11.072 Z1.915
G01 Z1.992
G01 X263.323 Y-12.358 Z1.992
G01 Z2.066
G01 X259.858 Y-14.096 Z2.066
G01 Z2.140
G01 X256.668 Y-16.251 Z2.140
G01 Z2.214
G01 X253.787 Y-18.787 Z2.214
G01 Z2.286
G01 X251.251 Y-21.668 Z2.286
G01 Z2.360
G01 X249.096 Y-24.858 Z2.360
G01 Z2.434
G01 X247.358 Y-28.323 Z2.434
G01 Z2.508
G01 X246.072 Y-32.025 Z2.508
G01 Z2.585
G01 X245.274 Y-35.929 Z2.585
G01 Z2.662
G01 X245.000 Y-40.000 Z2.662
G01 X245.000 Y-300.000 Z2.700
G01 X245.274 Y-304.071 Z2.738
G01 Z2.815
G01 X246.072 Y-307.975 Z2.815
G01 Z2.892
G01 X247.358 Y-311.677 Z2.892
G01 Z2.966
G01 X249.096 Y-315.142 Z2.966
G01 Z3.040
G01 X251.251 Y-318.332 Z3.040
G01 Z3.114
G01 X253.787 Y-321.213 Z3.114
G01 Z3.186
G01 X256.668 Y-323.749 Z3.186
G01 Z3.260
G01 X259.858 Y-325.904 Z3.260
G01 Z3.334
G01 X263.323 Y-327.642 Z3.334
G01 Z3.408
G01 X267.025 Y-328.928 Z3.408
G01 Z3.485
G01 X270.929 Y-329.726 Z3.485
G01 Z3.562
G01 X275.000 Y-330.000 Z3.562
G01 X405.000 Y-330.000 Z3.600
M5 (PU)
G04 P2
(</Figure>)

(<Figure Id="5" Geometry="path" PenColor="000000" PenWidth="0.1" Layer="001" PathLength="1228.4"> )
G00 X535.000 Y-335.000 Z-0.038
M3 S1000 (PD)
G04 P2

G01 X539.071 Y-335.274 Z-0.038
G01 Z-0.115
G01 X542.975 Y-336.072 Z-0.115
G01 Z-0.192
G01 X546.677 Y-337.358 Z-0.192
G01 Z-0.266
G01 X550.142 Y-339.096 Z-0.266
G01 Z-0.340
G01 X553.332 Y-341.251 Z-0.340
G01 Z-0.414
G01 X556.213 Y-343.787 Z-0.414
G01 Z-0.486
G01 X558.749 Y-346.668 Z-0.486
G01 Z-0.560
G01 X560.904 Y-349.858 Z-0.560
G01 Z-0.634
G01 X562.642 Y-353.323 Z-0.634
G01 Z-0.708
G01 X563.928 Y-357.025 Z-0.708
G01 Z-0.785
G01 X564.726 Y-360.929 Z-0.785
G01 Z-0.862
G01 X565.000 Y-365.000 Z-0.862
G01 X565.000 Y-625.000 Z-0.900
G01 X564.726 Y-629.071 Z-0.938
G01 Z-1.015
G01 X563.928 Y-632.975 Z-1.015
G01 Z-1.092
G01 X562.642 Y-636.677 Z-1.092
G01 Z-1.166
G01 X560.904 Y-640.142 Z-1.166
G01 Z-1.240
G01 X558.749 Y-643.332 Z-1.240
G01 Z-1.314
G01 X556.213 Y-646.213 Z-1.314
G01 Z-1.386
G01 X553.332 Y-648.749 Z-1.386
G01 Z-1.460
G01 X550.142 Y-650.904 Z-1.460
G01 Z-1.534
G01 X546.677 Y-652.642 Z-1.534
G01 Z-1.608
G01 X542.975 Y-653.928 Z-1.608
G01 Z-1.685
G01 X539.071 Y-654.726 Z-1.685
G01 Z-1.762
G01 X535.000 Y-655.000 Z-1.762
G01 X275.000 Y-655.000 Z-1.800
G01 X270.929 Y-654.726 Z-1.838
G01 Z-1.915
G01 X267.025 Y-653.928 Z-1.915
G01 Z-1.992
G01 X263.323 Y-652.642 Z-1.992
G01 Z-2.066
G01 X259.858 Y-650.904 Z-2.066
G01 Z-2.140
G01 X256.668 Y-648.749 Z-2.140
G01 Z-2.214
G01 X253.787 Y-646.213 Z-2.214
G01 Z-2.286
G01 X251.251 Y-643.332 Z-2.286
G01 Z-2.360
G01 X249.096 Y-640.142 Z-2.360
G01 Z-2.434
G01 X247.358 Y-636.677 Z-2.434
G01 Z-2.508
G01 X246.072 Y-632.975 Z-2.508
G01 Z-2.585
G01 X245.274 Y-629.071 Z-2.585
G01 Z-2.662
G01 X245.000 Y-625.000 Z-2.662
G01 X245.000 Y-365.000 Z-2.700
G01 X245.274 Y-360.929 Z-2.738
G01 Z-2.815
G01 X246.072 Y-357.025 Z-2.815
G01 Z-2.892
G01 X247.358 Y-353.323 Z-2.892
G01 Z-2.966
G01 X249.096 Y-349.858 Z-2.966
G01 Z-3.040
G01 X251.251 Y-346.668 Z-3.040
G01 Z-3.114
G01 X253.787 Y-343.787 Z-3.114
G01 Z-3.186
G01 X256.668 Y-341.251 Z-3.186
G01 Z-3.260
G01 X259.858 Y-339.096 Z-3.260
G01 Z-3.334
G01 X263.323 Y-337.358 Z-3.334
G01 Z-3.408
G01 X267.025 Y-336.072 Z-3.408
G01 Z-3.485
G01 X270.929 Y-335.274 Z-3.485
G01 Z-3.562
G01 X275.000 Y-335.000 Z-3.562
G01 X535.000 Y-335.000 Z-3.600
M5 (PU)
(</Figure>)
G04 P2
M30
svenhb commented 6 months ago

Strange phenomenon. I'm assuming it's a hardware issue since the paths look identical. It is possible in Inkscape to reverse the path, to have it "correct" in your source. But you can also do it in GRBL-Plotter: Select path, right click "Reverse selected path" image

voleoo commented 6 months ago

Very strange issue, Universal G-code sender also cut not correct size when direction CCW. Made all figures to cutting by CW and that resolve my issue.

@svenhb Thank you.