robotsinthesun / monkeyprint

A simple tool for pre-processing 3d models and controlling 3d DLP printers
GNU General Public License v2.0
60 stars 35 forks source link

building for windows problems #29

Closed taalabash closed 6 years ago

taalabash commented 6 years ago

Thank you for including windows support in your great app

I think It is better to use " pyinstaller --onefile monkeyprint.spec " because the pyinstaller changes or resets the "monkeyprint.spec" file if we use "monkeyprint.py" and this will compile without using images included and that gives an error when the program starts so maybe you need to modify the instructions in the windowspackaging file

or another solution is to compile using --onedir and copy the .png files to the app directory

taalabash commented 6 years ago

actually the problem still existafter the last commit and I am facing another problem while building the software for windows i am using this cmd commands as a .bat file to build the app

pyinstaller --onedir --windowed monkeyprint.py copy logo.png dist\monkeyprint\ copy slicePreviewEmpty.png dist\monkeyprint\ copy slicePreviewSlicing.png dist\monkeyprint\

and monkeyprint built and open as it should be but i got an error every time i try to import a stl file and the slicer always freeze at about 1%~5%

this is the error

ERROR: In ....\VTK5.10.1-Qt\Filtering\vtkDemandDrivenPipeline.cxx, line 727 vtkStreamingDemandDrivenPipeline (000001B3B94FABE0): Input port 0 of algorithm vtkAppendPolyData(000001B3B95D8180) has 0 connections but is not optional.

ERROR: In ....\VTK5.10.1-Qt\Filtering\vtkDemandDrivenPipeline.cxx, line 727 vtkStreamingDemandDrivenPipeline (000001B3B94FABE0): Input port 0 of algorithm vtkAppendPolyData(000001B3B95D8180) has 0 connections but is not optional.

I built the app exactly as described in windowspackaging file the same error also appeared when I tried the prepackaged exe x64 file that you released

robotsinthesun commented 6 years ago

Your built seems OK but you could also just download the executable from the release page. Please try your stl with that executable. If the slicer still freezes, please send me that stl file. The vtk error messages are nothing to worry about, I just didn't find a way to hide them. Is there anything popping up in cmd if you start your executable from there?

taalabash commented 6 years ago

ok ... the executable from the release page worked well (with the error I mentioned before) but what what could be the problem preventing me from packaging the app ?

I have some experience with building fdm 3d printers and I wanted to build a dlp one this time so my idea was to learn python and build my own control software before I found monkeyprint so I am interested in changing the UI for example (of course if you give me the permission ) and that is why I wanted to package monkey print from source you can check some of my works here if you would like to 3dprinterroad.blogspot.com

taalabash commented 6 years ago

this is wat I got in the cmd window

Starting Monkeyprint 0.14.1 with GUI. Running from D:\slasoftwares\monkeyprint\monkeyprint-release\dist\monkeyprint VTK Warning: Warning: In ....\VTK5.10.1-Qt\Graphics\vtkMassProperties.cxx, line 120 vtkMassProperties (00000130E8CA2BA0): Input data type must be VTK_TRIANGLE not 9

Exception in thread Thread-2: Traceback (most recent call last): File "threading.py", line 801, in __bootstrap_inner File "monkeyprintModelHandling.py", line 2906, in run File "monkeyprintModelHandling.py", line 2928, in idle File "monkeyprintModelHandling.py", line 2939, in runSlicer File "monkeyprintModelHandling.py", line 3076, in updateSlices File "monkeyprintModelHandling.py", line 3206, in createSliceImage AttributeError: 'module' object has no attribute 'CV_AA'

robotsinthesun commented 6 years ago

Your error is related to OpenCV, an image processing library that I use to convert the slice polyline to a black-and-white image. I guess you downloaded the wrong version. Monkeyprint needs OpenCV 2.4. The CV_AA attribute was changed to LINE_AA in OpenCV 3. I didn't specify the version in my build notes, sorry for that.

Regarding changes to the UI: let's work on this together. Of course you have permission to change anything you like, but I suggest we keep things here. If you like, open another issue on that topic and we can discuss possible changes there.

taalabash commented 6 years ago

Ok it works !! I changed opencv to version 2.4 and everything worked as it should be thank you very much for your help