diff options
author | kintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c> | 2010-01-15 18:36:53 (GMT) |
---|---|---|
committer | kintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c> | 2010-01-15 18:36:53 (GMT) |
commit | f97f0258a4c0f5876e3c02c5b46bfcf713c1e8b5 (patch) | |
tree | 68f869f0a6bf675e5f24e53cc87bc045d3481691 /primitives.cc | |
parent | 71bc0ed97e431dbcfd407d985c866475552f735f (diff) |
Make CSG tree dumps more readable
git-svn-id: http://svn.clifford.at/openscad/trunk@320 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'primitives.cc')
-rw-r--r-- | primitives.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/primitives.cc b/primitives.cc index 95bd3b8..2f50578 100644 --- a/primitives.cc +++ b/primitives.cc @@ -509,17 +509,17 @@ QString PrimitiveNode::dump(QString indent) const if (dump_cache.isEmpty()) { QString text; if (type == CUBE) - text.sprintf("cube(size = [%f, %f, %f], center = %s);\n", x, y, z, center ? "true" : "false"); + text.sprintf("cube(size = [%g, %g, %g], center = %s);\n", x, y, z, center ? "true" : "false"); if (type == SPHERE) - text.sprintf("sphere($fn = %f, $fa = %f, $fs = %f, r = %f);\n", fn, fa, fs, r1); + text.sprintf("sphere($fn = %g, $fa = %g, $fs = %g, r = %g);\n", fn, fa, fs, r1); if (type == CYLINDER) - text.sprintf("cylinder($fn = %f, $fa = %f, $fs = %f, h = %f, r1 = %f, r2 = %f, center = %s);\n", fn, fa, fs, h, r1, r2, center ? "true" : "false"); + text.sprintf("cylinder($fn = %g, $fa = %g, $fs = %g, h = %g, r1 = %g, r2 = %g, center = %s);\n", fn, fa, fs, h, r1, r2, center ? "true" : "false"); if (type == POLYHEDRON) text.sprintf("polyhedron(points = %s, triangles = %s, convexity = %d);\n", points.dump().toAscii().data(), triangles.dump().toAscii().data(), convexity); if (type == SQUARE) - text.sprintf("square(size = [%f, %f], center = %s);\n", x, y, center ? "true" : "false"); + text.sprintf("square(size = [%g, %g], center = %s);\n", x, y, center ? "true" : "false"); if (type == CIRCLE) - text.sprintf("circle($fn = %f, $fa = %f, $fs = %f, r = %f);\n", fn, fa, fs, r1); + text.sprintf("circle($fn = %g, $fa = %g, $fs = %g, r = %g);\n", fn, fa, fs, r1); if (type == POLYGON) text.sprintf("polygon(points = %s, paths = %s, convexity = %d);\n", points.dump().toAscii().data(), paths.dump().toAscii().data(), convexity); ((AbstractNode*)this)->dump_cache = indent + QString("n%1: ").arg(idx) + text; |