Git Product home page Git Product logo

flashforgefinderintegration's Introduction

Flashforge Finder Cura utilities

This project contains several Cura slicer utilities that enhance the experience for Flashforge Finder users.

Install

From Marketplace

Version 1.0.0 available, and version 1.0.1 still under review!

Binary releases

Download from the .curapackages from Releases page and drop them into Cura. After you restart Cura, plugins will be installed and you can save .GX files already.

In order to add Flashforge Finder, you need to use the Extensions -> Flashforge Finder -> Install files menu entry. After that step, you can see FlashForge Finder in the Add Printer dialog.

From source

You can checkout the repository and use the GNU Make tool to build the .curapackage files yourself:

git clone https://github.com/ronoaldo/FlashforgeFinderIntegration
cd FlashforgeFinderIntegration
make

After that, there will be two .curapackage files in the build directory. Follow the same steps as the "Binary Releases" section to use them.

Optionally, you can just copy the two folders under plugins/ directory in your Cura configuration plugins direcotry. Go to "Help -> Show configuration directories" menu in order to achieve that.

About the support for .gx (xgcode) files

GX files are normal g-code but with an extra binary header used by FlashForge Finder and similar printers.

The header contains a few data used by the printer firmware, such as a thumbnail of the objet to print, print time, temperature and other information.

This work is based on the ChituCodeWriter from https://github.com/Spanni26/ChituCodeWriter and the detailed reverse-engineering description of the binary header from this issue on Github.

Whishlist

Binary xgcode 1.0 header

Github user https://github.com/cme-linux made a great work reverse engineering the binary header fields and shared this as a feature request for Slic3r.

To extract .BMP from .GX in Linux:

dd if=”file.gx” of=”file.bmp” skip=58 count=14454 iflag=skip_bytes,count_bytes

To extract G-Code from .GX in Linux:

dd if=”file.gx” of=”file.gcode” skip=14512 iflag=skip_bytes

Byte offsets in the .GX file, as stated in this feature request, are 0-based. All numbers are little-endian binary (2 or 4 bytes) unless specified to be ASCII plaintext.

Offsets through 0x1B seem to contain constant data:

  • The string "xgcode 1.0" terminated with a newline & NUL.
  • Then four 32-bit constants. (0, 58, 14512, 14512)
    • 58 is a pointer to the start of the bitmap
    • 14512 is a pointer to the start of the G-Code

Offsets 0x1C through 0x39 seem to contain the following variables. The first three are 4 bytes; the other ones are 2 bytes.

  • 0x1C - print time in seconds, 4 bytes.
  • 0x20 - filament usage in mm, 4 bytes.
  • 0x24 - left extruder filament usage in mm, 4 bytes.
  • 0x28 - multi-extruder type; the latest FlashPrint version (1.23.0) seems to put 0x0B here
  • 0x2A - layer height, microns (for example, 180 means 0.18 mm)
  • 0x2C - unknown; maybe unused (zero)
  • 0x2E - number of perimeter shells
  • 0x30 - print speed, mm/s
  • 0x32 - platform temp, Celsius
  • 0x34 - extruder temp, Celsius
  • 0x36 - left extruder temp, Celsius
  • 0x38 - unknown; maybe unused (zero)

FlashForge software/firmware uses that data these ways:

  1. The printer itself uses only the preview bitmap & the 4-byte print duration.
  2. FlashPrint has a "Slice Parameters" window that uses the 4-byte duration & filament length numbers. The other data in the "Slice Parameters" window comes from parsing the comments at the start of the G-Code, not from the binary header fields: (That means that Slic3r needs to generate these comments in the same format as FlashPrint.)
  • Layer height in mm (not microns)
  • Number of perimeter shells
  • Fill density (percentage)
  • Fill pattern (keywords I've seen are)
    • hexagon
    • triangle
    • line
    • 3dInfill
  • Print speed
  • Travel speed
  • Extruder temp (1-extruder printers use the comment for right_extruder)
  • Platform temp

After the header is the bitmap. This starts at offset 0x3A (decimal 58), ends @ offset 0x38AF. The next offset, 0x38B0 (decimal 14512), is the start of the G-code. The length of the bitmap is 0x3876 (decimal 14454) bytes.

The picture is in the ordinary .BMP format, uncompressed, 80 x 60 pixels (0x50 by 0x3C). Some of the following parameters would be taken care of automatically by a .BMP library, but I'll list these parameters anyway. The pixels start at byte offset 0x36 into the .BMP section of the .GX file. There are 256 shades of gray, written as 24-bit color, 3 bytes per pixel, all 3 bytes having the same value.

The .BMP pixels-per-meter values are set to 0x1274 which is 120 dpi. BMP files contain the pixel rows in bottom-to-top order.

The background is black and the 3D model is shown in an angled perspective view (lines parallel to the coordinate axes converge slightly into the distance).

Usefull links

flashforgefinderintegration's People

Contributors

eskeyaar avatar ronoaldo avatar spanni26 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

flashforgefinderintegration's Issues

Platform back to home position

Great work: Extension makes it possible to print using Cura on Raspberry Pi 4.

Only remark: after printing the printhead is brought to the home position and platform does not go back to home position.

For protection of the print nozzle, the platform should first go back to the home position. After that print head can go back to home position.

instructions for using gxwriter as standalone py script?

i see that there was a recent change to the gx.py script stating it made the script useable for other applications, im currently trying to use this for post processing gcode made by prusaslicer, but i cant seem to get gx.py to even work, it will not allow me to use the script on my already made gcode, so im wondering, what am i doing wrong? p.s. sorry if i shouldnt have put this in as an issue, but i didnt see anywhere else to put it

image

Can't select .gx in Cura 5.3.0

Export window of Cura 5.3.0 is like this:
image
Whereas Cura 5.2.1 has export window like this:
image
I have GXWriter 2.0.0 installed.
I am not expert but doesn't plugin supporting SDK 8.1.0 supports Cura 5.3.0?

Added a hot bed to my finder, can I still use this plugin?

Thanks for producing the plugin! I am sure many people are appreciative.

Long time Finder and FlashPrint boffin. But now I am getting dangerous, as I want to extend my knowledge.

Gist is at here, then here, and then here.

The basic story, I bought a second removable bed for my finder and mounted a hot plate - call me crazy 🤪. Plenty of thought given as to how to insulate, but obviously still needs testing (don't do this at home, yet).

The hot plate (obviously) means the bed is too tall for the finder levelling, and therefore the bed likely requires a reduction in the Z axis of the print volume.

Not sure how to deal with the levelling problem, unless I can drive that with G28 then G29 (Marlinesque), but a print should be doable, using CURA?

Is it as straight forward as dropping the "Gantry Height" in the "Machine Settings" with the "FlashforgeFinderIntegration", or dropping both "Gantry Height" and "Z (Height)"? Or is it going to need a hack of the plugin code please?

I assume, on a normal finder, the "Heate bed" and "Heated build volume" checkboxes are unused in any event? There seems no means to set the "Heated build volume" for example.

Cheers,
A

Flashforge Thumbnail to Prusaslicer idea.

Hello!
i am very ignorant of codes. Since I am using Prusaslicer on Flashforge Dreamer NX, the idea came to mind. Post-processing scripts can be added in Prusaslicer. Is there any way to customize your Cura plugin so that the script takes the same thumbnail and simply adds Gcode to the beginning when saving? And the .GX end can be added to the "Output fileneame format" line.
Best regards Egon

Plugin / CURA / Octoprint Integration

Good Day;

I was able to get this installed and change the settings to match the Flashforge Creator Max. I have not yet tried using it to print, but ran into an issue where after adding this plugin I am no longer able to connect to the Raspberry Pi with Octoprint on it for online management.

Would you know what I can do to help verify this plugin is not interfering with the Octoprint connection? It was working until this plugin was activated. Could be coincidental, but I want to be sure.

GXplugin script for a two-nozzle printer.

Hello!
Because on dual-nozzle printers, Cura adds the Gcode T0 command before it starts, and the printer recognizes it as an invalid code. Is it possible to make a script that checks before the start of Gcode T0 for existence and if necessary removes it? And would that be possible at all?
Many thanks! Egon

Cura 4.9.0

Hello,

I was wondering if there are any specific instruction for Cura 4.9.0. Downloaded from Marketplace seems to do nothing and dropping the packages to Cura also seems to do nothing.

Kind Regards
Ioannis

Cura 5

Do you plan to make this available for Cura 5?

Quality profiles not available in Cura 4.5 and earlier

Hi, I've just reviewed and tested your plug-in as you submitted it to the Marketplace. And I found a bug.

The printer profiles include some quality profiles (low, standard, high and hyper). However these profiles seem to be made for Cura 4.6. Earlier versions of Cura can't downgrade them. As a result, the profiles aren't available and it loads the default set of profiles or no profiles at all.

The following errors are put in the log:

2021-04-28 11:56:25,454 - WARNING - [MainThread] UM.Settings.ContainerRegistry.loadAllMetadata [324]: Invalid metadata for container finder_standard: {'quality_type': 'normal', 'type': 'quality', 'name': 'Standard Resolution', 'weight': '0', 'version': '4', 'definition': 'finder', 'container_type': <class 'UM.Settings.InstanceContainer.InstanceContainer'>, 'global_quality': 'True', 'setting_version': '13', 'id': 'finder_standard'}
2021-04-28 11:56:26,084 - WARNING - [MainThread] UM.Settings.ContainerRegistry.loadAllMetadata [324]: Invalid metadata for container finder_hyper: {'quality_type': 'hyper', 'type': 'quality', 'name': 'Hyper Resolution (Slower)', 'weight': '0', 'version': '4', 'definition': 'finder', 'container_type': <class 'UM.Settings.InstanceContainer.InstanceContainer'>, 'global_quality': 'True', 'setting_version': '13', 'id': 'finder_hyper'}
2021-04-28 11:56:26,308 - WARNING - [MainThread] UM.Settings.ContainerRegistry.loadAllMetadata [324]: Invalid metadata for container finder_low: {'quality_type': 'low', 'type': 'quality', 'name': 'Low Resolution (Faster)', 'weight': '0', 'version': '4', 'definition': 'finder', 'container_type': <class 'UM.Settings.InstanceContainer.InstanceContainer'>, 'global_quality': 'True', 'setting_version': '13', 'id': 'finder_low'}
2021-04-28 11:56:26,703 - WARNING - [MainThread] UM.Settings.ContainerRegistry.loadAllMetadata [324]: Invalid metadata for container finder_high: {'quality_type': 'high', 'type': 'quality', 'name': 'High Resolution (Slow)', 'weight': '0', 'version': '4', 'definition': 'finder', 'container_type': <class 'UM.Settings.InstanceContainer.InstanceContainer'>, 'global_quality': 'True', 'setting_version': '13', 'id': 'finder_high'}

They are invalid because it expects (in this case) the setting_version metadata to be 11.

Setting the setting_version to 6 should allow the profiles to be loaded in Cura 4.0 and higher, which is what the plug-in is marked to support. You should then be careful not to change any settings that are implemented in those newer Cura versions. I think the best approach would be to just set them to 6 and test it on all supported Cura versions. In Cura 4.0, see if it produces any errors in the log about settings that don't exist, and if so remove those setting overrides.

If you really need to use features of more recent Cura versions, you'd have to modify the installer to install different profiles in modern Cura versions than in the old ones. That would get complex.

Fixed Temperature assigned by gx script??

No matter what temperature i choose in my Cura profile, it sets to 180°C which is too low (stepper motor starts clicking because the filament is under too much pressure)

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.