$ git clone http://gcodetool.ion.nu/gcodetool.git
commit 5baca5dfb7c92f226dd9a74a90b634900a78b82f
Author: Alicia <...>
Date:   Mon Oct 7 00:48:42 2019 +0200

    Fixed an issue affecting rotation on the Z axis in the preview subcommand.

diff --git a/preview.c b/preview.c
index 5bd393a..bfa9f81 100644
--- a/preview.c
+++ b/preview.c
@@ -150,7 +150,7 @@ struct line line;
 struct line* l=&line;
 l->y[0]=sin(zrot)*cy(oldl->y[0])+cos(zrot)*cx(oldl->x[0]);
 l->x[0]=sin(zrot+M_PI_2)*cy(oldl->y[0])+cos(zrot+M_PI_2)*cx(oldl->x[0]);
-l->y[1]=sin(zrot)*cy(oldl->y[1])+cx(cos(zrot)*oldl->x[1]);
+l->y[1]=sin(zrot)*cy(oldl->y[1])+cos(zrot)*cx(oldl->x[1]);
 l->x[1]=sin(zrot+M_PI_2)*cy(oldl->y[1])+cos(zrot+M_PI_2)*cx(oldl->x[1]);
 l->y[0]=l->y[0]*cos(angle)+vectors.layers[i].z*scale*sin(angle);
 l->y[1]=l->y[1]*cos(angle)+vectors.layers[i].z*scale*sin(angle);