summaryrefslogtreecommitdiff
path: root/transform.cc
diff options
context:
space:
mode:
authorclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-06-27 07:31:40 (GMT)
committerclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2009-06-27 07:31:40 (GMT)
commite8218ae0c73e6963362181df6c5736a4eef0900c (patch)
treecc64c028bc516690d4331cd31b438abdd1d2062b /transform.cc
parent75e51ea1b2f6de1b3c0520dc5ce23b0f40aca970 (diff)
Clifford Wolf:
Many cleanups git-svn-id: http://svn.clifford.at/openscad/trunk@32 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'transform.cc')
-rw-r--r--transform.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/transform.cc b/transform.cc
index 7ebce98..5951a70 100644
--- a/transform.cc
+++ b/transform.cc
@@ -100,9 +100,11 @@ AbstractNode *TransformModule::evaluate(const Context *ctx, const QVector<QStrin
}
if (val_v.type == Value::VECTOR) {
- x = val_v.x; y = val_v.y; z = val_v.z;
- double sn = 1.0 / sqrt(x*x + y*y + z*z);
- x *= sn; y *= sn; z *= sn;
+ if (val_v.x != 0.0 || val_v.y != 0.0 || val_v.z != 0.0) {
+ x = val_v.x; y = val_v.y; z = val_v.z;
+ double sn = 1.0 / sqrt(x*x + y*y + z*z);
+ x *= sn; y *= sn; z *= sn;
+ }
}
double c = cos(a*M_PI/180.0);
contact: Jan Huwald // Impressum