New in-browser CAM: jscut
New in-browser CAM: jscut
I got frustrated with MakerCam dragging things around when I click, so I thought I'd try rolling my own CAM in JavaScript. It's very alpha (I started about a week ago), but I've already got it cutting on a Shapeoko at my local makerspace:
It's GPL and it's on GitHib: https://github.com/tbfleming/jscut. I welcome pull requests; it still needs a lot of improvement. I placed a live version at http://jscut.org/.
The wobblyness in the video (the cross on the t should be nearly straight) is from the Y axis; we only have a single Y stepper on it right now.
It's GPL and it's on GitHib: https://github.com/tbfleming/jscut. I welcome pull requests; it still needs a lot of improvement. I placed a live version at http://jscut.org/.
The wobblyness in the video (the cross on the t should be nearly straight) is from the Y axis; we only have a single Y stepper on it right now.
-
- Posts: 8618
- Joined: Mon Apr 09, 2012 6:11 pm
- Location: Pennsylvania --- south of the Turnpike, East of US-15
- Contact:
Re: New in-browser CAM: jscut
Great!
I added it to the wiki:
|2.5D||[http://jscut.org/ jscut]||Converts SVG files to CNC cutting paths. GPL, source available on [https://github.com/tbfleming/jscut github].
I noticed this in the interface: Curve To Line Conversion --- have you considered instead doing an approximation of Bezier curves using arcs?
I added it to the wiki:
|2.5D||[http://jscut.org/ jscut]||Converts SVG files to CNC cutting paths. GPL, source available on [https://github.com/tbfleming/jscut github].
I noticed this in the interface: Curve To Line Conversion --- have you considered instead doing an approximation of Bezier curves using arcs?
Shapeoko 3XL #0006 w/ Carbide Compact Router w/0.125″ and ¼″ Carbide 3D precision collets
Re: New in-browser CAM: jscut
I'm using a polygon library (http://sourceforge.net/projects/jsclipper/) to do the boolean operations and the offsetting. If there's a similar library that does the same to curved paths then I might switch.
Re: New in-browser CAM: jscut
A 2.5D CAM needs a 3D cut preview, so I added one! A demo with already-produced gcode is at http://jscut.org/RenderPath.html. The live version at http://jscut.org now includes the preview built in. The GCODE preview uses WebGL.


Re: New in-browser CAM: jscut
Is there a way to specify cutting direction?
Re: New in-browser CAM: jscut
There is now; I just added Direction to Selected Operation.McOtis wrote:Is there a way to specify cutting direction?
Re: New in-browser CAM: jscut
Nice !
I'm interested about how do the cut preview work ?
Do you calculate the new geometry ?
Does it use some shader ?
I'm interested about how do the cut preview work ?
Do you calculate the new geometry ?
Does it use some shader ?
Shapeoko #736
Kress 800, Z Axis upgrade, dual Y, 600mm X&Y rails, metal spacers and V Wheels, home switches, 4th axis
Goko - Free CNC Control Software - http://www.shapeoko.com/forum/viewtopic ... 380#p44380
Kress 800, Z Axis upgrade, dual Y, 600mm X&Y rails, metal spacers and V Wheels, home switches, 4th axis
Goko - Free CNC Control Software - http://www.shapeoko.com/forum/viewtopic ... 380#p44380
Re: New in-browser CAM: jscut
Thanks!PsyKo wrote:Nice !
I render it in two passes:PsyKo wrote:I'm interested about how do the cut preview work ?
Do you calculate the new geometry ?
Does it use some shader ?
- Rasterize path. The GPU runs a pair of shaders to convert the path to a 1024x1024 height map. The shaders throw out the portion of the path that exceeds the stop time, which is controlled by the slider. The height map is a texture; it stores the height in the red channel. The shaders live in rasterizePathVertexShader.txt and rasterizePathFragmentShader.txt.
- Render height map. A pair of shaders convert the height map to a triangle mesh and draw them. These shaders live in renderHeightMapVertexShader.txt and renderHeightMapFragmentShader.txt.
It reruns the second pass when you rotate the view. It reruns both passes when you move the slider.
Re: New in-browser CAM: jscut
this is really great. just tried it out. and I really appreciate that you made it open source.
I think between this and easel, there is starting to be some great simple options for web based cam stuff. This is really cool.
I've mentioned this to the easel folks - it would be really need to tie this in with folks' dropbox account. That way they can save their work and come back to it later (in some file format specific to jscut) and also, operations like downloading the gcode could also go straight to their dropbox. If they are running dropbox on the machine that is hooked into their CNC machine - BAM... no file transfers needed - the file will be waiting for them by the time they get in the garage
The other reason I mention it is because it is a way to get the web app into a fully functional app level with web storage without jscut.org needing to provide or pay for it.
great stuff. and thanks again for sharing it with the world. keep us updated with changes!
I think between this and easel, there is starting to be some great simple options for web based cam stuff. This is really cool.
I've mentioned this to the easel folks - it would be really need to tie this in with folks' dropbox account. That way they can save their work and come back to it later (in some file format specific to jscut) and also, operations like downloading the gcode could also go straight to their dropbox. If they are running dropbox on the machine that is hooked into their CNC machine - BAM... no file transfers needed - the file will be waiting for them by the time they get in the garage

The other reason I mention it is because it is a way to get the web app into a fully functional app level with web storage without jscut.org needing to provide or pay for it.
great stuff. and thanks again for sharing it with the world. keep us updated with changes!
-
- Posts: 227
- Joined: Thu Nov 21, 2013 6:44 am
- Location: Flagstaff AZ
Re: New in-browser CAM: jscut
If you have a Google drive, this is very simple. Google drive saves files locally to a folder and then syncs to the cloud. Any computer with Gdrive installed can then access the folder locally or in the cloud.lordmundi wrote:I've mentioned this to the easel folks - it would be really need to tie this in with folks' dropbox account. That way they can save their work and come back to it later (in some file format specific to jscut) and also, operations like downloading the gcode could also go straight to their dropbox. If they are running dropbox on the machine that is hooked into their CNC machine - BAM... no file transfers needed - the file will be waiting for them by the time they get in the garage