Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gcode quality is much improved, update/fix of add_rotation #26

Open
wants to merge 40 commits into
base: master
Choose a base branch
from

Conversation

johannesnoordanus
Copy link

@johannesnoordanus johannesnoordanus commented Nov 20, 2022

GCODE is a modal language and requires only changes of coordinates, speed, power or laser mode to be emitted, this update reflects that. Quality of Gcode is much improved and adapted to the latest GRBL.
Updated all test results and checked for correctness, tested (multiple) transformations and checked for correctness.

  • added rapid_move (G0) and dynamic laser power mode (M4).
  • fix of 'repr' and 'add_rotation' function
    Rotation must include a center. Verified that transformations work correct now.
    Note that elliptical arcs are applied correctly!

Documentation:
Gcode: http://linuxcnc.org/docs/html/gcode/g-code.html
             http://linuxcnc.org/docs/html/gcode/other-code.html#sec:set-feed-rate (Gcode parameters)
             https://www.cnc4fun.com/wp-content/uploads/2019/12/Grbl-Commands-v1.1-2.pdf (grbl v1.1 commands)
GRBL 1.1: https://github.com/gnea/grbl/releases
laser mode: https://github.com/gnea/grbl/wiki/Grbl-v1.1-Laser-Mode

Checked on gcode emulator and did a dry run.
Checked on gcode emulator and a dry run
Checked by gcode emulator and dry run
Checked by gcode emulator and dry run
Checked by gcode emulator and dry run
Checked by gcode emulator and dry run
Checked by gcode emulator and dry run
Checked by gcode emulator and dry run
Checked by gcode emulator and dry run
Checked by gcode emulator and dry run
Checked by gcode emulator and dry run
Checked by gcode emulator and dry run
Definition and check for machine parameters, tool parameters and configuration.
Added set_machine_parameters, code_initialize, rapid_move, set_laser_mode, set_distance_mode, program_end
GCODE is a modal language and requires only changes of coordinates, speed, power or laser mode to be emitted, this update reflects that.
Added rapid_move (G0) and dynamic laser power mode (M4).
Added methods code_initialize(self), program_end(self), rapid_move(self, x=None, y=None, z=None), set_distance_mode(self, distance_mode), set_laser_mode(self, mode), set_machine_parameters(self, params).
 Override the set_laser_power method, use gcode M7 - mist coolant - instead of M8 - flood coolant .
(note that setting 'fan' must be True for this to work)
Rotation must include a center. Verified that translations work correct now.
Note that elliptical arcs are applied correctly! So comment "# Todo transformations aren't applied correctly to elliptical arcs" (_path.py) is incorrect.
A note on comment
    # ToDo apply transformation beforehand (in Path) for consistency with other geometric objects. If you (the reader)
    #  know how to easily apply an affine transformation to an ellipse feel free to make a pull request.
(_elliptical_arc.py): it seems to me that the 'rotation' parameter of the ellipticalarc interferes with a transformation that results in rotation. To get it right the 'rotation' part of the translation must be extracted.
Laser mode is now set correctly.
Added settings for image printing
Added image 'compilation'. Svg 'image' tags are fully supported now.
Added RasterImage class
Adder RasterImage class to handle sag 'image' tags
Added sag 'image' tag handling
Added info on engraving svg image tags and the svg2gcode steering program.
Added viewBox (and viewport) notion.
Added viewBox notion.
Image2gcode conversion fix (same pixel line to 'end of line' wasn't drawn in the right color)
Negative viewBox 'x' and 'y' coordinates are recognised now.
Fixed viewBox transformation order
fix of absolute_cubic_bezier_extension
MIT license now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant