Releases: xyz-tools/gcode-preview
v2.18.0 - Summer Time
2.18.0 🏖️ Summer time 🏖️
Features
- performance: Tube rendering is now more performant due to the use of BatchedMesh. This results in higher frame rates especially for larger models. (requires Threejs v0.159+) by @sophiedeziel in #164
- Introduce Dev mode by @sophiedeziel in #157
This uses lil-gui to add a panel with some debug stats and toggles. For instance, it allows you so see the wireframe of the model.
Bugs & small updates
- Bump braces from 3.0.2 to 3.0.3 in /examples/vue-demo by @dependabot in #167
- Fix slowdown in progressive render by @remcoder in #136
Docs & typing
- Documentation by @sophiedeziel in #166
- Feature/mark methods as internal by @remcoder in #173
- Export type GCodePreviewOptions by @remcoder in #175
Demo
- Upgrade to Threejs v0.159 and use module imports by @sophiedeziel in #158
- Fix/stats counter position by @remcoder in #182
Full Changelog: v2.17.0...v2.18
v2.17.0 🚀 Extrusion geometry 🚀
What's Changed
- performance: Tube rendering is now faster and more accurate, thanks to a new custom geometry
- feature: The parser can calculate layer height for each layer. It is used in tube rendering as the line height of extrusions
- options: New option
lineHeight
, that overrides the height of all extrusion lines in tube rendering
The repo also got some improvements:
- Automatic deploy of the demo when pull-requests are opened and merged
Pull requests
- Add autodeploy action by @remcoder in #155
- ExtrusionGeometry: use a custom geometry for extrusions by @sophiedeziel in #149
- Fix readonly type by @sophiedeziel in #160
- Layer height by @sophiedeziel in #161
- Fix the PR deploy to run on the PR and not the PR target by @sophiedeziel in #162
- Fix github actions to run on the pr branch by @sophiedeziel in #163
Full Changelog: v2.16.0...v2.17.0
v2.16.0
What's Changed
- Fixed package being loaded by react(-scripts) by @remcoder in #151
- Add presets to the demo by @sophiedeziel in #145
- Tube's diameter set by an Extrusion Width parameter by @sophiedeziel in #147
- Allow spaces in gcode params by @remcoder in #143
Full Changelog: v2.15.0...v2.16.0
v2.15
🌈 Multi-color 🌈
- works via detection of T0-T7 commands
- supports systems like:
- Prusa MMU1/2/3 & XL
- Bambulabs AMS and AMS Lite
- 3D Chameleon
- Enraged Rabbit Carrot Feeder (ERCF)
- IDEX systems
- Tool change systems
- Color mixing nozzles when used with a 'virtual tool' (M164 - Save Mix)
Full Changelog: v2.14.0...v2.15.0
v2.14
changes:
- api: added
dispose
method to stop requestAnimationFrame and free memory - fix: Threejs Lighting was updated to use candela as per r155
- fix: the type for the build volume setting was incorrect, leading to a compilation failure in certain cases
Apart from these changes to the lib, some other changes have been made to the repo, including:
- generated files were removed from the repo
- the examples were grouped together
- the examples received node and security updates
- linting and type checking was added to the github action (running unit tests were already being run)
- a roadmap was created in Github to provide some more focus
I want to thank @sophiedeziel for their help in getting a bit more organized, the sparring on Discord and answering issues over the past few months 🖖
v2.13
This is a maintenance release.
- new options:
- renderExtrusion
- renderTravel
These options toggle te rendering of extrusion/travel lines
fixed:
- fat lines incorrecty rendering lines between extrusion lines
- [demo] sidebar doesn't update after loading a new gcode file
v2.12 Tubular 🤙
- new experimental mode: tube rendering
In this mode extrusion lines are rendered using volumetric tubes using THREEjs TubeGeometry. Currently this mode is still under development and considered experimental.
To use it, pass the param renderTubes: true
Known issues:
- performance: rendering takes several seconds or more for large models
- accuracy: line width and line height are not taken into account when setting the tube radius
Thanks to @sophiedeziel for developing this feature.
https://www.npmjs.com/package/gcode-preview/v/2.12.0
v2.11 🏺 Vase Mode 🏺
Vase Mode
Previously, peviewing models sliced in 'spiral vase' mode would suffer lagging or would even lock up. But not anymore, thanks to a fix by @raulodev.
The issue was the creation of a new layer in memory for every increase in Z. Since spiral vase mode causes every gcode command to have a slight increased Z, this could cause hundreds of thousands layers to be allocated. The fix defines a threshold value for creating a new layer. Meaning that gcode commands to be grouped together in a layer until the Z reaches the threshold.
The default threshold is 0.05mm meaning that nothing changes for most gcode files.
To override the default there is a new option: minLayerTreshold
.
v2.10 Halloween: Colors
🎃 Halloween release 🎃
(Halloween Pumpkin by Florian Reppin)
This release is all about colors!
- Allow custom colors to be set for:
- extrusion
- travel
- top layer
- last segment
- background
- DEMO
- supports changing colors
- supports light/dark mode
Colors can be any valid THREE.Color value: css string, color name, hex value, or Color instance.
const preview = new GCodePreview.init({
canvas: document.querySelector('.gcode-previewer'),
topLayerColor: 'rgb(0, 255, 255)',
lastSegmentColor: '#fff',
extrusionColor: 'rgb(0,255, 128)',
backgroundColor: 0x101010,
travelColor: new THREE.Color('lime')
});
more pictures:
(Spider by Jason C Kessler)
Ghost by Iain Willis
Halloween ghost by Erikringwalters
v2.9.4 Custom non travel moves for CNC'ing
This adds an option you can pass to GCode Preview to customize which commands are considered travel moves.
Originally, only commands that had an positive extrusion parameter (ex. G1 E10) are rendered differently from travel moves. But this doesn't work for CNC's. The convention for CNC's is to use G0/G00 for travel moves and cutting moves are done using G1/G2/G3 (or G01/G02/G03).
Here's an example of passing the new param:
const preview = new GCodePreview.init({
canvas: document.querySelector('.gcode-previewer'),
nonTravelMoves: ['g1', 'g01', 'g2', 'g02', 'g3', 'g03']
});