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

Reply via email to