Comments (3)
This is a useful tool to me as well, and I agree with you that the color range is not useful.
I would say a continuous black-blue-green-yellow-orange-red-purple gradient (i.e. similar to a weather radar display) is a better idea, with black remaining the lowest-valued color.
from gcodeviewer.
Is this ever going to get fixed? come on guys.
from gcodeviewer.
This is really annoying. In fact, the "Extrude speeds in mm³/sec"-info is nearly unusably in my opinion.
I was looking for a quick&dirty way to fix it to be able to get mm³/sec for a specific gcode i'm working on. It is far from perfect, but with a few simple steps, you can use it for yourself:
- Click the green "Clone or Download"-button and "Download ZIP" to get your copy of the files.
- Extract to any folder you like.
- Put a textfile in it, call it "start.cmd", and save the following command line:
start chrome %~dp0index.html --allow-file-access-from-files --user-data-dir=%~dp0Chrome-TEMP\
- Open \js\renderer.js and insert this line after line 286:
speedIndex = Math.round((renderOptions["colorLineLen"]-1)* ((extrusionSpeeds[speedIndex]-Math.min.apply(null, extrusionSpeeds))/(Math.max.apply(null, extrusionSpeeds)-Math.min.apply(null, extrusionSpeeds))));
- Open \js\ui.js and go to line 101. Insert a new line
var extrusionSpeeds = GCODE.gCodeReader.getModelInfo().extrusionSpeeds;
- Go to line 115. Replace
if(speedIndex > colorLen -1){speedIndex = speedIndex % (colorLen-1);}
by
speedIndex = Math.round((renderOptions["colorLineLen"]-1)* ((extrusionSpeeds[speedIndex]-Math.min.apply(null, extrusionSpeeds))/(Math.max.apply(null, extrusionSpeeds)-Math.min.apply(null, extrusionSpeeds))));
- Save everything and open start.cmd. It will launch a new chrome instance that has access to the javascript sources by the --allow-file-access-from-files flag. Now it will look like this:
I know it's not perfect but usable.
If anyone has the time to improve the math, please do it. You can't say you didn't know how to start ;-)
Currently it takes the values of all layers into account, this is why you do not see all 8 available colors in every layer. To fix this, one needs to replace extrusionSpeeds[speedIndex] by extrusionSpeedsByLayer[z][speedIndex], I think...
PS: For convenience, the whole thing is attached as gCodeViewer-master.zip. Download, extract, "start.cmd", enjoy.
from gcodeviewer.
Related Issues (20)
- High memory consumption for a big GCODE
- Allow input of X, Y, (and Z) offsets for each extruder
- Gcode files with no extrusion in them will not render HOT 2
- feature request
- request : gradient color in 2D view
- Wrong flowrates are calculated when firmware uses volumetric E HOT 1
- gcode.ws domain expired HOT 2
- feautere request server side sample files list
- Feature Request: Customizable colour in 3D view
- Feature request: hide grid in 2d tab
- Cannot open my G-code HOT 1
- Upload should allow .ngc extension please
- Open gcode files from URL HOT 1
- Feature request: when the sliders are at a certain line of a certain layer, allow to identify the location in the gcode file. HOT 3
- Question: Is possible to run gCodeViewer locally without docker? HOT 4
- Doesn't process sources running locally on FF HOT 1
- Feature-request: Exclude Layers HOT 1
- Unrecognized Gcode Filetype HOT 1
- Gcode Viewer 1 of a kind HOT 1
- Not all GCode have the file extensions .gcode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gcodeviewer.