xyz-tools / gcode-preview

A simple GCode parser & previewer lib with 3D printing in mind. Written in Typescript.
https://gcode-preview.web.app/
MIT License
160 stars 31 forks source link

Option to render retractions #223

Open sophiedeziel opened 1 month ago

sophiedeziel commented 1 month ago

I had that idea after investigating stringing issues that fused parts of a print-in-place flexible model.

Prusa Slicer has the option of rendering retractions. It's useful to be able to render that.

Screenshot 2024-10-13 at 11 07 59

For this feature to be as accurate as possible, we'd have to implement the G0/G1 with negative E case as well as introducing G10 support.

The API could be very similar to what we have right now with the other types of renders:

{
  ...,
  renderRetractions: true,
  retractionColor: '#FF0000',
}
remcoder commented 3 weeks ago

Can I suggest we do this in v3.1+?

sophiedeziel commented 3 weeks ago

Yes!