NAME
Graphics::Penplotter::GcodeXY::Vpype - vpype integration for GcodeXY
SYNOPSIS
my $sorted = $g->vpype_linesort();
$sorted->output('sorted.gcode');
DESCRIPTION
A Role::Tiny role that integrates the external vpype tool with Graphics::Penplotter::GcodeXY.
vpype_linesort exports the current drawing to a temporary SVG file, passes it through vpype's linemerge and linesort pipeline to minimise pen-travel distance, then imports the result into a fresh GcodeXY object and returns it. The original object is left unmodified.
vpype must be installed and available on $PATH. See https://vpype.readthedocs.io/ for installation instructions.
METHODS
- $sorted = vpype_linesort()
-
Run vpype's
linemerge -t 0.01mm linesortpipeline on the current drawing. Ifpapersizeis set on the object the--page-sizeoption is passed to vpype'swritecommand.Returns a new object of the same class, with
idset to'vpype-linesort'and all other construction parameters copied from the caller. The caller is not modified.Croaks if vpype exits with a non-zero status.
REQUIRED METHODS
This role requires the consuming class to provide: exportsvg, importsvg, _croak.
AUTHOR
Albert Koelmans (albert.koelmans@googlemail.com)
LICENSE
Same terms as Perl itself.