summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2010-01-26 22:50:26 (GMT)
committerkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2010-01-26 22:50:26 (GMT)
commitba8ede685812fae884beb6fca8e9f2ac3ed93897 (patch)
tree676067066b9c93f6cf5831b020d79849332a660d
parent75f16903a09a80ad9a22ccb7d0b90591b7b780a2 (diff)
bugfix: block inserts with scale param to import_dxf() was broken in general, including a second bug for arc/ellipse/circle inserts
git-svn-id: http://svn.clifford.at/openscad/trunk@354 b57f626f-c46c-0410-a088-ec61d464b74c
-rw-r--r--dxfdata.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/dxfdata.cc b/dxfdata.cc
index 90e3253..bc218b2 100644
--- a/dxfdata.cc
+++ b/dxfdata.cc
@@ -230,10 +230,10 @@ DxfData::DxfData(double fn, double fs, double fa, QString filename, QString laye
double ly1 = blockdata[iddata][i].p[0]->y * ellipse_stop_angle;
double lx2 = blockdata[iddata][i].p[1]->x * ellipse_start_angle;
double ly2 = blockdata[iddata][i].p[1]->y * ellipse_stop_angle;
- double px1 = cos(a)*lx1 - sin(a)*ly1 + xverts[0];
- double py1 = sin(a)*lx1 + cos(a)*ly1 + yverts[0];
- double px2 = cos(a)*lx2 - sin(a)*ly2 + xverts[0];
- double py2 = sin(a)*lx2 + cos(a)*ly2 + yverts[0];
+ double px1 = (cos(a)*lx1 - sin(a)*ly1) * scale + xverts[0];
+ double py1 = (sin(a)*lx1 + cos(a)*ly1) * scale + yverts[0];
+ double px2 = (cos(a)*lx2 - sin(a)*ly2) * scale + xverts[0];
+ double py2 = (sin(a)*lx2 + cos(a)*ly2) * scale + yverts[0];
ADD_LINE(px1, py1, px2, py2);
}
}
@@ -313,7 +313,8 @@ DxfData::DxfData(double fn, double fs, double fa, QString filename, QString laye
// CIRCLE, ARC: radius
// ELLIPSE: minor to major ratio
// DIMENSION (radial, diameter): Leader length
- radius = data.toDouble() * scale;
+ radius = data.toDouble();
+ if (!in_blocks_section) radius *= scale;
break;
case 41:
// ELLIPSE: start_angle
contact: Jan Huwald // Impressum