zapta
Posts: 24
Joined: Mon Nov 02, 2015 9:18 am

How to avoid the .gcode files on my SD card?

I am using Flashforge Creator Pro with Sailfish. When I save the toolpath to the SD card, Simplify3D saves the .x3g file (good) as well as the .gcode file (spam, not used).

Is there a way to avoid the .gcode files on the SD card?

(I am using Max OSX if it matters).

Thanks,

Zapta.
CompoundCarl
Posts: 2005
Joined: Wed Aug 05, 2015 7:23 am

Re: How to avoid the .gcode files on my SD card?

I always like to have both files since the gcode is much more readable and can easily be ported to other machines in the future that have different x3g settings. But if you really wanted to delete it, you could probably setup a "command for post-processing" to do it (on the Scripts tab). Those are just terminal commands that run after the files are created. So if you were on Mac/Linux, you could just put:
rm [output_filename].gcode

The [output_filename] variable gets replaced with the name of the file you export. So if you saved test.x3g and test.gcode, then [output_filename] would be "test".

You may have to add a full path before that command. For example
rm /Users/username/Desktop/[output_filename].gcode

But I think you get the idea :D
zapta
Posts: 24
Joined: Mon Nov 02, 2015 9:18 am

Re: How to avoid the .gcode files on my SD card?

Hi CompoundCarl, thanks for the suggestion.

I tried that rm command but it doesn't work. It seems that Simplify does the following

1. Copies the .gcode to the SD card
2. Runs the terminal post processing commands
3. Run the X3G converter that reads the .gcode file from the SD and write the .x3g back to the SD.

Deleting the .gcode in step #2 breaks the .x3g generation in step #3.

This seems to me as a bug since the 'post processing' terminal commands are not really 'post'.

Any other suggestion?
CompoundCarl
Posts: 2005
Joined: Wed Aug 05, 2015 7:23 am

Re: How to avoid the .gcode files on my SD card?

It works for me. It creates the x3g file and then delete's the gcode (in that order). Just check the leftover files.

It's probably complaining because the software may expect the gcode file to be there as well, and it isn't. You're deleting the files the software is creating, so it's not surprising it may show a warning or something.

But anyways, I don't know any other way to do this, so you're on your own if you want to experiment with another method ;)
giantpune
Posts: 20
Joined: Wed Sep 30, 2015 10:58 am

Re: How to avoid the .gcode files on my SD card?

You'll actually get better performance if you tell Simplify3D to create the gcode+x3g on your harddrive or tmpfs/ramdisk and then use the scripts->postprocessing to copy the x3g to the SD card and clean up the tmp files. One thing I found is that at the time your postprocessing script is called, the x3g-generating helper program is not guaranteed to have written the full x3g file. it is necessary to loop and wait for the file size to stabilize so you know the file has been written completely.
zapta
Posts: 24
Joined: Mon Nov 02, 2015 9:18 am

Re: How to avoid the .gcode files on my SD card?

Simplify3D version 3.1.0 fixed the post processing terminal script issue. The new version calls the script only after it generates both the .gcode and .x3g files.

I couldn't find any reference to this change in the release notes.

It should be mentioned in the release notes because the new version breaks old scripts by passing for [output_filepath] the path of the .x3g file (used to be the .gcode file).

Anyway, this was a very useful fix. Thanks to whoever implemented it.

Return to “General Discussion and Tips”