Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<FR>Processing non printer Gcode files #70

Open
ithinkido opened this issue Jun 29, 2021 · 17 comments
Open

<FR>Processing non printer Gcode files #70

ithinkido opened this issue Jun 29, 2021 · 17 comments
Assignees
Milestone

Comments

@ithinkido
Copy link

ithinkido commented Jun 29, 2021

--EDIT-- I have since discoverd that Arcwlder will only process 3D prnter files with valid extruder moves ( E......).
Would there be any chance of a a feature to process not 3D printer Gcode using a flag maybee ( eg -- non-printer) ? This would alow the use in other areas such as pen plotting where it would be greatly appreciated. What I could imagine is that using the --non-printer flag would then only process G1 > G2/G3 moves, ignoring the need for E moves.

I would like to process some Gcode for a pen plotter to reduce the code size and hopefully improve smoothness. I have tried with both the Windows and Linux versions, and although it appears that ArcWelder has successfully run, it does not seem to be creating any arc moves.The test file attached should be a good candidate for this.
Is it possible that ArcWelder only works on 3D printer gcode files with a specific format ?
spiral.nc.txt
image

@ithinkido ithinkido changed the title Processing non printer Gcode files <FR>Processing non printer Gcode files Jul 4, 2021
@FormerLurker
Copy link
Owner

You are in luck! I just finished a feature to encode travel moves (moves without any extrusion). It needs more testing, but here are the results from processing the file you posted:

image

Here is a side-by-side comparison of the tool paths:

image

The orange lines are G0/G1 commands, the blue lines are G2/G3 commands. As you can see, much of this file was successfully converted.

If you would like to try out the devel version, let me know and I'll post some instructions.

@FormerLurker FormerLurker modified the milestones: V1.0, v1.1 Jul 6, 2021
@FormerLurker FormerLurker self-assigned this Jul 6, 2021
@just-jason
Copy link

If you would like to try out the devel version, let me know and I'll post some instructions.

Yes please, I definitely would like to try that out.

@FormerLurker
Copy link
Owner

Check here for the latest bin files. If you want you can post your gcode and I can do a sanity check before you try it out.

@FormerLurker
Copy link
Owner

Actually, i guess you will try the gcode you already posted, which I already reviewed, lol

@just-jason
Copy link

For my use this is PERFECT. The tests I have done are working just as I had hoped. There will be a lot of pen plotter users happy about this. Thanks very much.

@FormerLurker
Copy link
Owner

Hooray! If you have time, could you post a pic of your finished plot?

@just-jason
Copy link

Sorry fro the delay. A strange thing, I went to do a conversion again today, and I can not get Arcwelder to run. Very strange.

image

@FormerLurker
Copy link
Owner

Hmm.. I will look at the console app. It LOOKS like I must have screwed something up. Try adding a second parameter for giggles, like:

ArcWelder.exe perlin.gcode perlin.aw.gcode

and see what happens. Otherwise I messed up configuring TCLAP for the new parameters.

@just-jason
Copy link

Still the same

@FormerLurker
Copy link
Owner

Ok, will do my best to reproduce and fix. Might take a few days depending. Thanks!

@FormerLurker
Copy link
Owner

Ok, this was totally my fault, lol! Try the builds here, which I think should work much better.

@just-jason
Copy link

Looking good now. I was confused at first as the info stats did not show any converted arcs , but the end file has been converted so I would call that a success.
image
spiral.nc.txt

@FormerLurker
Copy link
Owner

I will look at that issue as well. It is a work in progress ☺️

@FormerLurker
Copy link
Owner

Ok, this should fix the statistics display issue.

@just-jason
Copy link

Perfect !!!

2021-07-18 14:41:11.010 - arc_welder.gcode_conversion - INFO - Processing GCode.
2021-07-18 14:41:11.011 - arc_welder.gcode_conversion - INFO - Arc Welder Arguments
        Source File Path             : spiral.nc
        Target File Path (overwrite) : spiral.nc
        Resolution                   : 0.05mm (+-0.02500mm)
        Path Tolerance               : 5.000%
        Maximum Arc Radius           : 9999mm
        Min Arc Segments             : 0
        MM Per Arc Segment           : 0.000
        Allow 3D Arcs                : False
        Allow Travel Arcs            : True
        Allow Dynamic Precision      : False
        Default XYZ Precision        : 3
        Default E Precision          : 5
        Extrusion Rate Variance %    : 5.000%
        G90/G91 Influences Extruder  : False
        Max Gcode Length             : Unlimited
        Log Level                    : INFO
        Hide Progress Updates        : False
Progress:  00.0% complete - Estimating remaining time.
Progress: 100.0% complete - 0.03 seconds total.
2021-07-18 14:41:11.043 - arc_welder.gcode_conversion - INFO - Target File Travel Statistics:
   Min          Max     Source  Target Change
---------------------------------------------
  0.000mm to   0.002mm       0       0   0.0%
  0.002mm to   0.005mm       0       0   0.0%
  0.005mm to   0.010mm       0       0   0.0%
  0.010mm to   0.050mm       0       0   0.0%
  0.050mm to   0.100mm       0       0   0.0%
  0.100mm to   0.500mm       0       0   0.0%
  0.500mm to   1.000mm     156       9 -94.2%
  1.000mm to   5.000mm    7084    2688 -62.1%
  5.000mm to  10.000mm       0     388    INF
 10.000mm to  20.000mm       0      14    INF
 20.000mm to  50.000mm       0       0   0.0%
 50.000mm to 100.000mm       0       0   0.0%
          >= 100.000mm       1       1   0.0%
---------------------------------------------
Total distance source:............10718.980mm
Total distance target:............10720.180mm
   Total count source:...................7241
   Total count target:...................3100
 Total percent change:.................-57.2%
2021-07-18 14:41:11.044 - arc_welder.gcode_conversion - INFO - Target File Extrusion Statistics:
   Min          Max     Source  Target Change
---------------------------------------------
  0.000mm to   0.002mm       0       0   0.0%
  0.002mm to   0.005mm       0       0   0.0%
  0.005mm to   0.010mm       0       0   0.0%
  0.010mm to   0.050mm       0       0   0.0%
  0.050mm to   0.100mm       0       0   0.0%
  0.100mm to   0.500mm       0       0   0.0%
  0.500mm to   1.000mm       0       0   0.0%
  1.000mm to   5.000mm       0       0   0.0%
  5.000mm to  10.000mm       0       0   0.0%
 10.000mm to  20.000mm       0       0   0.0%
 20.000mm to  50.000mm       0       0   0.0%
 50.000mm to 100.000mm       0       0   0.0%
          >= 100.000mm       0       0   0.0%
---------------------------------------------
       Total distance:................0.000mm
   Total count source:......................0
   Total count target:......................0
 Total percent change:...................0.0%
2021-07-18 14:41:11.046 - arc_welder.gcode_conversion - INFO - Arc Welder process completed successfully.

@fabien
Copy link

fabien commented Jun 7, 2022

I'm trying to use ArcWelder (1.2.0) using the CLI on macOS to prepare files for my CNC outfitted with a tangential knife cutting module (my controller handles the knife axis rotation automatically, I just feed it G1/G2/G3 instructions).

Even though my source files don't have any E codes, the G1 instructions are being output as G2/G3 - this is without the --allow-travel-arcs option (which I think is for non-3D printing use-cases like mine).

Granted, it did not work on all files (like this one: https://gist.github.com/fabien/4eb67e67cf116236b61d50d6e936d6b9), so I decided the --allow-travel-arcs option instead.

However, when I do set --allow-travel-arcs I don't get any G2/G3 conversion at all, not even on the ones that converted before - all G1's remain untouched (same for spiral.nc above). So it appears to work exactly in the opposite way for me, which seems very odd (in fact, in 1.2.0 adding this flag will actually disable this feature, setting Allow Travel Arcs: False).

Unfortunately, I cannot find release binaries for v.2.0 to see if it makes any difference. In the meantime I have tested more input files from CNC (milling) CAM software, and those don't process into G2/G3 at all, even when Allow Travel Arcs is True
as shown in the output log ...

I cannot see why this converts and the gist above doesn't. Any thoughts?

EDIT: turns out the reason why some files were not being processed correctly is simply the fact that they contained G01 instructions instead of G1.

In other words, the parser should have been more lenient, as usually both formats are permitted.

@FormerLurker
Copy link
Owner

@fabien,

I believe I fixed the inverted option for --allow-travel-arcs, but still need to add detection of the G01 as opposed to G1. It's unfortunate that these are both valid commands, as this will increase parsing time for everyone :(. However, compliance is compliance, so I'll get that working too. Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants