We’re pleased to note the release of AxiDraw software version 3.9 this week, with a couple of neat new features. One of them is that the “preview mode” button — which lets you simulate plotting to see how the results will come out — is now accessible no matter which function is selected. The other, the big one, is that AxiDraw now supports hidden-line removal as a standard feature.
There’s a full changelog up on GitHub, which also notes a few new features for users of the AxiDraw CLI (command-line interface) and AxiDraw Python library, including the ability to resume a plot a little before where it was paused.
But, let’s talk more about hidden-line removal.
Above are a couple of objects drawn in Inkscape: Some overlapping circles and open contours. All of these objects have fill properties applied, and all but the middle circle also have a stroke property applied. The stroke shows the thing that we want to draw, and the fills, white or in color, obscure places where we don’t want to draw.
Historically, the AxiDraw software and its antecedents like the EggBot have ignored all fills, and drawn all paths that appear in the document, which will give a plot something like the following, as rendered with the AxiDraw preview mode:
Now, once you enable the new hidden-line removal option, the plot preview renders as follows:
There is some subtlety to how this works. And, this is a big change, so the feature is off by default. The original behavior is to plot all paths. The new behavior, when hidden-line removal is enabled, is to plot paths only if (1) they do have a stroke applied to them, and (2) they are not occluded behind filled objects. An object that does not have a stroke property will not plot, nor will one hidden behind a solid fill.
Let’s look at a more complex document:
This document has a rectangular outline, a background with a grid of regular crisscrossing lines, a heavy layer of scribbles above that, and then white shapes over that background, with a border inset into each white shape. It also has an outer “frame” that clips the scribbles to stay within the rectangular outline.
With hidden-line removal disabled — when only the outline and inset border of those white shapes is drawn — that previews as follows:
Here, it is barely possible to make out the original shapes. If you look closely, you may be able to see those shape outlines and borders, but they are essentially lost in the scribbling.
But now, turning on hidden-line removal and plotting the document, we get the following neat result:
This plot was drawn on paper with a ballpoint pen. A couple of paths on this plot, the outer rectangular frame and the borders into the white shapes, were plotted with several passes of the pen in order to get darker paths on those parts alone.
AxiDraw software 3.9 is available now on our documentation wiki. The hidden-line removal feature is also available using the “hiding” option in both the AxiDraw CLI and Python API.