Giter VIP home page Giter VIP logo

deprecated-laserweb1's Introduction

deprecated-laserweb1's People

Contributors

danawoodman avatar funinthefalls avatar iceblu3710 avatar jcoffland avatar mostley avatar nathanielstenzel avatar oxydum avatar protoneer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deprecated-laserweb1's Issues

DFX Error loading gears

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...

Help button

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.

Improve serial bridge

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

Raster rendering

Raster worked fine until I tried to load a jpeg file. The page crashed and now all files that I load open like the attached image.

screenshot 2016-01-18 22 39 58

Raster processing times out.

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?

Won't start on OS X

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)

Unable to start - throw er; // Unhandled 'error' event

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

Formatting on mobile

The page works wonderfully on mobile. The gcode preview works with dragging and pinch to zoom. However, the formatting isn't quite there.
image

rpi install does not work

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)

command get doubled

When a send a command like G0 X300 F5000, it send it twice. you can see it in the log window

DXF/SVG Importer Improvements

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. ;)

Updated install instructions for Windows users

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:

  1. Download the ZIP file from https://www.github.com/openhardwarecoza/laserweb
  2. Unzip the file to c:\laserweb
  3. Start a windows command prompt by typing cmd in the search box a t the bottom of the windows desktop screen
  4. At the command prompt type "cd\laserweb" (do not type the quotes)
  5. At the command prompt type "npm install" (do not type the quotes)

The software is now installed.

To start the software:

  1. Start a windows command prompt by typing "cmd" in the search box a t the bottom of the windows desktop screen (do not type the quotes)
  2. In the command prompt window type "cd\laserweb" at the command prompt (do not type the quotes)
  3. In the command prompt window type "node server" at the command prompt (do not type the quotes)
  4. Start the google Chrome web browser (software is only tested to work with Chrome)
  5. At the top of the Chrome window type "localhost:8000" in the web address bar (do not type the quotes)

You should now see the software in the Chrome browser window.

Webcam / Red Dot (Fiducial) Layout Rotation

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.

Calibration Widget

Remember when you got an Inkjet printer in the 90s, and it had you always go to do a calibration:

14739

and have you print something like this

line

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?

Add Help button

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.

Adding Raster Support

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:

first raster

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:

raster

Thats pretty close to a working implementation then!

So what's missing:

  1. I need to add some form control to the UI to allow you to select things like feedrate, laser min/max range (for engraving you dont want 0-100% - a black dot may only need 20% power and a 50% gray dot needs 10% power, for example) - so simple math to map 0-1 in gray values - to x%-y% in gcode.
  2. Have to resize the canvas on loading the image (canvas has to be same size as image * gridSize
  3. Add some calculation of real world engraving size. Also make that scaling (gridSize) configurable
    Instead of

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)

Weird raster render result

Using standard procedure im getting the following result in the raster render and calibration. This is under the latest commit. Not connected to any board
screen shot 2016-01-19 at 7 48 46 am
screen shot 2016-01-19 at 7 54 31 am

Application crashes if no device connected

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

Paste file in orange box

Instructions state:
Status: Upload a file, or paste GCode / Millcrum, into the relevant Orange Box

but only gcode is available as a paste option

Error disconnecting board

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.

Using M03 S#### for pwm the laser

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.

Issue opening DFX and then canceling to open another

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.

Scale, Rotate, Move, Bounding Box errors

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.

Config.js file changes

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.

dxf gcode generation

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?

2

(https://github.com/openhardwarecoza/LaserWeb/files/95519/Material.Thickness.docx)
untitled

Chrome crashes while loading gcode files

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.

Raspberry Pi - What version of NodeJS?

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?

Resolved - LaserWeb on RaspberryPi

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

Random garbage / Incorrect render on SVG files

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.
laseweb_screen

The scroll bar on the right follows popup windows.

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.

New error when trying to start node

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>

Chrome page unresponsive

Im getting this almost 5 - 7 times before the final render will appear. The process is the standard one. Choose raster, change setting and press "prepare raster"
screen shot 2016-01-19 at 7 52 44 am

Im on OSX 10.11.3 with chrome Version 47.0.2526.111 (64-bit)

Vagrant 'ubuntu/trusty64' Procedure

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

dotenv needs to be added to the npm install on the readme

Procedure courtery of @quillford : #10

Next install the npm modules by entering the following npm install serialport socket.io node-static dotenv

Custom Presets and Buttons

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:

  1. A Calibration Widget - ever bought an Inkjet printer and printed that test page where you tell the driver the 5th one from the left looked the best? Same thing - a widget that engraves rows with 10 blocks at varying power, and you select, the one that matches whats onscreen the best. Then it saves that to your own private Presets file. You can rerun it for different materials too. That would really take the guesswork out of laser power!

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!

SVG start Gcode

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

Some buttons's clickable area is limited

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.