Git Product home page Git Product logo

gcodeviewer's People

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

gcodeviewer's Issues

Spiral vase mode oddity - layer view only shows corners?

I sliced a 160x160x16mm shape in spiral vase mode for an extrusion test and wanted to check the extrusion rate in gCodeViewer. When I select the layer 2D view and scroll through the layers I only seem to get plots for the corners and nothing on the straight sections between. I suspect I'm missing something obvious, but can't think what!

zipped g-code file:

big-rounded-testcube.gcode.zip

Running converted PyCAM Gcode on gCodeViewer

Dear Hudbrog :-)

I got some modified PyCAM Gcode i want to run with your gCodeViewer. Its converted to run on Marlin Firmware. Dont ask my why but i´d like to :-). Here a short example:

G90 (disable incremental moves)
G21 (metric)
F200.00000
G1 Z1.00000 F800
G14 P3 (wait for 3 seconds) F1000
G1 X39.850 Y23.488 F1000
G1 Z0.00000 F800
G1 X39.757 Y23.520 F150
G1 X39.675 Y23.549 F150
G1 X39.602 Y23.576 F150
G1 X39.538 Y23.599 F150
G1 X39.483 Y23.621 F150
G1 X39.436 Y23.642 F150
G1 X39.395 Y23.661 F150
G1 X39.362 Y23.679 F150
G1 X39.334 Y23.696 F150
G1 X39.294 Y23.731 F150
G1 X39.271 Y23.768 F150
G1 X39.259 Y23.810 F150
G1 X39.253 Y23.859 F150
G1 X39.251 Y23.901 F150

...

G1 X94.542 Y3.592 F150
G1 X94.569 Y3.593 F150
G1 X94.597 Y3.603 F150
G1 X94.649 Y3.634 F150
G1 X94.690 Y3.660 F150
G1 X94.738 Y3.690 F150
G1 X94.790 Y3.723 F150
G1 X94.846 Y3.759 F150
G1 X94.902 Y3.795 F150
G1 X94.959 Y3.832 F150
G1 X95.014 Y3.868 F150
G1 Z1.00000 F800
G14 P3 (wait for 3 seconds) F1000
G1 Z1.00000 F800
; FINISH THE CUT BY MOVING BIT TO SAFER POSITION F1000
G1 Z18.000000 ; MOVE BIT ABOVE PIECE F800
G1 X0.000000 Y0.000000 ; HOME X AND Y F150

What is missing for the interpreter of your genius algorithm to visualize my nasty GCode?
Just say "forget it" if its to difficult to explain ;-)

Greetings
Hardy

Feature Request: Text view of gcode

Have a text editor pane, where the graphical item for the line the cursor is currently on is highlighted.

initially read only text, but consider experimenting with direct editing of gcode and immediately refreshing it...

Feature request: Recognition of G10/G11 for retract/priming

I like the gCodeViewer very much. IMHO it's the best gcode viewer at the moment.
However, it would be nice if it would recognise G10/G11 commands as in the UltiGCode or volumetric RepRap flavour from Ultimaker. Also more and more other Marlin driven RepRap machines will use these commands as it has been implemented in Marlin recently.

thanks for this great piece of software!

Wrong flow rate colors?

Hello @hudbrog!

I noticed that gCodeViewer calculates wrong flow rate values. Also, it displays more items in the legend than needed! See the following small G-code file:

; generated by Slic3r 1.2.8-dev on 2015-05-31 at 21:42:31

M104 S200 ; set temperature
G28 ; home all axes
G21 ; set units to millimeters
G90 ; use absolute coordinates
M82 ; use absolute distances for extrusion
G1 Z0.650 F7800.000 ; move to next layer (1)
G92 E0 ; reset extrusion distance
G1 X109.750 Y109.750 F7800.000 ; move to first perimeter point
G1 X90.250 Y109.750 E22.94318 F4800.000 ; perimeter ; dXY = 19.500mm ; dE = 0.36052mm ; dE/XY = 0.01849mm/mm; volspeed = 10.45483mm^3/sec
G1 X90.250 Y90.250 E23.30371 ; perimeter ; dXY = 19.500mm ; dE = 0.36053mm ; dE/XY = 0.01849mm/mm; volspeed = 10.45512mm^3/sec
G1 X109.750 Y90.250 E23.66423 ; perimeter ; dXY = 19.500mm ; dE = 0.36052mm ; dE/XY = 0.01849mm/mm; volspeed = 10.45483mm^3/sec
G1 X109.750 Y109.675 E24.02336 ; perimeter ; dXY = 19.425mm ; dE = 0.35913mm ; dE/XY = 0.01849mm/mm; volspeed = 10.45474mm^3/sec
G1 Z0.850 F7800.000 ; move to next layer (2)
G92 E0 ; reset extrusion distance
G1 X109.750 Y109.750 F7800.000 ; move to first perimeter point
G1 X90.250 Y109.750 E22.94318 F4800.000 ; perimeter ; dXY = 19.500mm ; dE = 0.36052mm ; dE/XY = 0.01849mm/mm; volspeed = 10.45483mm^3/sec
G1 X90.250 Y90.250 E23.30371 ; perimeter ; dXY = 19.500mm ; dE = 0.36053mm ; dE/XY = 0.01849mm/mm; volspeed = 10.45512mm^3/sec
G1 X109.750 Y90.250 E23.66423 ; perimeter ; dXY = 19.500mm ; dE = 0.36052mm ; dE/XY = 0.01849mm/mm; volspeed = 10.45483mm^3/sec
G1 X109.750 Y109.675 E24.02336 ; perimeter ; dXY = 19.425mm ; dE = 0.35913mm ; dE/XY = 0.01849mm/mm; volspeed = 10.45474mm^3/sec

These are just 2 layers with 5 extrusions each. All extrusions should be displayed with the same flow rate (10.45mm^3/sec).
However the first layer is rendered with many items in the legend (where do they come from?):

schermata 2015-05-31 alle 21 52 16

The second layer is rendered with a reasonable number of items in the legend (despite they could be grouped - see #28) but still the values seem to be off:

schermata 2015-05-31 alle 21 52 23

Thank you for your work :)

Allow loading of .gx files

*.gx files are the output of FlashPrint, the FlashForge slicer. Internally, .gx files are gcode files with a small header at the top of the file. They load correctly into the gCode Viewer already, but since it refuses .gx files, I need to rename them to .g files before gCode Viewer would accept them.

Maybe, instead of refusing to load the file, a warning could be displayed, with the option to attempt loading anyway.

Here's a sample .gx file produced by FlashPrint: clip.zip

what about mills?

I'm looking for something that works under Linux to let me see the gCode that I am writing for use with a Matsura CNC machining center.

It only seems that your program supports extruders for 3-D printers and the like, and metric sizes.

The test file I uploaded didn't do anything visible for output, but it was a "proved" program that ran properly on the mill. I did see two progress bars that both went to 100% in the upload area, but that was it.

I'd like to see english measure as well as metric, and subtractive milling support as that is what I'm doing...

If that isn't where you want to go with the program that is cool, but if you can point me at something else that would work it would be great...

Thanks,
ART

Time of layer start.

Sometimes it would be nice to know when in a print a layer is supposed to start (even an estimate). Putting this on the layer page would be much easier than having to go through and add up all those seconds.

Save the 3D model

Do you have a way to save the 3D line model to any file type that 3D model software can open it?

Flow rate colors need binning

Issue #28 mentioned that the flow rate colors can be hard to distinguish, but there's also a problem of too many colors:

g-code viewer - excessive flow rate detail

That list isn't useful, because each color represents eight flow rates that have widely different numeric values.

Would it be possible to use only eight (or so) unique / garish / high-contrast colors per layer, with each color representing a group of "similar" flow rates?

For example, the 68 (!) different flow rates for that layer range from 1.430 to 3.118. Divide their span by (number of colors -1) to get the bin size, then assign the colors accordingly:

g-code viewer - binned colors

Using fixed-size bins, as in the first column of colors, may skip some colors, because those bins may be empty.

You could assign a fixed number of flow rates to the same color in order, as in the second column of colors. That would produce variable bin sizes, but the different colors would indicate the general trend of flow rates.

The general idea is to make the colors correspond to a meaningful range of flow rates, so that the preview will reveal the problem I'm having: too much plastic in the first layer. Is it a slicer setting or a printer misalignment?

The same color logic would improve the extrusion/move preview, which has a similar tendency to showing hairsplitting numeric details.

Thanks ...

Corrupted preview

Uhm, I see that there haven't been any commits for some months but for some reason today I'm getting very corrupted and lacking rendering using Chrome. I don't think I updated Chrome since last time I used gcode.ws (some weeks ago). Is there any issue?

Feature Request: Arrows on 2D Layer Scroll Bar (i.e. +1, -1 buttons)

Could you add the "arrows" to the ends of the 2D Layer Scroll Bar (or all scroll bars) that do +1, and -1?

If that is not possible, can you add a +1 and a -1 button?

When a model has a lot of layers, it can be difficult to get to a specific layer and look at layers around that one.

No LICENSE file

Hey, I just like to make sure my little fork is OK but I don't see a license file here. It looks like this is licensed Creative Commons Attribution at http://www.thingiverse.com/thing:35248 but I don't see a license in the README or a LICENSE file here on GitHub.

Please add an explicitly named license.

Thanks!

Good work!

Sorry, not really an issue. ;-)

I just wanted to say that I like it very much. I wish there was an easy way to integrate it in Slic3r as it is, being it so nice. I'll need to reinvent the wheel by writing my own :-(

Anyway, good job!

Zoom changes

When I load a new G-code the zoom and point of view changes and I always have to zoom back to see the whole object. Why? Can't you just to the full area or leave the zoom untouched?

(Also, I'm curious to know what do you do with material type :))

Extremely slow processing with Cura GCode files

I have been using gCodeViewer with files generated by Skeinforge and Slic3r for quite a while now and found it performs really well.

Within the last few days I have been evaluating Cura and when I load a file into gCodeViewer I find that the first progress indicator gets to 100% quickly but it seems to take a very long time for the second progress indicator to reach 100%. I am talking about an hour for a 4MB file.

I am puzzled by what is uniquely different about Cura GCode files that causes this behaviour.

I am running gCodeViewer locally on a dual-core 3.3GHz 64-bit system under fedora 20. My browser is FireFox 28. If that helps.

Bug in renderer3d then also breaks 2D view

Description :
When a GCODE contains an actual ZERO coordinate (as X, Y, or Z), then the corresponding point in the 3D visualizer doesn't appear where it should be. The bug doesn't appear at first in the 2D view, but after opening 3D view it appears, and when going back to 2D view it appears there too.

Steps to reproduce :

Cause :
After thorough investigation, it appears the offending point (for the first layer) corresponds to line 513 in the GCODE
G1 X-0.000 Y-17.597 E3.84787
It is not a parsing problem though, the parser correctly reads it as { x=0 y=-17.597 z=NaN, ... }
The problem is in the 3D model builder when iterating through the cmds (renderer3d.js line 49)

            if(!cmds[j].x)cmds[j].x=prevX;
            if(!cmds[j].y)cmds[j].y=prevY;
            if(!cmds[j].z)cmds[j].z=prevZ;

Number zero is interpreted as False.

Fix :
I am not familiar enough with your code to be sure, but I think replacing the !cmds[j].x with a isNaN(cmds[j].x) instead should do the job. isNaN will return true in case of NaN or undefined.

Drag and Drop

Hi,
Great work mate, one recent issue.
Drag and drop no longer works for me.
I am running Google Chrome on Win 7 x64.

Thanks for the sharing :D

-Casey

tiny gcode visualizer lib for tiny webserver

sorry to open ticket for my question but actually I'm looking for light gcode visualizer or probably cad2gcode convertor in my webpage , but this webpage hosted on tiny ESP826612F module which is connected to Arduino GRBL gcode interpreter by serial line, so I should have great care about its weight , My plan is just connect to wifi module and open the browser and do designated CAM job.,As I'm not pro in client side script like JavaScript I was hopping could have good advise here, do you suggest to make some plugin from such library so I shouldn't have to download or call all library ?
thanks

ModelInfo produces many NaN's

I think it is related to my Slicer (modified skeinforge by myriwell), because noone else reported such problems:

In every .gcode file ''all'' individual layer information are calculated ok (plausible values). But in Model Info most values are shown as NaN (not summed up correctly).

I ''fixed it'' (only better error handling - not really investigated the reason) with:
.in Worker.js
..line 162:
...- totalFilament+=cmds[j].extrusion;
...+ if(cmds[j].extrusion > 0) totalFilament+=cmds[j].extrusion;
..line 181:
...- printTime += printTimeAdd;
...+ if (printTimeAdd > 0) printTime += printTimeAdd;

Example .gcode can be found at: [http://pastebin.com/AbGFDyTM]

Thumbs Up! to the Project after all.

Sincerely,
Richard.

some gcode files simply don't work

Hi,

I've used the GcodeTools extension from inkscape to create a gcode file. The file contains some CNC stuff so I have commented everything that seemed could cause trouble, but it just didn't show anything in the 2D or 3D preview. I tried deleting and deleting things until I got a very, very simple gcode (just about 10 lines of code) and even then it does not load. I have to say I love your visualizer because I've used it with other files that have worked and would like to know what's wrong with these ones.

I'm attaching the file to see if you can find what's going on, thanks!

https://www.dropbox.com/s/5emi8qyk2lc4jgv/output_0002.gcode

Sequential prints shown as parrallel

I'm not sure if I am missing an option somewhere, but I seriously thought slic3r didn't want to make sequential prints as gcode.ws shows all my parts in the same height and being printed in parrallel.. I didn't even test printing anything, as I thought gcode was right and slic3r was wrong.

Is there a setting I am issing? I tried disabling a few things here and there, but couldn't make the site show me the prints as I thought it would happen.

Otherwise great job. It really has saved precious time by analyzing my code before printing it :)

TypeError on gcode.ws live site

Getting this in the console with Chrome 28:

Uncaught TypeError: Cannot read property 'length' of undefined renderer.js:491

colours used to plot flow rate very dificult to read

If I chose to plot mm^3/sec the colours used are very very difficult to read, and there are often multiple flow rates represented by almost identical colors. See example below.
example

It would be useful if rather than a specific colour representing a single flow rate, it represented a range of flow rates. And even better if we could manually enter/change the ranges.

Cheers,

Andy

typo in gCodeReader.js

This is very minor... line 78 of gCodeReader.js:

console.log("Something terribly wring just happened.");

Should be "wrong", not "wring".

Vertical scrolling of panel can't reach top unless browser window is at least a certain height

There's a fixed banner at the top of the page which says "Gcode viewer' on the left and 'Spread the word' (with a pulldown) on the right. This obscures part of the main panel even when scrolled all the way up. The amount obscured seems to depend on the height of the browser window (actually, depending on the height, the top of the panel may be unreachable even without this banner on top).

This laptop I'm using has a 1366x768 screen. With a maximized window and the main vertical scrollbar all the way up, I can see 'Select GCode file' in the left panel and just barely all of 'gCodeViewer is a visual GCode visualizer' in the right panel (of course you won't have that v. scrollbar in a larger browser window). The tabs (2D 3D gcode) at the top of the right panel can't be seen at all. I've found that by stretching the window to be about 30% taller than the screen, there's a point at which the window panel titles and tabs become visible (as does a fairly wide margin at the bottom). And the vertical scrollbar also vanishes since the window can now contain the whole panel. There is a range of heights where the scrollbar is gone but the banner still mostly covers the tabs.

This problem occurs on all the views (model info, layer info, etc)

Platform - ubuntu 13.10 - browser: tested on Firefox 26.0 and chromium Version 31.0.1650.63

Excellent work, very useful tool.

Request: Running total of filament mm used

Hi, it would be nice to display a running total of the filament used as you scroll through the layers.

I wanted to make a two-color print that changed at a particular layer so I needed to know how long to cut the first filament piece so I could I join it to the second one. I had to add up each layer by hand to work it out but if the output included a running total it would be very easy.

Thanks.

Feature request: Filament used per extruder

Great viewer!

But there is one feature missing for me...

I have a dual extruder 3D printer, and use water soluble PVA as support material, which I store in a drying chamber to prevent it from getting moist. I then transfer the estimated amount of filament needed to another spool before each print. However, it is hard to estimate how much I need and I therefore always use too much filament to be on the safe side. It would be very helpful if I knew how much filament is used per extruder.
Could you add that feature?

Share Link

It would be nice to be able to upload some GCode and then get a URL we can share so others can help diagnose problems, etc.

Feature Request - Layer advance button

Hi. I just found your page and like it a lot. One request I'd have is to have a button control the layer being viewed, instead of the scroll bar. We would get better resolution by clicking ahead one layer at a time especially when trying to isolate a certain spot in the model. Is that possible?

Thanks again. Nice program.

Analyze .x3g Files

Hello,
I love what you've created here and I'm especially interested in estimating the build time, and amount of plastic used, so that I can offer quotes prior to printing. The one hitch is that I use, and love, the MakerWare software, which exports .x3g files instead of .gcode files. Would it be possible to adapt the site to read these files as well?

Thank you,
Eric

Does not work for milling files. Gives no error message.

I now realize that this isn't what this program was made for but it isn't clearly noted it is for 3d printing. gcode is used for lots of things. Tried to use this on gcode for a milling project - was looking for something quick. Progress indicators were two lines showing 100% each in green. But I didn't get anything but a listing of the gcode.

gCodeViewer "skips" a layer

The attached file generated with Cura Lulzbot Edition (21.0.4) and Cura Lulzbot Edition Beta (2.6.21) for a TAZ 6 printer skips layer 7 when displayed with the gCodeViewer. It happens in multiple browsers (Firefox, Edge, IE, Chrome). Turning off the "Sort layers by Z" option will sometimes eliminate the issue. Note that layer 8 is actually the gcode of layer 7 so the following layer numbers are off by one.

Filament_clip_3mm_and_175.zip

The client computer is Windows 10.

Curious when Error Analysis button will be included here (if it will).

First, thanks very much for your work. I just found it and it meets our needs very well (allowing us to give a estimate of how much it will cost to print an object based on weight of material used).

I'm curious whether the Error Analysis tab and button to Run analysis will be made available here.

Thanks again.

Flow rate color codes

Hi,

I like this gcode viewer! I've mirrored the git repo and run it on localhost, Very useful to be able to step through each layer, and step through each move/extrusion per layer as well.

I have a request as well. In some cases it's useful to debug flow rates. If there could be some way to switch how the extrusions are color coded, I'd like to use the color codes to see the flow rates instead of the speeds. It's probably not the most common case, but it'd be useful to toggle between the two.

Feature Request: Color by flow rate

Hi! I have one feature request for you. :)

I'd like an option to see lines colored by amount of extrusion instead of speed.
You'd basically need to do ΔE / segment_length, where ΔE is the increment of E since last line. The result is expressed in mm of filament per mm of travel.

(I have no interest in displaying flow rate as mm/s because that would be an absolute value and since speed can change too, it would tell us nothing about how much plastic is being pushed.)

Maybe you're already doing something like that for computing your widths?

Thank you for considering my idea!

Allow .gco extension

Repetier Host saves gcode files as *.gco by default

Currently gCodeViewer does not allow .gco to be uploaded, and the files must be renamed.

Material Usage

Hi Bud,

Just wanna say that the Analyser is fantastic. Soo handy although i do have a quick question. The Total filament used information shows this in mm. Now is that mm of the filament at the layer height you are printing at, eg. 0.27. or is it of some other diameter filament. I only ask because it can make quite a lot of difference to the amount of material used on the model.

Or the other thing might be that i have missed something fundamental. If so, clarification on that too would be great.

Cheers again.

Alex

Support for Makerbot's new .makerbot file extension.

Is it possible to support the new .makerbot file type that now being used for the 5th generation MakerBot Replicators?
The files are just renamed zip files with the actual gcode inside named "print.jsontoolpath". As the filename suggests, this toolpath file is json formatted gcode.
A "meta.json" file is included as well and contains information on the print such as time needed to print the part, the mass in grams, and the total amount of material to be extruded.
I can provide examples of files if required.

Feature Request :Pricing

I know its not needed

but other calculations that could be added

Hourly Cost
Price of Filament Used

not that its too hard to just whip out a calculator and do it with your supplied gram / time results already provided

Great program I am trying to get it running offline on my pc now

Speed in mm^3/s how to calculate?

Hi there,

I am a new user here, can you help me calculate the speed in mm^3/s in the 3d printing gcode?

For example, in:

G1 X90.000 Y93.429 E1.04436 F900.000
G1 X110.000 Y93.429 E1.57880
G1 X111.504 Y93.822 E1.62034
G1 X112.623 Y94.902 E1.66189 F900.000

Thank you!

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.