gcode-simulator icon indicating copy to clipboard operation
gcode-simulator copied to clipboard

Possibly MacOSX related Google Chrome URL on Windows 7

Open LantosIstvan opened this issue 10 years ago • 1 comments

When i try to run gcode-simulator with the following command:

$ curl http://www.clker.com/cliparts/O/H/c/W/A/o/plane.svg | svgmill -i -z 110 --scale=1 | gcode-simulator -i

I've got the following error:

C:\www\gcode-simulator> curl http://www.clker.com/cliparts/O/H/c/W/A/o/plane.svg | svgmill -i -z 110 --scale=1 | gcode-simulator -i
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: spawn /Volumes/Data/Applications/Google Chrome.app/Contents/MacOS/Google Chrome ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
    at child_process.js:1144:20
    at process._tickCallback (node.js:355:11)
    at Function.Module.runMain (module.js:503:11)
    at startup (node.js:129:16)
    at node.js:814:3
100  2323  100  2323    0     0   1136      0  0:00:02  0:00:02 --:--:--  1136
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: write EPIPE
    at exports._errnoException (util.js:746:11)
    at Socket._writeGeneric (net.js:690:26)
    at Socket._write (net.js:709:8)
    at doWrite (_stream_writable.js:301:12)
    at writeOrBuffer (_stream_writable.js:288:5)
    at Socket.Writable.write (_stream_writable.js:217:11)
    at Socket.write (net.js:634:40)
    at Console.log (console.js:55:16)
    at Socket.<anonymous> (C:\Users\Lanti\AppData\Roaming\npm\node_modules\svgmill\bin\run.js:124:13)
    at Socket.emit (events.js:129:20)

In gcode-simulator.js I changed the following line: runtime: "/Volumes/Data/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome", To this one: runtime: "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe",

Now the Chrome window with the name of "WebGL Gcode simulator" will start, but I only got an FPS counter and white window.

And now my command line hangs in this state:

C:\www\gcode-simulator> curl http://www.clker.com/cliparts/O/H/c/W/A/o/plane.svg | svgmill -i -z 110 --scale=1 | gcode-simulator -i
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2323  100  2323    0     0   2918      0 --:--:-- --:--:-- --:--:--  2978

After I close the chrome window the cmd will give back the cursor, so I think it's a feature, but my window is still blank white in chrome.

Can be a windows and cURL compatibility issue (cURL is installed and working). If I just type "gcode-simulator", starts without problem. I copy in the svg from the original example, generating the GCODE, but the right side graphical window is still blank grey. This is same using the website also: http://tmpvar.com/project/gcode-simulator/

Update: Okay, so the -i flag causing the simulator to hide everything and only showing a white window. Possibly this is a full screen milling area. Removing the -i flag making the window showing everything like on the website, but the svg and gcode windows are empty. CTRL+C in command line causing downloading the svg and closing the chrome window same time.

Maybe the | "pipe" command doesn't work in windows command line?

LantosIstvan avatar May 27 '15 18:05 LantosIstvan

For anyone who stumbles into that - pipe works fine, it was the curl implementation issue.

This works, but requires Windows Subsystem Linux:

wsl curl --silent http://www.clker.com/cliparts/O/H/c/W/A/o/plane.svg | svgmill -i -z 110 --scale=1 | gcode-simulator -i

rogalmic avatar Jan 05 '19 19:01 rogalmic