widget-3dviewer icon indicating copy to clipboard operation
widget-3dviewer copied to clipboard

simple 2d gcode visualize

Open mkeyno opened this issue 7 years ago • 4 comments

hi , sorry to open ticket for my question , actually I made my low weight web interface on ESP8266 which is use the JavaScript readerFile to load the gcode file on client side , I use the GRBL as cnc interpreter and connected to my ESP and its work well, however I intend to add visualize tab page so I could show gcode tool path but I couldn't find single file JS code (no Jquery) , I really appreciated if I have any hint on how to use essential this repo code for simple 2d visualize purpose favicxzccon

mkeyno avatar Mar 11 '17 10:03 mkeyno

It seems like you're kind of just recreating ChiliPeppr. Why not consider instead just creating an alternate workspace in ChiliPeppr (watch the 3 videos on the home page) and then have your alternate workspace get rid of the Serial Port widget and replace it with a new widget you write that let's you just connect to your ESP8266 by letting the user enter the IP address of the ESP device? Just make sure you support the /ws/send pubsub call in your widget because that's how all widgets communicate to the serial port widget. So, you would effectively just be swapping in your method. You also wouldn't need Serial Port JSON Server anymore.

One question for you though, how are you handling the buffering on your ESP8266?

On Sat, Mar 11, 2017 at 2:28 AM, mehrdad [email protected] wrote:

hi , sorry to open ticket for my question , actually I made my low weight web interface on ESP8266 which is use the JavaScript readerFile to load the gcode file on client side , I use the GRBL as cnc interpreter and connected to my ESP and its work well, however I intend to add visualize tab page so I could show gcode tool path but I couldn't find single file JS code (no Jquery) , I really appreciated if I have any hint on how to use essential this repo code for simple 2d visualize purpose [image: favicxzccon] https://cloud.githubusercontent.com/assets/6232001/23822488/a69e358e-0662-11e7-9e06-e123470ec803.jpg

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/chilipeppr/widget-3dviewer/issues/11, or mute the thread https://github.com/notifications/unsubscribe-auth/AHidbROuhuV_eD4iOsN8XEAje2qNKuDVks5rknc0gaJpZM4MaKoJ .

chilipeppr avatar Mar 11 '17 14:03 chilipeppr

I'm not sure about your buffering question , but I just connect serial pin of Arduino board(GBRL firmware) to ESP module and let the client side page and then ESP manage sending the Gcode to arduino and handle responds. My idea is just connect to CNC and load your file and do CNC job. With FileReader() method I could load and buffering file with size of 50K lines with no problem. Web host can authenticate the user and handle only one IP to control the CNC. Websocket service used to stream the code to Arduino with calculation how much byte has been sent yet and how much room available, my page code size less than 20KB and I don't want to use jquery due its size, that's why I'm looking for JS code to embed gcode visualizer in webpage. To enhance the ESP performance I should merge the file together and keep the size less as possible , I did visit your widget long ago but I'm not very professional to use it in that way, also ESP module mostly in AP mode and there is no internet connection to load JS code , so although your widget-3dviewer is really beautiful but for me its heavy and hard to use it in only 2D mode , hope I could have your hint to use your lib in my project

mkeyno avatar Mar 11 '17 20:03 mkeyno

@chilipeppr I've noticed your widget example can't run locally and need webGL as well as internet resources , does your lib can be launch only with single portable lib ?

mkeyno avatar Apr 14 '17 19:04 mkeyno

Well, this can all run locally if you set it up that way. That's not how ChiliPeppr is setup because everyone has Internet these days so it's assumed the Internet is there. It's up to you to change things up if you want to change how dependency loads.

As for WebGL, that's the only way to do 3D visualization in the browser, so yes this needs WebGL.

On Fri, Apr 14, 2017 at 12:17 PM, mehrdad [email protected] wrote:

@chilipeppr https://github.com/chilipeppr I've noticed your widget example can't run locally and need webGL as well as internet resources , does your lib can be launch only with single portable lib ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/chilipeppr/widget-3dviewer/issues/11#issuecomment-294218035, or mute the thread https://github.com/notifications/unsubscribe-auth/AHidbfICFqtj0owfwuILkdAdRLG-1hWOks5rv8ZegaJpZM4MaKoJ .

chilipeppr avatar Apr 15 '17 17:04 chilipeppr