Giter Club home page Giter Club logo

yagv's Introduction

yagv - Yet Another Gcode Viewer, v0.4

A fast 3D Gcode Viewer for Reprap-style 3D printers, in Python and OpenGL (via pyglet)

Designed in Ubuntu Linux; Expected to work in any Linux, Windows or OS X

Requires:

Usage:

yagv [file.gcode]

  • By default, open data/hana_swimsuit_fv_solid_v1.gcode if no file specified

Features:

  • Colors segments according to their type:
    • extruding
    • flying the head to the next extrusion point
    • retracting filament
    • restoring filament
  • Allows displaying layers independently to examine them.
  • Automagically splits the gcode into layers.
  • Automatic scaling to fit the window.
  • Zoom and rotation (Panning planned).

Issues:

  • Panning for close inspection not yet supported.
  • Retract/restore detected but invisible (0-length segments).
  • Designed with Slic3r output in mind, may not support other slicing programs (suggestions/patches welcome).
  • Some gcodes unsupported, in particular:
    • G20: Set Units to Inches (usage unknown)
    • Arcs (G2 & G3 ?)

yagv's People

Contributors

jmgurney avatar jonathanwin avatar

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

Watchers

 avatar  avatar  avatar

yagv's Issues

G1 code parse error

python yagv ~/3dprint/Toy_Helicopter/helicopter_tail_rotor_plug.gcode
Yet Another GCode Viewer v0.4
loading file '/Users/chexov/3dprint/Toy_Helicopter/helicopter_tail_rotor_plug.gcode' ...

Parsing '/Users/chexov/3dprint/Toy_Helicopter/helicopter_tail_rotor_plug.gcode'...

[WARN] Line 10: Unknown code 'M107' (Text:'M107')
Traceback (most recent call last):
File "yagv", line 503, in
App().main()
File "yagv", line 42, in main
self.load(path)
File "yagv", line 70, in load
self.model = parser.parseFile(path)
File "/Users/chexov/code/yagv/gcodeParser.py", line 22, in parseFile
self.parseLine()
File "/Users/chexov/code/yagv/gcodeParser.py", line 45, in parseLine
getattr(self, "parse_"+code)(args)
File "/Users/chexov/code/yagv/gcodeParser.py", line 62, in parse_G0
self.G1(args, "G0")
AttributeError: GcodeParser instance has no attribute 'G1'

Panning, keyboard control

This project looks abandoned. Bummer.

Anyway, here were the showstoppers for me -- no panning to zoom in on details, and the inability to control (anything?) over keyboard.

G28 arguments not parsed correctly

The profile for my i3 MK2 in Slic3r PE uses G28 W in the out of the box, which raises an exception:

Traceback (most recent call last):
  File "/usr/bin/yagv", line 503, in <module>
    App().main()
  File "/usr/bin/yagv", line 42, in main
    self.load(path)
  File "/usr/bin/yagv", line 70, in load
    self.model = parser.parseFile(path)
  File "/usr/lib/yagv/gcodeParser.py", line 22, in parseFile
    self.parseLine()
  File "/usr/lib/yagv/gcodeParser.py", line 45, in parseLine
    getattr(self, "parse_"+code)(args)
  File "/usr/lib/yagv/gcodeParser.py", line 79, in parse_G28
    self.model.do_G28(self.parseArgs(args))
  File "/usr/lib/yagv/gcodeParser.py", line 55, in parseArgs
    coord = float(bit[1:])
ValueError: could not convert string to float:

parseArgs assumes all arguments are in the form [A-Z][0-9]+ for print head movement, but this is not the case for G28. Changing line 79 to self.model.do_G28(args.split()) at least allows it to continue past that point. Otherwise, parseArgs should not assume all arguments are always in that format.

Renderer hangs

Hi,

First of a really nice viewer!

Unfortunately the renderer hangs after 30 seconds on my system. Is there any debug mode I can setup to understand where the issue arrives from?

License ?

Hello, under what license is this project released under ? Thank-you.

Tag new release?

Hi. It would be helpful for the Debian packaging if the code is "released" once in a while, and tagged with a version number. Please consider doing so.

Missing compatibility with Pyglet 2.0

We have a bug report on the Debian bug tracker that indicates yagv isn't compatible with Pyglet 2.0:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1064598

The symptom is that yagv tries to use Pyglet's graphics primitives in a way that is no longer supported, and crashes:

generating graphics...
Traceback (most recent call last):
  File "/usr/bin/yagv", line 503, in <module>
    App().main()
  File "/usr/bin/yagv", line 39, in main
    self.load(path)
  File "/usr/bin/yagv", line 81, in load
    self.generateGraphics()
  File "/usr/bin/yagv", line 188, in generateGraphics
    vertex_list = pyglet.graphics.vertex_list(nb_layer_vertices,
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pyglet.graphics' has no attribute 'vertex_list'

Please consider upgrading yagv to use the new graphics pipeline.
Migration instructions can be found here: https://pyglet.readthedocs.io/en/latest/programming_guide/migration.html

G91 (Set to Relative Positioning) unsupported

Relative positioning is used by some slicers. Adding support for this command shouldn't be that complex. I want to contribute by adding this feature as I need it and I love the design of yagv.

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.