terjeio / ioSender

A GCode Sender for Grbl and grblHAL written in C# (Windows only).
BSD 3-Clause "New" or "Revised" License
222 stars 66 forks source link

Heightmap with modal gcodes #261

Closed tetref closed 1 year ago

tetref commented 1 year ago

I don't know if I'm writing this correctly: I have a post processor that creates a circle with modal values X Y I J such that it logically omits some, eg G3X0I10J0. If I apply Height map to such code, error 33 occurs on the first line with G3. It seems to replace or add the missing value X to Z. So the line looks something like this: G3X17Z0.196I-10J0 I tried different gcodes. I have no problem with this code before applying. Only after setting Y as nonmodal is everything fine. The problem is with all versions of the program. For circle G3, must all values be non modal except Z?

terjeio commented 1 year ago

Do you have an example (including a height map file)?

tetref commented 1 year ago

Original gcode:

% G21 G90 M3 S10000 G0 Z6.000 G0 X20.000 Y10.000 G1 Z-0.100 F200.0 G17 G3X0.000I-10.000J0.000 G3X20.000I10.000J0.000 G0 Z6.000 G0 X20.000 Y10.000 G0 X0.0000 Y0.0000 M30

Heightmap:

<?xml version="1.0" encoding="utf-8"?>

0 0.029 0.032 0.06 0.064 0.049 0.072 0.073 0.092 0.105 0.081 0.109 0.133 0.132 0.143 0.147 0.162 0.169 0.174 0.179 0.181 0.193 0.2 0.198 0.196

Gcode after Apply:

G21 G90 S10000M3 G0Z6 G0X20Y10Z6.2 F200 G1Z3.15 G1Z0.1 G17 G3X19.01Z0.093I-10J0 G3X16.235Z0.082I-9.01J-4.339 G3X12.225Z0.059I-6.235J-7.818 G3X7.775Z0.025I-2.225J-9.749 G3X3.765Z-0.01I2.225J-9.749 G3X0.99Z-0.037I6.235J-7.818 G3X0Z-0.068I9.01J-4.339 G3X0.99Z-0.062I10J0 G3X3.765Z-0.052I9.01J4.339 G3X7.775Z-0.032I6.235J7.818 G3X12.225Z0.011I2.225J9.749 G3X16.235Z0.062I-2.225J9.749 G3X19.01Z0.088I-6.235J7.818 G3X20Z0.1I-9.01J4.339 G0Z6.2 G0X20Y10Z6.2 G0X0Y0Z6 M30

heightmap gcode_before gcode_after gcode_heightmap.zip

terjeio commented 1 year ago

I belive I have fixed this, but I want to verify with a more comprehensive piece of gcode before release. This has to wait until I am back home later in January. Until then you may use File > Transform > Arcs to lines before applying the map as a workaround.

terjeio commented 1 year ago

Can you try the latest edge version?, available from here.

tetref commented 1 year ago

Neither version 2.0.42p0 can be started, it reports an error. Copying the App.config from another version didn't help either. IoSender_error

terjeio commented 1 year ago

I've tested the standard version after downloading the zip and it works for me. Can you translate the error message? Which controller are you using?

tetref commented 1 year ago

Info from 2.0.41

[VER:1.1f.20221101:] [OPT:VNMZSL,35,1024,3,0] [AXS:3:XYZ] [NEWOPT:ENUMS,RT+,HOME,ES,TC,SED] [FIRMWARE:grblHAL] [NVS STORAGE:*FLASH] [DRIVER:STM32F411] [DRIVER VERSION:221014] [BOARD:BlackPill]

The index is outside the field bounds. Probably the correct translation is : "Index Out of Range Exception".

terjeio commented 1 year ago

Thanks, that helps. Fixed versions uploaded now.

tetref commented 1 year ago

Version 2.042p1 seems to work ! After loading the gcode, the circle appears as a hex, and after applying the heightmap, it appears as a "perfect" circle. Perfect, seems to be fixed, thanks...