diff options
author | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-07-23 16:00:38 (GMT) |
---|---|---|
committer | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-07-23 16:00:38 (GMT) |
commit | f158370f5ef5745c273f2f47c57b77d1fcc2f0db (patch) | |
tree | 3051b31f73816d6062f12cf6ed4bb269b83dc077 /dxflinextrude.cc | |
parent | 7516cd5e8150e7f6850179ace35622b186237401 (diff) |
Clifford Wolf:
Fixed dxf caching
Fixed dxf unsupported entity reporting
Fixed dumping of vector expressions
git-svn-id: http://svn.clifford.at/openscad/trunk@70 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'dxflinextrude.cc')
-rw-r--r-- | dxflinextrude.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/dxflinextrude.cc b/dxflinextrude.cc index 3fb1ece..09d98d1 100644 --- a/dxflinextrude.cc +++ b/dxflinextrude.cc @@ -22,6 +22,10 @@ #include "openscad.h" +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> + class DxfLinearExtrudeModule : public AbstractModule { public: @@ -176,11 +180,13 @@ QString DxfLinearExtrudeNode::dump(QString indent) const { if (dump_cache.isEmpty()) { QString text; - text.sprintf("dxf_linear_extrude(file = \"%s\", layer = \"%s\", height = %f, " - "origin = [ %f %f ], scale = %f, " - "$fn = %f, $fa = %f, $fs = %f);\n", - filename.toAscii().data(), layername.toAscii().data(), - height, 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_linear_extrude(file = \"%s\", cache = \"%x.%x\", layer = \"%s\", height = %f, " + "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(), height, origin_x, origin_y, scale, fn, fs, fa); ((AbstractNode*)this)->dump_cache = indent + QString("n%1: ").arg(idx) + text; } return dump_cache; |