LASERWEB3 is available! See https://github.com/openhardwarecoza/LaserWeb3 for details!
laserweb / deprecated-laserweb1 Goto Github PK
View Code? Open in Web Editor NEWDeprecated: use http://github.com/openhardwarecoza/LaserWeb3 instead
Deprecated: use http://github.com/openhardwarecoza/LaserWeb3 instead
LASERWEB3 is available! See https://github.com/openhardwarecoza/LaserWeb3 for details!
To switch the laser diode on,
this.gcode += 'M03'+'\n';
To switch the laser diode off,
this.gcode += 'M05'+'\n';
To end the program,
this.gcode += 'M02\n';
That's working for me. ;)
It's there such a thing as popular presets setting for material? I'm thinking that you could enable in some way for the user to save some personal presets
Ariel Yahni
10:07 PM
That way let's say I commonly engrave only the perimeter of balsa wood so I would create a preset for that
Peter van der Walt
11:40 PM
I was speaking to +Eric Lien earlier, he wants so custom buttons too. Things like this (presets, buttons) is something more suited to 'per user' - since your presets wont match the 40w guys' presets, wont match the #freeburn2 presets.
So theres two things to add to Laserweb:
Secondly, I need to add the code from #7 to the backend. With that in place, we can start developing things like saving presets, saving custom buttons, etc
PS: For suggestions, do post it on https://github.com/openhardwarecoza/LaserWeb/issues/new and tag as Enhancement - here in G+ great ideas can get lost in comments you can never find again!
It does not seem to matter what type of file you open, if you get a pop up window, the scroll bar on the right will follow the pop up window. That means that it might hide out of sight until you move your pop up window to the left some. The scroll bar will keep a consistent distance from the pop up window.
Hi at all. After many tests I was able to perform laserweb of RaspberryPi (raspberryPi 2 with jessie OS).
Apparently there are version incompatibility with serialport and node. I'm not a programmer and expert linux but I managed to do it all work.
Following the instructions for ubuntu version, when I arrived in "cd LaserWeb" I followed the next steps.
-Run everything below as root (su)
-Install build tools (apt-get install python g++ make)
-Install node.js for Raspberry Pi with this script: https://github.com/midnightcodr/rpi_node_install
-npm install [email protected]
-npm install socket.io node-static
Finally launch the service with
-node serever.js
I do not know if it is the most correct procedure but it works
I am opening an issue on my own project - since it allows me a bit of a work log functionality.
Building raster is a bit unlike any of the other things I have done with laserweb, because there is very little to build from:
With the core serialport/nodejs code in Laserweb, I based off the work from GrblWeb
With the UI work, I have been using bootstrap for years
With 3D GCode viewer and three.js - I based my work off the work by http://joewalnes.com/
For the parametric apps, opejscad.org has been a great help as have been the scripts from their relevant original authors (as mentioned in each's header).
Sure it was still LOT of work adapting their various code to my project. Sometimes I think adapting is more work than rewriting. In fact thats what LaserWeb owes its existence too - I got tired of adapting other hosts - so I decided to write my own...
So, lets begin with Raster!
This morning I woke up and checked Google Plus, to find one of my followers who posted a quick video running some raster gcode he found online, via LaserWeb:
See post here: https://plus.google.com/+ArielYahni/posts/3GMYsfp2AVN
That was all the inspiration I needed to decide, I am going out of 2015 with working Raster support!
So, a few weeks now I have been doing the prep work, and found something called PaperScript. Paperscript is an extension of Javascript, with Paper.js:
Paper.js has a Rasterise function that scans a bitmap and puts each pixel into an array.
Probably took me an hour to get the basics working:
Here all we do is scan in the image using paper.js's raster and then use that data to draw on a HTML5 canvas, a series of SVG paths (circles), in the same coordinates where it found a dot in the bitmap. Then we simply scale the size of the dot according to the percentage of Gray in that dot (between 0 and 1 where 1 = 100% = black)
Thats of course a perfect aproximation of what a laser would do if we were to set the output PWM according to the Gray level of that pixel. Or in other words, proper grayscale raster engraving - long the holy grail of rastering. The higher the laser power on that dot, the darker/larger that dot will appear. So in theory the simulation I have done so far then should be quantitively similar to real world results
Next came adding GCODE generation. Damn that was just too easy! For each line I do a G0 Yx move, and then we raster along the X axis in G1 Xxx Yxx Sxx commands. Where Sxx can be a value based on the gray % of that dot.
This brought me to:
Thats pretty close to a working implementation then!
So what's missing:
posx = x /10
posy = y/10
should be doing
posx = x /scaleFactor
posy = y/scaleFactor
Then finally integrating back into Laserweb's UI.
Once in the UI we can just diable the 3D viewer and display the rastered canvas instead (raster gcode on a 3D Gcode viewer will only show a solid black square since its all G1 moves anyway)
Hi @openhardwarecoza ,
I am trying to build a RPI image with LaserWeb as part of the installed packages but I am having issues installing it. I currently have Node 0.12.6 installed...
dotenv does not seem to want to install on my version of node. Do you have a recommended version?
@quillford requested smoothie support in https://plus.google.com/u/0/+PetervanderWalt/posts/H331WFvtDLK
The center area of the web page is supposed to display the tool path. Mine seems to be all screwed up I have attached a screen shot for you. I am using:
Latest version of Laserweb
Marlin driver ( controller is Ramps 4.1/Arduino Mega 2560 with Full graphic RepRap LCD module)
Quad core i7 PC
The laser works great using Inkscape/Turnkey plugin. When using LaserWeb I get the above issue.
On initial screen load help button appears correctly. After clicking help the first time, it greys out until you mouse over it. Then if you click any other button, it fixes the help button.
Im getting the following error when the board is disconnected from the computer.
events.js:85
throw er; // Unhandled 'error' event
^
Error: Serialport not open.
at SerialPortFactory.SerialPort.write (/Users/ayahni/LaserWeb/node_modules/serialport/serialport.js:288:17)
at null. (/Users/ayahni/LaserWeb/server.js:261:20)
at wrapper as _onTimeout
at Timer.listOnTimeout (timers.js:119:15)
The server does not load and starting the server again fixes it.
Merge in Millcrum so we can get svg ->cut and dxf-> cut
Hi,
I installed the software, but i coudn't genrate gcodes for .dxf files. I am attaching the dxf file generated gcode.
I tried to install in anotherpc but getting the same result.
This is the gcode that I'm getting
; TOOL OPTIONS
; units: mm
; diameter: 0.1
; passDepth: 3
; step: 1
; rapid: 3000
; plunge: 10000
; cut: undefined
; zClearance: 0
; returnHome: true
; SETTING UNITS TO mm
G21
; SETTING ABSOLUTE POSITIONING
G90
M02
; RETURNING TO 0,0,0 BECAUSE this.tool.returnHome IS SET
G0 F3000 X0 Y0 Z0
I'm using Windows 7 64bit and GRBL
Also I can't control the power,can't scale or move.
Am I the only one having this problem?
(https://github.com/openhardwarecoza/LaserWeb/files/95519/Material.Thickness.docx)
This is what I get when I try to load node server:
Microsoft Windows Version 10.0.10586 2015 Microsoft Corporation. All rights reserved.
C:\Users\Anthony>cd\
C:>cd laserweb
C:\LaserWeb>node server
module.js:338
throw err;
^
Error: Cannot find module 'dotenv'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (C:\LaserWeb\config.js:1:63)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
C:\LaserWeb>
I tried to install on my current system and node was seriously messed up so to eliminate my system errors I tried Vagrant. This is a clean testing environment:
$ vagrant init
$ vagrant box add ubuntu/trusty64
Edit Vagrantfile:
config.vm.box = "hashicorp/precise32"
config.vm.network "public_network"
$ vagrant up
$ vagrant ssh
$ sudo apt-get install nodejs nodejs-legacy npm build-essential git
$ git clone https://github.com/openhardwarecoza/LaserWeb.git
$ cd LaserWeb
$ npm install
$ nodejs server.js
Procedure courtery of @quillford : #10
Next install the npm modules by entering the following npm install serialport socket.io node-static dotenv
grbl supports variable spindle speeds.
I pwm my laser output with the spindle speed.
This is use full for engraving different materials.
Grbl is not optimized for changing spindle speeds while moving. Because in a mill type CNC operation you wouldn't change spindle speed while moving. But still a use full feature.
I am runnig LaseWeb on Ubuntu linux, smoothieboard connected over usb,
I installed like per Readme.md and after installing all modulest and starting LaserWeb, it results in:
kz@klemenHp:/mnt/Extra10Gb/git/LaserWeb$ nodejs server.js
Got error: connect ECONNREFUSED not enabling webcam
connected to /dev/ttyS0 at 115200
connected to /dev/ttyS1 at 115200
connected to /dev/ttyS10 at 115200
connected to /dev/ttyS11 at 115200
connected to /dev/ttyS12 at 115200
connected to /dev/ttyS13 at 115200
connected to /dev/ttyS14 at 115200
connected to /dev/ttyS15 at 115200
connected to /dev/ttyS16 at 115200
connected to /dev/ttyS17 at 115200
connected to /dev/ttyS18 at 115200
connected to /dev/ttyS19 at 115200
connected to /dev/ttyS2 at 115200
connected to /dev/ttyS20 at 115200
connected to /dev/ttyS21 at 115200
connected to /dev/ttyS22 at 115200
connected to /dev/ttyS23 at 115200
connected to /dev/ttyS24 at 115200
connected to /dev/ttyS27 at 115200
connected to /dev/ttyS28 at 115200
connected to /dev/ttyS29 at 115200
connected to /dev/ttyS3 at 115200
connected to /dev/ttyS30 at 115200
connected to /dev/ttyS31 at 115200
connected to /dev/ttyS4 at 115200
connected to /dev/ttyS5 at 115200
connected to /dev/ttyS6 at 115200
connected to /dev/ttyS7 at 115200
connected to /dev/ttyS8 at 115200
connected to /dev/ttyS9 at 115200
connected to /dev/ttyUSB0 at 115200
connected to /dev/ttyS25 at 115200
connected to /dev/ttyS26 at 115200
connected to /dev/ttyACM0 at 115200
events.js:72
throw er; // Unhandled 'error' event
here is pastebin of whole procedure:
http://pastebin.com/Ui1yjtSv
When using the send code option it double sends whatever is entered ie:
G90 sends:
G90
G90
I go and select a DFX file but immediately press the x in the right corner to cancel and be able to select another file. Once i select the other file it will not show the dialog anymore. I need to refresh the page to start over.
I used jtech inkscape plugin to generate the code. Its does not show correctly on the screen and the output in the laser also seems weird. Unable to determine it its correct
met_0003.gcode.txt
Here is a step by step install for windows users:
Prerequisites:
1.Download and install Node.js version node-v0.12.7 from https://nodejs.org/download/release/v0.12.7/
2. Install Google Chrome if not already installed
LaserWeb install instructions:
The software is now installed.
To start the software:
You should now see the software in the Chrome browser window.
First off, great project!
I'm unable to start LaserWeb without a machine connected with the following error. Seems to be looking for any device and throws if no device can be found. Would be nice to catch this exception and let the user know somehow
> reprapweb@ start /Users/dana/code/LaserWeb
> node server.js
Got error: connect ECONNREFUSED not enabling webcam
connected to /dev/cu.Bluetooth-Incoming-Port at 115200
events.js:85
throw er; // Unhandled 'error' event
^
Error: Cannot open /dev/cu.JabraREVOa400-SPPDev
at Error (native)
npm ERR! Darwin 15.0.0
npm ERR! argv "/Users/dana/.nvm/versions/node/v0.12.7/bin/node" "/Users/dana/.nvm/versions/node/v0.12.7/bin/npm" "start"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! reprapweb@ start: `node server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the reprapweb@ start script 'node server.js'.
npm ERR! This is most likely a problem with the reprapweb package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node server.js
npm ERR! You can get their info via:
npm ERR! npm owner ls reprapweb
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/dana/code/LaserWeb/npm-debug.log
Any time I try to bring a gcode file into laserweb, the chrome browser page crashes. Does not happen with dfx or svg files, however laserweb does not output anything that resembles the original dfx file.
Can't get it to run.
Gives me this error
{ [Error: ENOENT, no such file or directory '.env'] errno: -2, code: 'ENOENT', path: '.env', syscall: 'open' }
Error connecting to webcam: connect ECONNREFUSED - Disabling Webcam Widget
/home/pi/LaserWeb/server.js:89
ports.push({comName:'/dev/ttyAMA0',manufacturer: Broadcom,pnpId: 'raspberr
^
ReferenceError: Broadcom is not defined
at /home/pi/LaserWeb/server.js:89:54
at /home/pi/LaserWeb/node_modules/serialport/node_modules/async/lib/async.js:254:17
at done (/home/pi/LaserWeb/node_modules/serialport/node_modules/async/lib/async.js:135:19)
at /home/pi/LaserWeb/node_modules/serialport/node_modules/async/lib/async.js:32:16
at /home/pi/LaserWeb/node_modules/serialport/node_modules/async/lib/async.js:251:21
at udev_parser (/home/pi/LaserWeb/node_modules/serialport/serialport.js:512:7)
at /home/pi/LaserWeb/node_modules/serialport/serialport.js:554:13
at ChildProcess.exithandler (child_process.js:742:7)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
Need to add m3/m5 in LaserWeb's smoothie code too for users with two pin config (pwm into IN via capacitor + TH/TL on a smootie switch pin)
Thanks to TurnkeyTyranny/laser-gcode-exporter-inkscape-plugin#8 for bringing to my attention
I can move the preview in X but not in Y
See video https://plus.google.com/+ArielYahni/posts/Rz5ezxhRvYN
After the SVG button was added, the RASTER and the GCODE buttons got cramped and not all of the letters are visible.
I see both gcode the same, the only diference i see is the power setting from decimel for smoothie to round number for ramps.
turnkeyramps.gcode.txt
turnkeysmoothie.gcode.txt
The following buttons clickable area is limited. Only bottom 30% portion is clickable. Its not clickable even on the text on that button. Not big issue but not everybody tries to click on every corner of the button to see if its working or not.
Affected buttons are:
GCODE , DXF, SVG, REST 3D VIEW, MIRROR, FIX00, DRAW BOUNDING BOX,
Looks line all those buttons are in same line are affected by something!
Now that I have started working on the Wiki for LaserWeb, it would be nice to have a button that opens the Wiki in a new browser tab/window.
Screen shots are out of date. Will update all screen shots once a week to try and keep them somewhat current.
My #1 complaint with my current laser is aligning things is a PITA. I currently put alignment marks on multi cut pieces and need to pin and pivot the piece to keep everything aligned. It would be super helpful if I could jog the machine to (point1) and select that location on the drawing then jog to (point2) and select that in the drawing and the software would rotate the whole drawing to match.
Another feature would be to have a webcam facing towards the workpiece on the X/Y carriage and capture a video scanning the entire printable area. Then stitching it together and showing it as the background. This could then be used for the feature above but would not require any feedback for position info.
I'm getting an error because LaserWeb tries to initially connect to the bluetooth serial port on os x. This is when I don't have the laser plugged in.
MacBook-Pro:LaserWeb quillford$ node server.js
Got error: connect ECONNREFUSED not enabling webcam
events.js:85
throw er; // Unhandled 'error' event
^
Error: Cannot open /dev/cu.Bluetooth-Modem
at Error (native)
Open to options here.
SerialPort + windows users suffer, are forced to use older versions of node or compile SerialPort native module from source.
No, we cant say we dont support windows (lasercutter people are graphics people so i expect mac+win to be the majority
Win no 1 would be a precompiled executable doing everything server.js does. Cross platform, too
Or lets explore chrome app / serial api etc
Instructions state:
Status: Upload a file, or paste GCode / Millcrum, into the relevant Orange Box
but only gcode is available as a paste option
Arcs and trimmed circles in polylines come out with incorrect radii or are skipped entirely when opening .dxfs. The .dxfs are generated in the latest version of DraftSight on windows 10.
When a send a command like G0 X300 F5000, it send it twice. you can see it in the log window
The LaseWeb software appears to hang when trying to connect to Laser Cutter/Engraver serial port. It jus sits there, have waited as long as 1/2 to connect but no success.
Not sure if it affects the process itself but i get this when prepare for laser is pressed
Min Dimensions
X: 0 Y: 0 Z: 0
Max Dimensions
X: 0 Y: 0 Z: 0
Total Dimensions
X: 0 Y: 0 Z: 0
Opening OpenJSCAD
Min Dimensions
X: 100000 Y: 100000 Z: 100000
Max Dimensions
X: -100000 Y: -100000 Z: -100000
Total Dimensions
X: -200000 Y: -200000 Z: -200000
Incoming file Converted to GCode...
Gear Generator Complete...
Parsing DXF:...
DXF Errors!:
Invalid Entity: eof
NB! There were errors while parsing the DXF. Usually this is normal, unsupported elements are not processed. Check render before cutting...
Min Dimensions
X: 0 Y: 0 Z: -3
Max Dimensions
X: 101.1161137261586 Y: 81.14400767290104 Z: 0
Total Dimensions
X: 101.1161137261586 Y: 81.14400767290104 Z: 3
Incoming file Converted to GCode...
DXF File Upload Complete...
Parsing DXF:...
DXF Errors!:
Invalid Entity: eof
NB! There were errors while parsing the DXF. Usually this is normal, unsupported elements are not processed. Check render before cutting...
Min Dimensions
X: 0 Y: 0 Z: -3
Max Dimensions
X: 101.1161137261586 Y: 81.14400767290104 Z: 0
Total Dimensions
X: 101.1161137261586 Y: 81.14400767290104 Z: 3
Incoming file Converted to GCode...
DXF File Upload Complete...
The entry boxes for scale and rotate do not display any values typed into them. Bounding B0x button appears to do nothing. Move entry boxes only display one digit (45 will display as 5). Move on the X axis appears to move 10X the entered value i.e. enter 20 and it moves 200.
Every attempt to include an image to raster and convert to gcode Chrome ends up timing out and I have to kill the process. Am I just not waiting long enough?
As i load and SVG a frame is made around the drawing. it seems as if laserweb is reading the page itself from inkscape.
test copy.svg.txt
The slider + gray boundary box doesnt work so well with SVGs due to it taking the page and holding div instead of image dimensions. Going to remove the slider, stick to DPI input + scale button (in percentage)
dpi * scale * px values = actual size
Also, that should help us fix the start gcode that adss G0 moves way outside the SVGs final dimensions
I edited the config.js file in my local copy to reflect the bed size of the K40 (I can get 320X220mm on my machine). When I restart LaserWeb it still displays the 600X400 size for the render window in the center of the page.
Remember when you got an Inkjet printer in the 90s, and it had you always go to do a calibration:
and have you print something like this
Whereafter you tell the driver which looked best?
I am going to add the same thing to Laserweb:
A little test engrave and test cut job that you can run, pick the best,. enter it in the UI, and it will save your presets. I will have you be able to run it against multiple materials and save each too?
Like?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.