mirror of https://github.com/KLayout/klayout.git
parent
8da373e9ad
commit
c021a1834c
|
|
@ -1732,7 +1732,7 @@ DXFReader::read_entities (db::Layout &layout, db::Cell &cell, const db::DVector
|
||||||
|
|
||||||
std::vector<double> knots;
|
std::vector<double> knots;
|
||||||
std::vector<std::pair<db::DPoint, double> > control_points;
|
std::vector<std::pair<db::DPoint, double> > control_points;
|
||||||
db::DPoint pc;
|
std::vector<double> weights;
|
||||||
double ex = 0.0, ey = 0.0, ez = 1.0;
|
double ex = 0.0, ey = 0.0, ez = 1.0;
|
||||||
|
|
||||||
std::string layer;
|
std::string layer;
|
||||||
|
|
@ -1771,12 +1771,7 @@ DXFReader::read_entities (db::Layout &layout, db::Cell &cell, const db::DVector
|
||||||
} else if (g == 40) {
|
} else if (g == 40) {
|
||||||
knots.push_back (read_double ());
|
knots.push_back (read_double ());
|
||||||
} else if (g == 41) {
|
} else if (g == 41) {
|
||||||
|
weights.push_back (read_double ());
|
||||||
// weight of the control point
|
|
||||||
if (! control_points.empty ()) {
|
|
||||||
control_points.back ().second = read_double ();
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (g == 210) {
|
} else if (g == 210) {
|
||||||
ex = read_double ();
|
ex = read_double ();
|
||||||
} else if (g == 220) {
|
} else if (g == 220) {
|
||||||
|
|
@ -1788,6 +1783,10 @@ DXFReader::read_entities (db::Layout &layout, db::Cell &cell, const db::DVector
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (size_t i = 0; i < weights.size () && i < control_points.size (); ++i) {
|
||||||
|
control_points [i].second = weights [i];
|
||||||
|
}
|
||||||
|
|
||||||
db::DCplxTrans tt = global_trans (offset, ex, ey, ez);
|
db::DCplxTrans tt = global_trans (offset, ex, ey, ez);
|
||||||
|
|
||||||
std::pair <bool, unsigned int> ll = open_layer (layout, layer);
|
std::pair <bool, unsigned int> ll = open_layer (layout, layer);
|
||||||
|
|
|
||||||
|
|
@ -506,3 +506,12 @@ TEST(33)
|
||||||
opt.polyline_mode = 2;
|
opt.polyline_mode = 2;
|
||||||
run_test (_this, "t33.dxf.gz", "t33e_au.gds.gz", opt);
|
run_test (_this, "t33.dxf.gz", "t33e_au.gds.gz", opt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// issue #1173
|
||||||
|
TEST(34)
|
||||||
|
{
|
||||||
|
db::DXFReaderOptions opt;
|
||||||
|
opt.polyline_mode = 3;
|
||||||
|
|
||||||
|
run_test_public (_this, "issue_1173.dxf", "issue_1173_au.gds.gz", opt);
|
||||||
|
}
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Loading…
Reference in New Issue