The `CutMode` toggle had no effect. This fix applies the `CutMode` toggle when the `CutPattern = Offset`. The indicated `CutMode` may not be accurate depending on the situation, but the toggle will change the cut direction as intended.
Add --marlin-config argument
Marlin requires certain configuration settings in order to work well
with FreeCAD. Those configuration settings will be added to the
end of the gcode file as comments, when --marlin-config is entered
as a post processor argument.
For PEP8 conformity:
Change some double-quotes to single-quotes.
Change sequence of import statements.
Modify code format to PEP8
Indentation and line length meet PEP8 requirements.
Other aspects of PEP8 are partially implemented.
Add code to remove embedded comments
Also, minor tweaks throughout
Change outstring to outList for clarity
Change format_outstring to format_outList
Change: if PathUtil.opProperty(obj, 'Active') is False:
To: if PathUtil.opProperty(obj, 'Active') == False:
Format file to PEP8 standard
Format first pass using:
autopep8 --in-place --aggressive --aggressive
Manually adjust format for better appearance
Recheck format using http://pep8online.com/
Change code related to pythonopen into with open() code
Minor refactoring
Change G4 P to G4 S for Marlin
Marlin uses P for milliseconds, S for seconds.
FreeCAD uses P for seconds, so change P to S.
Remove code for G20 inch mode and G91 relative mode
Due to the fundamentals of the FreeCAD pre-processor,
this post processor can only operate in the following modes:
G90 Absolute positions
G21 Metric units (mm)
G17 XY plane (3 axis vertical milling only)
Expand RETURN_TO option to float values for XYZ
The RETURN_TO option previously only accepted integer values, and
only for X and Y.
This change allows float values for XY and optionally Z.
Add class: "Drill" within drill_translate()
The nested functions within drill_translate() need to modify the
variable that was named trBuff. To allow this, trBuff was changed
to class: "Drill" with property "gcode".
Within drill_translate(), including within the nested functions,
modifying "trBuff" is now replaced with modifying "Drill.gcode".
Merge in updated portions of grbl_post.py
Prior verson was derived from an older grbl_post.py.
Merge in the portions of the newer grbl that seem improved.
Refactor overall after the merge.
Add options for partial comments
Add option: --no-finish-comments
Add option: --no-path-comments
Path: grbl_post G83 expansion , G1 on initial move to retract_Z height to allow retraction height to remain inside hole. This can be useful to avoid widening hole entrance with multiple drill re-entries.moves