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

[Brainstorming] Allow slicers to support other file formats #935

Closed
mic159 opened this issue Jun 17, 2015 · 8 comments

Comments

Projects
None yet
3 participants
@mic159
Copy link

commented Jun 17, 2015

I think it would be good to allow slicers to extend the list of allowed file extensions that can be uploaded and sliced.

For now I have local mods to add .png to the file manager as a "model" type here
and disabled the file extension checking on the slice endpoint here

  1. What were you doing?
    Trying to slice a PNG image into GCODE for engraving.
  2. What did you expect to happen?
    Be able to upload the PNG image to benbox and slice it.
  3. What happened instead?
    Wont allow upload, because file extension is not ".stl"
  4. Branch & Commit or Version of OctoPrint:
    Version: 1.2.0-rc1-3-g46711ce-dirty (master branch)
  5. Printer model & used firmware incl. version
    Benbox Laser Engraver
    benbox laser 2.7(c) mul 2014.12.25
  6. Browser and Version of Browser, Operating System
    Chrome 42, Ubuntu
  7. Link to octoprint.log on gist.github.com or pastebin.com
    ...
  8. Link to contents of terminal tab or serial.log on
    ...
  9. Link to contents of Javascript console in the browser
    ...
  10. Screenshot(s) showing the problem
    ...

I have read the FAQ.

@foosel

This comment has been minimized.

Copy link
Owner

commented Jun 17, 2015

Apart from this?

@mic159

This comment has been minimized.

Copy link
Author

commented Jun 17, 2015

Ooo, I missed that! Will give it a shot tomorrow.
Thanks!

@mic159 mic159 closed this Jun 17, 2015

@mic159

This comment has been minimized.

Copy link
Author

commented Jun 20, 2015

I took a look at the extension hook and it works well to allow it to be uploaded, but you still cant slice the new format because of this:

if not octoprint.filemanager.valid_file_type(filename, type="stl"):

The filetype I'm slicing is png.

def png_file_support(*args, **kwargs):
    return {
        'model': {
            'png': ['png']
        }
    }

The only workaround I can think of is registering it as an alternative extension for 'stl' which is a very dirty hack.

I think it would be better if the file types supported was part of the slicer properties so that the interface can show slicers that support that particular file type.

@mic159 mic159 reopened this Jun 20, 2015

@foosel

This comment has been minimized.

Copy link
Owner

commented Jun 20, 2015

Ok, noted, I'll try to get that into the next release after 1.2.0

@foosel foosel added this to the 1.3.0 milestone Jun 30, 2015

@foosel foosel modified the milestones: 1.3.0, 1.4.0 Jun 8, 2016

@mic159

This comment has been minimized.

Copy link
Author

commented Jul 2, 2016

still not possible :(

foosel added a commit that referenced this issue Jul 2, 2016

Support alternative source file types in SlicerPlugin
Also limit list of slicers in slicer dialog to compatible slicers.

Implements #935
@foosel

This comment has been minimized.

Copy link
Owner

commented Jul 2, 2016

@mic159 You are right, I totally forgot about this. To make up for it I used some of my weekend just now and whipped something up. Could you take a look at the improve/slicingFlexibility branch and see if it works for you?

@mic159

This comment has been minimized.

Copy link
Author

commented Jul 3, 2016

@foosel Thanks!
EDIT: Whoops, I had the wrong branch checked out. It works! 👍

@foosel

This comment has been minimized.

Copy link
Owner

commented Jul 16, 2016

Merged (a while ago cough), closing

@foosel foosel closed this Jul 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.