color mixer works out of the box for linux. Please make it available

Post Reply
valadas
Posts: 3
Joined: Thu Nov 28, 2019 6:54 am

color mixer works out of the box for linux. Please make it available

Post by valadas » Thu Nov 28, 2019 7:11 am

The color mixer software is essentially a pyQT5 application, both in the cases of windows and mac it's the same application.
We can see everything by downloading the mac application (the windows one too but it's a bit more complicated). And it's pretty easy to get running.

Given that it's so simple to port it to linux why don't you just publish the source code?
If anyone wants to steal the source code, they will do it anyway, I don't think it's even necessary to publish a package, just the source code and it will be pretty easy to install.

How to install

IMPORTANT: These instructions assume python is python 3.7

Code: Select all

unzip 'ColorMixer(Beta) for Mac.zip'
cd 'ColorMixer(Beta) for Mac'/ColorMixer.app/Contents/Resources
cd lib
unzip python36
cp -r model/ view/ unit/ interval infinity.pyc ~/.local/lib/python3.7/site-packages/.
# Adding the uncompyle6 so that we can run it on python different to 3.6

Code: Select all

uncompyle6 ~/.local/lib/python3.7/site-packages/model/ConfigurationGroup.pyc > ~/.local/lib/python3.7/site-packages/model/ConfigurationGroup.py
uncompyle6 ~/.local/lib/python3.7/site-packages/model/EasyAnalyzer.pyc > ~/.local/lib/python3.7/site-packages/model/EasyAnalyzer.py
uncompyle6 ~/.local/lib/python3.7/site-packages/model/__init__.pyc > ~/.local/lib/python3.7/site-packages/model/__init__.py
uncompyle6 ~/.local/lib/python3.7/site-packages/view/E2ConfigurationUI.pyc > ~/.local/lib/python3.7/site-packages/view/E2ConfigurationUI.py
uncompyle6 ~/.local/lib/python3.7/site-packages/view/E3ConfigurationUI.pyc > ~/.local/lib/python3.7/site-packages/view/E3ConfigurationUI.py
uncompyle6 ~/.local/lib/python3.7/site-packages/view/__init__.pyc > ~/.local/lib/python3.7/site-packages/view/__init__.py
uncompyle6 ~/.local/lib/python3.7/site-packages/view/MixerUI.pyc > ~/.local/lib/python3.7/site-packages/view/MixerUI.py
uncompyle6 ~/.local/lib/python3.7/site-packages/unit/__init__.pyc > ~/.local/lib/python3.7/site-packages/unit/__init__.py
uncompyle6 ~/.local/lib/python3.7/site-packages/unit/LinkList.pyc > ~/.local/lib/python3.7/site-packages/unit/LinkList.py
uncompyle6 ~/.local/lib/python3.7/site-packages/unit/Node.pyc > ~/.local/lib/python3.7/site-packages/unit/Node.py
uncompyle6 ~/.local/lib/python3.7/site-packages/intervals/exc.pyc > ~/.local/lib/python3.7/site-packages/intervals/exc.py
uncompyle6 ~/.local/lib/python3.7/site-packages/intervals/__init__.pyc > ~/.local/lib/python3.7/site-packages/intervals/__init__.py
uncompyle6 ~/.local/lib/python3.7/site-packages/intervals/interval.pyc > ~/.local/lib/python3.7/site-packages/intervals/interval.py
uncompyle6 ~/.local/lib/python3.7/site-packages/intervals/parser.pyc > ~/.local/lib/python3.7/site-packages/intervals/parser.py
uncompyle6 ~/.local/lib/python3.7/site-packages/infinity.pyc > ~/.local/lib/python3.7/site-packages/infinity.py
# Add a shebang:

Code: Select all

echo '#!/usr/bin/python' > colormixer
cat main.py >> colormixer
# Add it to user $PATH

Code: Select all

mv colormixer ~/.local/bin/colormixer
chmod 550 /usr/bin/colormixer
And now you can simply run it by executing colormixer.

And there we see the application under the directories model and view, these are .pyc

Edit: Updated instructions to run it on Linux.
Edit: 2 No sudo. since I'm touching the ~/.local/lib it wouldn't work on other users anyway...
Last edited by valadas on Tue Dec 03, 2019 11:09 pm, edited 1 time in total.

valadas
Posts: 3
Joined: Thu Nov 28, 2019 6:54 am

Re: color mixer works out of the box for linux. Please make it available

Post by valadas » Thu Nov 28, 2019 8:55 am

Can someone please confirm if the mac version works at all? I'm hitting an infinite loop, while loading the UI.
After fixing that I see the model fails if it doesn't starts with 'G1 Z15 F' or 'G1 Z15.0 F'

There is no way this can work:

Code: Select all

    def analyse_gcode(self, path):
        self.reset()
        with open(path, 'r') as (data):
            print("for") 
            for line in data:
                print("line")
                self.gcode_list.append(line)
                if line[0] == ';':
                    continue
                if line[0] == 'G':
                    if not line.startswith('G1 Z15 F'):
                        if not line.startswith('G1 Z15.0 F'):
                            if ';waiting' in line:
                                pass
                    else:
                        z_position = re.search('^G[01]\\s+.*Z\\+?(?P<pos_z>\\d+(\\.\\d+)?).*$', line, re.M | re.I)
                        if z_position:
                            self.z_last_position = self.z_current_position
                            self.z_current_position = float(z_position.group('pos_z'))
                            if self.z_current_position > self.z_last_position:
                                self.interval_height.append(float('%.2f' % (self.z_current_position - self.z_last_position)))
                        self.layer_count = self.layer_count + 1
                        self.z_to_layer[self.z_current_position] = self.layer_count
                        self.layer_to_z[self.layer_count] = self.z_current_position
This only counts layers if they start with 'G1 Z15 F'. My gcode generated with cura 4.4 despite of only has exactly one line beginning with G1 Z15, which means it has 0 layers, despite of it having 98 layers.

Can I please get the source code of the windows version?

Edit: I see cura generates each layer in a format similar to:
G0 F600 X120.893 Y93.174 Z0.4
G0 F600 X103.654 Y107.911 Z0.5


So this tool may work with some slicers, but not cura. Anyway the instructions should be useful for whoever uses this tool combined with the slicer that is compatible.

User avatar
William
Site Admin
Posts: 6340
Joined: Tue Jun 07, 2016 9:38 am

Re: color mixer works out of the box for linux. Please make it available

Post by William » Thu Nov 28, 2019 9:42 am

Hi, thank you for your feedback.
We will discuss this situation.
thanks so much.
-Keep your mind and try to test it. :)
-Everything will be fun!-Support all Getech printer.
-You can ask me the questions and I will kindly reply.
-Respect others is the best way you can get help!

valadas
Posts: 3
Joined: Thu Nov 28, 2019 6:54 am

Re: color mixer works out of the box for linux. Please make it available

Post by valadas » Sat Nov 30, 2019 12:16 am

Hi William,
I have a modified version of this program which works for gcode cura slicer and in linux, can I publish it?

Legally speaking it's pretty OK to do it for myself because I live in the European Union. However this software is shipped without a license and without copyright so I'm not quite sure how legal is publishing these changes without geeetech's explicit consent.

mitchbw
Posts: 1
Joined: Sat Sep 18, 2021 8:14 pm

Re: color mixer works out of the box for linux. Please make it available

Post by mitchbw » Sun Sep 26, 2021 7:01 pm

I would live to see a version of color mix for Linux, I m finding it quite frustrating there not being one

Post Reply