LaserWeb / deprecated-LaserWeb3

Open Source Laser Cutter / Engraver software. Supports gcode, svg, dxf, stl, png, jpg, bmp
265 stars 68 forks source link

Gcode doesn't load no error thrown #163

Closed maudette01432 closed 7 years ago

maudette01432 commented 7 years ago

This GCODE is output from Fusion360's LASER/PLASMA/WATERJET CAM. Loads just fine in UGS but wil not load in Laserweb3. No Error output is given to console.

DONT_PANIC.zip

jorgerobles commented 7 years ago

Do you mind if you share the postprocessor? Thanks! Also, please share the project :)

maudette01432 commented 7 years ago

I will post something up on my blog later today. The general gist is I started with the built-in smoothie post and modified it slightly to more closely support the features of my Banggood A3 engraver. (Taking out unsupported commands) There's currently a number of things that I don't like - but GCODE generation seems to work ok and run just fine not he laser w/ (GRBL 0.9g JTECH) - I haven't made the jump to the 1.1c which includes the new spindle code.

ghost commented 7 years ago

The 3D viewer needs the S param in line with the G1's

From LaserWeb

G1 X59.200 S0.01 F1200
G1 X59.000 S0.02 F1200
G1 X58.400 S0.01 F1200

From your file:

G1 X-5.605 Y3.69
G1 X-5.786 Y3.454
G1 X-5.975 Y3.225
G1 X-6.171 Y3.002

The S value tells the viewer how dark to draw the line

ghost commented 7 years ago

(: it will still send it... just wont be able to display it

maudette01432 commented 7 years ago

We can keep this closed...I may open another one. I changed my post to output the S values for every move....still does not load - still does not render...will not send. The file doesn't show up anywhere in the UI and there is no indication that there is anything to send.

ghost commented 7 years ago

Here's a file you can test with:

file (1).zip

  1. Open file from the Open Button
  2. Got to CAM tab, click Generate GCODE (Since we see any opened file as 'just another layer' - the generate gcode button takes your start/stop params, adds it as start and end gcode, adds all the layers in between (of which this opened file is either the only layer, or one of the layers), and finally renders it. it also loads it up into the queue ready to play

opened from file

Tested it just now, and it still works

ghost commented 7 years ago

(: No visual indication: Open the GCODE tab before and after opening the file... Generate gcode renders the preview, but the file is already loaded onto the GCODE tab after opening

ghost commented 7 years ago

Mind you, even your original file does load after clicking Generate GCODE

dont panic

... but... I'm looking for .gcode, not .nc files... I'll add .nc handling in a minute

ghost commented 7 years ago

OK, added .nc as handled extension.

I also automated the clicking of the Generate GCODE button in the name of userfriendlyness

The catch is going to be if you have a couple large rasters loaded, and then open a gcode file, it will then process all the rasters and then the resultant gcode, may thus take a few mins

ghost commented 7 years ago

Scratch that - its cool now

Git pull, test and let me know

ghost commented 7 years ago

(oops accidentally added some tree-cam work onto that first commit :(

ghost commented 7 years ago

Upload the new file?

On Oct 23, 2016 4:19 PM, "maudette01432" notifications@github.com wrote:

We can keep this closed...I may open another one. I changed my post to output the S values for every move....still does not load - still does not render...will not send. The file doesn't show up anywhere in the UI and there is no indication that there is anything to send.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/openhardwarecoza/LaserWeb3/issues/163#issuecomment-255591266, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVr2y_ZXNbzeYxhbPc9EBEKilkZq3dtks5q220HgaJpZM4KbUNO .

maudette01432 commented 7 years ago

Peter. Per gcode spec The s value once set doesn't change until it is overridden. The viewer should render the line with the last s value used until the s value changes.

On Sunday, October 23, 2016, Peter van der Walt notifications@github.com wrote:

Closed #163 https://github.com/openhardwarecoza/LaserWeb3/issues/163.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/openhardwarecoza/LaserWeb3/issues/163#event-832994277, or mute the thread https://github.com/notifications/unsubscribe-auth/ACCXT3DtNpMHX8xh4ipOSvz_g7Xvh8GZks5q2wr-gaJpZM4KbUNO .

ghost commented 7 years ago

Pull requests to fix that would be welcome:

Look at around: If a line does not have an S - we currently default it to 0.3 (30%) https://github.com/openhardwarecoza/LaserWeb3/blob/master/public/lib/gcode-viewer/gcode-parser.js#L299

There is some leftovers from the Joe Nwales code here https://github.com/openhardwarecoza/LaserWeb3/blob/master/public/lib/gcode-viewer/gcode-parser.js#L944 where f is defined as lastline's F if its not specified. You'll need to dig in and do the same, store S as lastline.S and if its not defined, used lastline.S

ghost commented 7 years ago

Mind you there is some lastline.s already. If its populated, I dont know https://github.com/openhardwarecoza/LaserWeb3/blob/master/public/lib/gcode-viewer/gcode-parser.js#L967

ghost commented 7 years ago

(: pull request accepted...

On Tue, Oct 25, 2016 at 8:29 PM, maudette01432 notifications@github.com wrote:

Peter. Per gcode spec The s value once set doesn't change until it is overridden. The viewer should render the line with the last s value used until the s value changes.

On Sunday, October 23, 2016, Peter van der Walt notifications@github.com wrote:

Closed #163 https://github.com/openhardwarecoza/LaserWeb3/issues/163.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/openhardwarecoza/LaserWeb3/ issues/163#event-832994277, or mute the thread https://github.com/notifications/unsubscribe- auth/ACCXT3DtNpMHX8xh4ipOSvz_g7Xvh8GZks5q2wr-gaJpZM4KbUNO .

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/openhardwarecoza/LaserWeb3/issues/163#issuecomment-256128272, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVr29raFbrJbp47QxVuOnrDoM4iS462ks5q3kqPgaJpZM4KbUNO .