summaryrefslogtreecommitdiff
path: root/dxfrotextrude.cc
diff options
context:
space:
mode:
Diffstat (limited to 'dxfrotextrude.cc')
-rw-r--r--dxfrotextrude.cc16
1 files changed, 11 insertions, 5 deletions
diff --git a/dxfrotextrude.cc b/dxfrotextrude.cc
index 3bb1ccd..a622b91 100644
--- a/dxfrotextrude.cc
+++ b/dxfrotextrude.cc
@@ -22,6 +22,10 @@
#include "openscad.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
class DxfRotateExtrudeModule : public AbstractModule
{
public:
@@ -154,11 +158,13 @@ QString DxfRotateExtrudeNode::dump(QString indent) const
{
if (dump_cache.isEmpty()) {
QString text;
- text.sprintf("dxf_rotate_extrude(file = \"%s\", layer = \"%s\", "
- "origin = [ %f %f ], scale = %f, "
- "$fn = %f, $fa = %f, $fs = %f);\n",
- filename.toAscii().data(), layername.toAscii().data(),
- origin_x, origin_y, scale, fn, fs, fa);
+ struct stat st;
+ memset(&st, 0, sizeof(struct stat));
+ stat(filename.toAscii().data(), &st);
+ text.sprintf("dxf_rotate_extrude(file = \"%s\", cache = \"%x.%x\", layer = \"%s\", "
+ "origin = [ %f %f ], scale = %f, $fn = %f, $fa = %f, $fs = %f);\n",
+ filename.toAscii().data(), (int)st.st_mtime, (int)st.st_size,
+ layername.toAscii().data(), origin_x, origin_y, scale, fn, fs, fa);
((AbstractNode*)this)->dump_cache = indent + QString("n%1: ").arg(idx) + text;
}
return dump_cache;
contact: Jan Huwald // Impressum