Proposed module for pen plotters: Graphics::Penplotters::GcodeXY

[email protected] (Albert Koelmans via module-authors) Thu, 21 Aug 2025 13:37:21 +0100
Newsgroups perl.module-authors
Message-ID <[email protected]>
--------------MGotMuexFovbMkx0MjR1ypNz
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

I am planning to contribute a (2D) graphics library for pen plotters. 
This seems to fill a hole in CPAN - I can't find any support for pen 
plotters there.

I want to call this Graphics::Penplotter::GcodeXY, partly because it 
will make it easier for pen plotter users to find it.

Gcode is the command language for pen plotters. This language was 
originally designed for 3D milling machines. Pen plotters use just one 
plane, hence the XY.

Pen plotters need a separate graphics library because pen plotters 
generate line segments rather than pixels. This means that the graphics 
engine is quite different. You don't need Bresenham's algorithm, for 
example.

In its current state, the library offers the following:
- the usual graphics primitives: line, rectangle, circle, ellipse, 
polygon, arc, arrowhead, bezier curves of any order. Most have variants, 
including rounded corners;
- transformations (like in Postscript): translate, scale, rotate, skew, 
save and restore graphics state, manipulate the current transformation 
matrix;
- SVG import and export;
- design splitting (e.g. split A1 design into four A3 sheets for 
separate plotting);
- Postscript output (eps);
- pen movement optimization;
- interface with the vpype software for lots of advanced algorithms;
- font support: set font name and size, add font search paths, calculate 
string width;
- hatching (to simulate filled areas).

To check out the complete perldoc on github:
https://github.com/gamk67/Graphics-Penplotter-GcodeXY

I would be grateful for any feedback.

Many thanks
Albert

--------------MGotMuexFovbMkx0MjR1ypNz
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html>
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><font size="4" face="Fira Code">I am planning to contribute a
        (2D) graphics library for pen plotters. This seems to fill a
        hole in CPAN - I can't find any support for pen plotters there.<br>
      </font></p>
    <p><font size="4" face="Fira Code">I want to call this
        Graphics::Penplotter::GcodeXY, partly because it will make it
        easier for pen plotter users to find it.<br>
        <br>
        Gcode is the command language for pen plotters. This language
        was originally designed for 3D milling machines. Pen plotters
        use just one plane, hence the XY.<br>
        <br>
        Pen plotters need a separate graphics library because pen
        plotters generate line segments rather than pixels. This means
        that the graphics engine is quite different. You don't need
        Bresenham's algorithm, for example.<br>
        <br>
        In its current state, the library offers the following: <br>
        - the usual graphics primitives: line, rectangle, circle,
        ellipse, polygon, arc, arrowhead, bezier curves of any order.
        Most have variants, including rounded corners; <br>
        - transformations (like in Postscript): translate, scale,
        rotate, skew, save and restore graphics state, manipulate the
        current transformation matrix;<br>
        - SVG import and export;<br>
        - design splitting (e.g. split A1 design into four A3 sheets for
        separate plotting);<br>
        - Postscript output (eps);<br>
        - pen movement optimization;<br>
        - interface with the vpype software for lots of advanced
        algorithms;<br>
        - font support: set font name and size, add font search paths,
        calculate string width;<br>
        - hatching (to simulate filled areas).<br>
        <br>
        To check out the complete perldoc on github:<br>
        <a class="moz-txt-link-freetext" href="https://github.com/gamk67/Graphics-Penplotter-GcodeXY">https://github.com/gamk67/Graphics-Penplotter-GcodeXY</a><br>
        <br>
        I would be grateful for any feedback.<br>
        <br>
        Many thanks<br>
        Albert<br>
      </font><br>
    </p>
  </body>
</html>

--------------MGotMuexFovbMkx0MjR1ypNz--