diff options
author | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-06-23 10:31:25 (GMT) |
---|---|---|
committer | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-06-23 10:31:25 (GMT) |
commit | 9271046a02c5e8b62a9ed92e914ab6cf30938fc7 (patch) | |
tree | deb469a4f6787224ec84f74052eaec7c02e484ff /csg.cc | |
parent | 4480b67f960af29106e66d1c24e211cf4368f33b (diff) |
Clifford Wolf:
Cleanups and improvements: values and expressions
Avoid unnaccesary nodes in csg tree
git-svn-id: http://svn.clifford.at/openscad/trunk@11 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'csg.cc')
-rw-r--r-- | csg.cc | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -47,6 +47,9 @@ public: AbstractNode *CsgModule::evaluate(const Context*, const QVector<QString>&, const QVector<Value>&, const QVector<AbstractNode*> child_nodes) const { + if (child_nodes.size() == 1) + return child_nodes[0]; + CsgNode *node = new CsgNode(type); foreach (AbstractNode *v, child_nodes) node->children.append(v); |