Git Product home page Git Product logo

Comments (13)

ronoaldo avatar ronoaldo commented on August 21, 2024

Hi @merlinlcb - thanks for reaching out! I don't have any community setup so here is a good place to discuss.

The script hasn't a documentation/help text so the message is confusing. I have added some help text to the script, and this should clarify a bit how it is expected to work:

ronoaldo@jupiter $ ./gx.py 
Usage: gx.py COMMAND FILE

Where COMMAND can be:
    wrap    will add a basic GX header to the provided GCODE and print the result to stdout.
            Example: ./gx.py wrap testdata/cube.gcode > /tmp/cube.gx

    info    will print info from the GX header.
            Example: ./gx.py info testdata/cube.gx

ronoaldo@jupiter $ ./gx.py info testdata/cube.gx 
File: testdata/cube.gx
Print time: 525 s
Layer height: 0.18 mm
Perimeter shells: 2
Bed temperature: 0 C
Right extruder temp.: 220 C
Left extruder temp.: 0 C
Right extruder filament usage: 756 mm
Left extruder filament usage: 0 mm

ronoaldo@jupiter $ ./gx.py wrap testdata/cube.gcode > /tmp/cube.gx

ronoaldo@jupiter $ ./gx.py info /tmp/cube.gx
File: /tmp/cube.gx
Print time: 761 s
Layer height: 0.15 mm
Perimeter shells: 0
Bed temperature: 0 C
Right extruder temp.: 0 C
Left extruder temp.: 0 C
Right extruder filament usage: 0 mm
Left extruder filament usage: 0 mm

from flashforgefinderintegration.

Santoshsomi avatar Santoshsomi commented on August 21, 2024

@ronoaldo Thanks for making this, i did work for me, but when i try to print, finder says, file import error.
Have you faced such problem? im able to print very small files like marvin, cube.

from flashforgefinderintegration.

ronoaldo avatar ronoaldo commented on August 21, 2024

@Santoshsomi - sorry for the delay in my reply!

This is interesting... I am using the plugin from Cura and I print without errors - even printed a small toy for my kid last week using cura 5 and the version 2.0 of m plugin from the Marketplace.

One thing that did happened to me in the early stages and that I do on the Plugin part of the code is to ensure the image is gray scale. If the image has colors, it may embed the '\n' or '\r' characters; for proper importing in the Finder, the image preview must be in a single line in the xgcode header comment.

from flashforgefinderintegration.

Santoshsomi avatar Santoshsomi commented on August 21, 2024

well, even from the script from yours converts into gx, but the gcode has to be specifically to be in cura generated one? what if i use other slicer? i know the time, layer height gets mismatched but i seems like im getting file import error.
Does finder check header and footer while its trying to print?

from flashforgefinderintegration.

merlinlcb avatar merlinlcb commented on August 21, 2024

@Santoshsomi - sorry for the delay in my reply!

This is interesting... I am using the plugin from Cura and I print without errors - even printed a small toy for my kid last week using cura 5 and the version 2.0 of m plugin from the Marketplace.

One thing that did happened to me in the early stages and that I do on the Plugin part of the code is to ensure the image is gray scale. If the image has colors, it may embed the '\n' or '\r' characters; for proper importing in the Finder, the image preview must be in a single line in the xgcode header comment.

I've been experimenting with stripping all the features out of the script besides the wrap function in attempts to make this compatible with the export to gcode on prusaslicer/superslicer.

if we remove all the functions and have a copy of the script that does not expect arguments and just automatically assumes you want to wrap them the export SHOULD work seemlessly with other slicers, I could not however get my botched version of the script to work as I believe, before it's saved, the gcode file from prusaslicer/superslicer are a different format when using their export to gcode function.

I haven't doven into their source code yet but it should not be a hard thing to make work with alittle tweaking, one thing to note, I'd built a prusaslicer/superslicer config bundle for a voxel lab variant of the finder that also uses gx and when using prusaslicer/superslicer it was VERY difficult to fine tune first layer settings because the settings from the propietary slicer didn't actually work when made identically in superslicer/prusaslicer

from flashforgefinderintegration.

Santoshsomi avatar Santoshsomi commented on August 21, 2024

Hmm, because we are trying to add this finder into our slicer c6.fabheads.com , (you should try and see. Cool cloud based software).

It would be great if you can support this slicer also. I was able to print small cubes but benchy it failed.

from flashforgefinderintegration.

eskeyaar avatar eskeyaar commented on August 21, 2024

@Santoshsomi - sorry for the delay in my reply!
This is interesting... I am using the plugin from Cura and I print without errors - even printed a small toy for my kid last week using cura 5 and the version 2.0 of m plugin from the Marketplace.
One thing that did happened to me in the early stages and that I do on the Plugin part of the code is to ensure the image is gray scale. If the image has colors, it may embed the '\n' or '\r' characters; for proper importing in the Finder, the image preview must be in a single line in the xgcode header comment.

I've been experimenting with stripping all the features out of the script besides the wrap function in attempts to make this compatible with the export to gcode on prusaslicer/superslicer.

if we remove all the functions and have a copy of the script that does not expect arguments and just automatically assumes you want to wrap them the export SHOULD work seemlessly with other slicers, I could not however get my botched version of the script to work as I believe, before it's saved, the gcode file from prusaslicer/superslicer are a different format when using their export to gcode function.

I haven't doven into their source code yet but it should not be a hard thing to make work with alittle tweaking, one thing to note, I'd built a prusaslicer/superslicer config bundle for a voxel lab variant of the finder that also uses gx and when using prusaslicer/superslicer it was VERY difficult to fine tune first layer settings because the settings from the propietary slicer didn't actually work when made identically in superslicer/prusaslicer

@ronoaldo
Anything for this? i want this standalone script to work with our own slicer. Any lead will be appreciated.

from flashforgefinderintegration.

ronoaldo avatar ronoaldo commented on August 21, 2024

Hi @eskeyaar yeah, there are some interesting things we can do. Most of the code on the file gx.py is "standalone python" that could be integrated elsewhere.

The usage of this python module is as follows: you initialize a GX() object. You feed it some metadata and then you "encode" it to generate the header + original gcode.

The refactor I imagine here that would be useful is to have the metadata available in the original gcode itself parsed in this module; part of this is done by the Cura plugin interface and could easily be done in the module itself!

Information such as estimated print time makes the Finder work better with this showing a more interesting progress bar.

How do you plan to integrate with other slicer? As a subproccess call or as a plugin?

from flashforgefinderintegration.

ronoaldo avatar ronoaldo commented on August 21, 2024

Some references:

The part that "parses" the Cura metadata and extracts the data. Could be generalized by parsing the GCode commands:

https://github.com/ronoaldo/FlashforgeFinderIntegration/blob/master/plugins/GXWriter/GXWriter.py#L90

The python module that "encodes" and "decodes" the xgcode binary header format:

https://github.com/ronoaldo/FlashforgeFinderIntegration/blob/master/plugins/GXWriter/gx.py

from flashforgefinderintegration.

eskeyaar avatar eskeyaar commented on August 21, 2024

Hi @eskeyaar yeah, there are some interesting things we can do. Most of the code on the file gx.py is "standalone python" that could be integrated elsewhere.

The usage of this python module is as follows: you initialize a GX() object. You feed it some metadata and then you "encode" it to generate the header + original gcode.

The refactor I imagine here that would be useful is to have the metadata available in the original gcode itself parsed in this module; part of this is done by the Cura plugin interface and could easily be done in the module itself!

Information such as estimated print time makes the Finder work better with this showing a more interesting progress bar.

How do you plan to integrate with other slicer? As a subproccess call or as a plugin?

subprocess call.
one thing i still dont understand is cube is able to import into finder with this script, but other than cube say benchy or other models, finder is throwing file import error. i think there was no image on that particular file when importing, that maybe reason?
also does finder machine has to have those image header compulsory?
I can send you the file here, so that you can try and see in your printer and maybe check in gcode why its getting error?

from flashforgefinderintegration.

Santoshsomi avatar Santoshsomi commented on August 21, 2024

@ronoaldo
Here is the gx file which i ran over my gcode, when previewed over simplify3d it says invalid file header. I think this is also the same reason why the machine says file import error.
Cat.zip

from flashforgefinderintegration.

ronoaldo avatar ronoaldo commented on August 21, 2024

Hi @eskeyaar yeah, there are some interesting things we can do. Most of the code on the file gx.py is "standalone python" that could be integrated elsewhere.
The usage of this python module is as follows: you initialize a GX() object. You feed it some metadata and then you "encode" it to generate the header + original gcode.
The refactor I imagine here that would be useful is to have the metadata available in the original gcode itself parsed in this module; part of this is done by the Cura plugin interface and could easily be done in the module itself!
Information such as estimated print time makes the Finder work better with this showing a more interesting progress bar.
How do you plan to integrate with other slicer? As a subproccess call or as a plugin?

subprocess call. one thing i still dont understand is cube is able to import into finder with this script, but other than cube say benchy or other models, finder is throwing file import error. i think there was no image on that particular file when importing, that maybe reason? also does finder machine has to have those image header compulsory? I can send you the file here, so that you can try and see in your printer and maybe check in gcode why its getting error?

The machine can print a regula g-code file. This special header allows for the image preview functionality to work, as well as the print progress bar. Both need this special header, but that is not a mandatory feature.

In other words, you can uninstall the GXWritter plugin and still use the Finder without issues as far as I remember.

from flashforgefinderintegration.

ronoaldo avatar ronoaldo commented on August 21, 2024

@ronoaldo Here is the gx file which i ran over my gcode, when previewed over simplify3d it says invalid file header. I think this is also the same reason why the machine says file import error. Cat.zip

Thanks for he upload! I don't expect Simplify to be able to open that file. Perhaps you can open it with the Flashprint software as well for testing? I'll try your file in both as well as on my printer. My finder needs a nozzle replacement and I'm lazy on that replacement but I'll test it out soon (TM).

from flashforgefinderintegration.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.