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

Javascript Port #55

Open
raykholo opened this issue Jun 3, 2016 · 0 comments
Open

Javascript Port #55

raykholo opened this issue Jun 3, 2016 · 0 comments

Comments

@raykholo
Copy link

raykholo commented Jun 3, 2016

A few of us (@openhardwarecoza @lautr3k) have been working on a browser based 3D Printing suite. Just the basic but necessary: drag in some STL files, display in a ThreeJS based viewer for plating, drag, resize, rotate. Then slice, get gcode back, display it, and send off to machine to print.

Right now I run Slic3r as a cloud service in Windows Azure that allows for HTTP POST with the 'master stl' of the bed layout and a json string of slicing parameters. It then sends gcode back as a string. It's really slow though and we have a lot of issues with CORS since the service in on a different domain.

Anyways, what I really like about MatterSlice is how neatly it is written: there are only 3 things that really seem to happen: variables, math, and Clipper: all of which we can do in JavaScript with only differences in syntax! So I'd like to take a shot at making a javascript implementation for browser based slicing without having to make any server calls.

I've been reading thru this code in depth, but could use some direction.

  • What can I start with for proof of concept? Is Slicer/Slicer.cs self sufficient to run a basic job?
  • Where is the entry point to pass in the input STL file? I can't seem to find this. We store everything as ThreeJS geometry inside an Object3D, but we already traverse it to create the 'master stl' for Slic3r, so we can pass an ASCII stl as a string to this. Maybe switch over to more 'raw' arrays of triangles later for better performance.
  • Similarly, how and where do we capture the output? Just need gcode in the form of a string.

Thanks guys. Looking forward to making this a reality.

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

No branches or pull requests

1 participant