Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Auto Slice from drop Folder #10

Open
rsilvers129 opened this issue Jan 4, 2019 · 12 comments
Open

Feature Request: Auto Slice from drop Folder #10

rsilvers129 opened this issue Jan 4, 2019 · 12 comments
Labels
feature request New feature or request

Comments

@rsilvers129
Copy link

Currently Meshmixer has a way to to work directly with OpenSlicer, but there is a problem - Meshmixer crashes endlessly, and the support seems to be a random-number generator. I cannot do the same operation two times in a row and get the same result. It is sad because it is otherwise so cool.

Netfabb, however, is great, and Autodesk has put all their cards into that and seemingly abandoned Meshmixer, or at least put an intern or two on it. Also, people like B9. So my proposed feature is a way for OpenSlicer to work with ANY layout program automatically. It would work like this:

http://forum.makergear.com/viewtopic.php?t=1324

Set up a folder that is monitored by OpenSlicer, and, when an STL is written to it by B9 Creator, Meshmixer, Netfabb, or other program, it gets sliced automatically. It would parse the file name for layer size and erosion. So, if a file were saved as yoda-lh-50-hsc-1.stl, it would print at a layer height of 50 microns and do a horizontal size compensation of minus 1 pixel (could also allow + values).

@X3msnake
Copy link
Member

X3msnake commented Jan 4, 2019 via email

@rsilvers129
Copy link
Author

Yes, that would be better.

@X3msnake X3msnake changed the title Feature Request: Feature Request: Auto Slice from drop Foledr Jan 17, 2019
@X3msnake X3msnake changed the title Feature Request: Auto Slice from drop Foledr Feature Request: Auto Slice from drop Foleder Jan 17, 2019
@X3msnake X3msnake changed the title Feature Request: Auto Slice from drop Foleder Feature Request: Auto Slice from drop Folder Jan 17, 2019
@X3msnake X3msnake added the feature request New feature or request label Jan 17, 2019
@NardJ
Copy link
Contributor

NardJ commented Jan 26, 2019

@X3msnake @rsilvers129 Not quite sure if I understand: Open a gui to select settings when it detects a new file... or let the use manually open a gui to select a file and its slice settings?

@X3msnake
Copy link
Member

X3msnake commented Jan 26, 2019 via email

@rsilvers129
Copy link
Author

You have the slicer start with Windows 10 or and it watches a folder. You can use Netfabb, Asura, Meshmixer, B9, or some other program to lay out and add supports. You then save the STL into that folder that the slicer is monitoring. When it sees the file added, it pops up a GUI and you can pick layer height, exposure, and erode parameters. It then slices and makes a photon file, and then asks where to save that photon file with the GUI.

This will do two things. One is that it will allow people to use any layout program and make Photon files. The other is that it will do the important erode function that only Formware has.

Some nice features would be that the GUI should remember your previous settings at the very least, and even better if it has presets that you can configure and name and then just select one or add new presets.

@NardJ
Copy link
Contributor

NardJ commented Jan 27, 2019

@rsilvers129, @X3msnake
Done in development branch. Needs testing.

Usage:

  1. python PhotonSlicer.py -s ./STLs/monitor -g True -f False
  2. python PhotonSlicer.py -u True
  3. python PhotonSlicer.py -s ./STLs/monitor -g True -f False -u True
  1. This will monitor the subdir ./STLs and autoslice in openGL
  2. This will popup a window to input settings and slice
  3. This will monitor and popup window for new stl

Autoslice can be in CPU mode with progress in console (-g False -f True), CPU mode with progressdialog (-g True -f True) or in GPU mode with OpenGL window (-g True -f False).

image

PNG's as input/output will not work correctly in user interface. Must be fixed.

@rsilvers129
Copy link
Author

I will test it today. This is great.

@rsilvers129
Copy link
Author

$ python PhotonSlicer.py -s ../STLs -g True -f False
Traceback (most recent call last):
File "PhotonSlicer.py", line 31, in
from Stl2Slices import *
File "D:\3D\Slicer\Stl2Slices.py", line 14, in
import pyximport; pyximport.install()
ModuleNotFoundError: No module named 'pyximport'

@NardJ
Copy link
Contributor

NardJ commented Jan 28, 2019

Can you try to install pyximport with ‘pip install pyximport —user’ ?

@rsilvers129
Copy link
Author

rsilvers129 commented Jan 28, 2019

First I got this:

$ ./pip.exe install pyximport --user
Collecting pyximport
Could not find a version that satisfies the requirement pyximport (from versions: )
No matching distribution found for pyximport

Then I tried again but installed cython.

Then I got:

$ python PhotonSlicer.py -s ../STLs -g True -f False
Traceback (most recent call last):
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyximport\pyximport.py", line 215, in load_module
inplace=build_inplace, language_level=language_level)
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyximport\pyximport.py", line 191, in build_module
reload_support=pyxargs.reload_support)
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyximport\pyxbuild.py", line 102, in pyx_to_dll
dist.run_commands()
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\site-packages\Cython\Distutils\old_build_ext.py", line 194, in build_extensions
self.build_extension(ext)
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\distutils\command\build_ext.py", line 533, in build_extension
depends=ext.depends)
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\distutils_msvccompiler.py", line 345, in compile
self.initialize()
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\distutils_msvccompiler.py", line 238, in initialize
vc_env = _get_vc_env(plat_spec)
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\distutils_msvccompiler.py", line 134, in _get_vc_env
raise DistutilsPlatformError("Unable to find vcvarsall.bat")
distutils.errors.DistutilsPlatformError: Unable to find vcvarsall.bat

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "PhotonSlicer.py", line 31, in
from Stl2Slices import *
File "D:\3D\Slicer\Stl2Slices.py", line 15, in
import rleEncode
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyximport\pyximport.py", line 462, in load_module
language_level=self.language_level)
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyximport\pyximport.py", line 231, in load_module
raise exc.with_traceback(tb)
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyximport\pyximport.py", line 215, in load_module
inplace=build_inplace, language_level=language_level)
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyximport\pyximport.py", line 191, in build_module
reload_support=pyxargs.reload_support)
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pyximport\pyxbuild.py", line 102, in pyx_to_dll
dist.run_commands()
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\site-packages\Cython\Distutils\old_build_ext.py", line 194, in build_extensions
self.build_extension(ext)
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\distutils\command\build_ext.py", line 533, in build_extension
depends=ext.depends)
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\distutils_msvccompiler.py", line 345, in compile
self.initialize()
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\distutils_msvccompiler.py", line 238, in initialize
vc_env = _get_vc_env(plat_spec)
File "C:\Users\Robert Silvers\AppData\Local\Programs\Python\Python37-32\lib\distutils_msvccompiler.py", line 134, in _get_vc_env
raise DistutilsPlatformError("Unable to find vcvarsall.bat")
ImportErro

@X3msnake
Copy link
Member

X3msnake commented Jan 29, 2019

Hey @NardJ we need a requirements.txt file that way it is easier for people to install :)

Like this one I made for PFE https://github.com/Photonsters/PhotonFileEditor/blob/master/requirements.txt

USAGE: pip install -r requirements.txt

This does not invalidate the binary release, but it makes life easier for those that want to go the CLI way :)

@NardJ
Copy link
Contributor

NardJ commented Jan 29, 2019

Done, requirements.txt is present.

(Add ‘—user’ if install returns permissions error.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants