During work on ReCube there was one point which was unclear to me: How to find material and color codes used in cartridge memory?

Cartridge is using 2 banks of its memory. First is for general cartridge info (max amount, material and color type) second is for current filament amount status. For me more interesting was first bank.

Red rectangle show material and color code of my cartridge with is Dark Grey PLA. Of course at the beginning it was not known for me that this part of memory is description of color and material, I have found it doing decompilation of “Cube Print.exe”, original slicer for Cube3.

At https://github.com/0xd4d/dnSpy you can find very useful 🙂 tool for decompilation of .net exe files. dnSpy have many features like debugger and assembly editor and what is important it is FREE.

So start dnSpy and drag&drop our “Cube Print.exe” into main window. After a wile you will see Cube Print disassembled and additionally all dependency files which are used by Cube Print.

Lets check what is Cube Print doing at startup:

We see that it starting main process and after Possible upgrade checks it performs initialization of constants – CubifyConstants.CubifyConstantsIntialize();. Lets check this method, so CTRL+right mouse and we are in. That what is showing to us:

Mine 101 means:

MaterialTypes = CubifyConstants.MaterialTypes.PLA,
ColorHexCode = “#FF53565A”,
ColorEnum = 101,

In this document are collected all pairs color and material type which are supported by ReCube Pro: Material&Colors

Generally if you go deeper into Cube Print construction you can find more information not only regarding material types but also Cube3/Cube Pro communication protocol and output file (*.cube3) construction.

I also recommend to play a bit, similar way with “Cubeit_Dir\cubeit.exe” file you can find there something like this:

Have fun 😉