Coder Social home page Coder Social logo

lasaurapp's Introduction

LasaurApp

LasaurApp is the official Lasersaur app. It has all the functionality to operate this kind of laser cutter:

  • load vector files and send them to the Lasersaur
  • file support for SVG, G-code (subset), DXF (subset)
  • GUI widget to move the laser head
  • pausing/continuing a job
  • firmware flashing
  • handy G-code programs for the optics calibration process

This app is written mostly in cross-platform, cross-browser Javascript and Python. This allows for very flexible setup. The backend can either run directly on the Lasersaur (Driveboard) or on the client computer. The frontend runs in a web browser either on the same client computer or on a tablet computer.

When running on the Driveboard people can start using the 'saur' directly from their laptop without having to setup any software or drivers. This is done this way because we imagine laser cutters being shared in shops. We see people controlling laser cutters from their laptops and not wanting to go through annoying setup processes. Besides this, html-based GUIs are just awesome :)

DISCLAIMER: Please be aware that operating a self-built laser cutter can be dangerous and requires full awareness of the risks involved. NORTD Labs does not warrant for any contents of the manual and does not assume any risks whatsoever with regard to the contents of this manual or the machine assembled by you. NORTD Labs further does not warrant for and does not assume any risks whatsoever with regard to any parts of the machine contained in this manual which are provided by third parties. You need to have the necessary experience in handling high-voltage electrical devices and class 4 laser beams to build the machine described in this manual. Otherwise you should seek professional advice for building the machine.

How to Use this App

  • make sure you have Python 2.7
  • run python backend/app.py
  • The GUI will open in a browser at http://localhost:4444 (supported are Firefox, Chrome, and likely future Safari 6+ or IE 10+)

For more information see the Lasersaur Software Setup Guide.

Notes on Creating Standalone Apps

With PyInstaller it's possible to convert a python app to a standalone, single file executable. This allows us to make the setup process much easier and remove all the the prerequisites on the target machine (including python).

From a shell/Terminal do the following:

  • go to LasaurApp/other directory
  • run 'python pyinstaller/pyinstaller.py --onefile app.spec'
  • the executable will be other/dist/lasaurapp (or dist/lasaurapp.exe on Windows)

Most of the setup for making this happen is in the app.spec file. Here all the accessory data and frontend files are listed for inclusion in the executable. In the actual code the data root directory can be found in 'sys._MEIPASS'.

Notes on Testing on a Virtual Windows System

When running VirtualBox on OSX it has troubles accessing the USB port even when all the VirtualBox settings are correct. This is because OSX captures the device. To make it available in VirtualBox one has to unload it in OSX first. The following works for Arduino Unos:

  • sudo kextunload -b com.apple.driver.AppleUSBCDC

After the VirtualBox session this can be undone with:

  • sudo kextload -b com.apple.driver.AppleUSBCDC

For other USB devices thee following may be useful too:

  • sudo kextunload -b com.apple.driver.AppleUSBCDCWCM
  • sudo kextunload -b com.apple.driver.AppleUSBCDCACMData
  • sudo kextunload -b com.apple.driver.AppleUSBCDCACMControl

lasaurapp's People

Contributors

martinxyz avatar stefanix 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

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

lasaurapp's Issues

serial connect button funky

The serial connect button sometimes doesn't correctly report on the status of the connection. Sometimes pressing it reports back with "connection failed" even though the connection was made.

Bug: literal colors in svg reader

As steve posted to the mailing list:

It looks like I found a bug in the lasaurapp's SVG reader. It doesn't
understand named colors.

If I have an SVG file containing:

<path style="stroke:red; .....

...then I get grey lines in lasaurapp - but red in Inkscape, CorelDraw,
Chrome, Firefox, etc. The SVG specification says this is OK - and even
uses named colors in some of it's examples, so it's definitely good SVG.

If I change the file to have:

<path style="stroke:#ff0000; .....

...then it works just fine! A quick fix for anyone who has this problem
is to load the file into Inkscape, then write it back out again.

minor issue: Platypus artefact in osx app bundle

I see this in the LaserApp window immediately after I launch, is it bad?

2012-05-27 18:36:34.218 osascript[60068:607] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find:
/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper
osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers.
localhost - - [27/May/2012 18:36:35] "GET /serial/2 HTTP/1.1" 200 0
localhost - - [27/May/2012 18:36:58] "GET /serial/1 HTTP/1.1" 200 50

feature: pause button

simply pause streaming of gcode
possibly also make changes to the g-code generator to break up long straight lines. This will increase the response time due.

feature: color to cutting properties widget

When importing an svg one should be able to map all the line colors to cutting properties. It should also be possible to assign multiple colors to the same properties. Furthermore, it should be possible to define the order (which color preceeds an other one).

feature: login (for access restrictions, single user assurance)

  • provide a simple login (optionally with user quotas)
  • one active login at a time, prevent two people from using the lasersaur at the same time
  • keep login alive pulse so that lasersaur becomes available if somebody forgets to logout
  • restrict access to admin tasks like flashing firmware

feature: deal with high vertex count curves by simplfing

ran into a file at CMU created by a drawing app called SIMI. The file produced tesselated curves with very small segments. Currently LasaurApp does not optimize such geomety. When sent to LasaurGrbl the arduino was being bogged down at anything over 1m/min.

feature: remove connect button, add status indicator

There is no good reason to have a connect button. In most cases one wants to be connected anyways and this is what LasaurApp should try implicitly. For the rare cases when one wants to be disconnected closing LasaurApp will be more appropriate.

There should still be some indicator to show connection status. This can probably be combined with other status indicators (chiller off, door open, limit hit, ready)

Library Jobs not loading...

In OS X 10.9 using latest firefox or chrome browser when you open the drop down menu (library jobs), and try to select a job, nothing happens. More specifically the drop down menu doesn't even close, and no jobs are loaded.

In LasaurApp 12.xx this was working in both browsers on os x 10.9

Homing help !

I'm trayning to use the LASAURGRBL_VERSION "14.11" on my DIY laser.
The mechanical characteristics are slightly different than the Lasersaur but nothing important.
The electronic is based on the same PINs than DRIVEBOARD's pins.

Here's a little overview of what I get :
If I leave commented the #define DEBUG_IGNORE_SENSORS, nothing move.
If I uncomment it :
I can move X end Y axis with the jog

  • Left switch do a X left move.
  • Right switch do a X Right move.
  • Top and bottom switch are OK!

If I try to do the homing cycle, all axis are going in wrong way ;-(

  • My homing position is top/left

Rulers on Previews to check import size was correct

I often find that when I import a SVG of unknown (or not recently used) origin that I have to make a test cut to validate whether it was a 72/90/96dpi.

Was thinking a simple 10mm grid over and ruler on X/Y edges on the preview would be quite helpful. Could also help with positioning of scrap materials for smaller cuts?

Peter

Scaling is incorrect, from newer versions of Inkscape. Selects 25.4DPI instead of 90DPI

Here's some testing and results, based on behavior seen by @lukeiamyourfather, @hasbridge and myself, @Nick_McCarthy at the Dallas Makerspace

When using recent versions of Inkscape or other vector drawing apps, upon importing to the Lasersaur, the file is scaled much larger.

You can see in the example below that my shape is off the bed, and the lasersaur shows it's using 25.4DPI for converting unit pixels

When making the same identical document in the old version of Inkscape on the computer next to the lasersaur, the file imports properly, showing 90DPI

So, the difference?

In the new version (I have .91), we see this in the SVG

width="1220mm"
height="610mm"
viewBox="0 0  4322.8345 2161.4173"

In the older version (v.48), this is in the SVG:

width="4322.8345"
height="2161.4172"

So, the fix:
Modify the SVG from the newer version of inkscape, and move "4322.8345 2161.4173" from viewbox into width and height, the file will print just fine.

  • Option 1: Open the SVG in a text editor and do this manually
  • Option 2: Write a script automates this process
  • Option 3: Get this fix merged into the Lasersaur code.

reloading web interface during a job kills it

This lead to a rx buffer overflow on the controller. The reason is that LasaurApp gets delayed checking for any XOFF flow control signal and in the meantime sends too much data. Probably will have to put the serial rx routine of LasaurApp in its own thread.

minor: moving to 0,0 after setting 0,0 cause a slight movement

Cheewee says: "One thing i noticed is when you click on the cutting area to set 0,0, when you then push 0,0 to go to the origin, the gantry moves a little. I suspect it's because of floats vs ints, but I couldn't figure out where the difference was in the code."

feature: #tags in svg for F, S, and pass# presets

When parsing the SVG files search any text for certain tags (e.g: #intensity:100; #feedrate:2500;) and use these values as presets. This allows for cut settings that worked previously to be stored with the file.

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.