From 32ba5ee6354387765c94120ac6f44a5e1ce5acb1 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Fri, 28 Jul 2017 00:19:39 +0200 Subject: [PATCH] Some fixes for OASIS reader - Allow full 32bit for box width and height and some other properties (for border case testing - not recommended) - Reduce arrays with step distance 0 to dimension 1 - avoids overlapping instances or shapes. --- src/db/dbOASISReader.cc | 83 ++++++++++++---------- src/db/dbOASISReader.h | 11 +-- src/unit_tests/dbOASISReader.cc | 122 ++++++++++++++++---------------- src/unit_tests/dbOASISWriter.cc | 10 +-- testdata/oasis/t11.4.oas | Bin 533 -> 533 bytes testdata/oasis/t11.4.ot | 2 +- testdata/oasis/t3.1.oas | Bin 499 -> 501 bytes testdata/oasis/t3.1.ot | 42 +++++------ testdata/oasis/t3.2.oas | Bin 492 -> 494 bytes testdata/oasis/t3.2.ot | 42 +++++------ testdata/oasis/t3.5.oas | Bin 490 -> 492 bytes testdata/oasis/t3.5.ot | 42 +++++------ 12 files changed, 182 insertions(+), 172 deletions(-) diff --git a/src/db/dbOASISReader.cc b/src/db/dbOASISReader.cc index a3048f24e..5d3800f9d 100644 --- a/src/db/dbOASISReader.cc +++ b/src/db/dbOASISReader.cc @@ -367,6 +367,18 @@ OASISReader::get_ucoord (unsigned long grid) return db::Coord (lx); } +OASISReader::distance_type +OASISReader::get_ucoord_as_distance (unsigned long grid) +{ + unsigned long long lx = 0; + get (lx); + lx *= grid; + if (lx > (unsigned long long) (std::numeric_limits ::max ())) { + error (tl::to_string (QObject::tr ("Coordinate value overflow"))); + } + return distance_type (lx); +} + db::Coord OASISReader::get_coord (long grid) { @@ -1707,7 +1719,7 @@ OASISReader::read_repetition () db::Coord dx = get_ucoord (); db::Coord dy = get_ucoord (); - mm_repetition = new RegularRepetition (db::Vector (dx, 0), db::Vector (0, dy), nx + 2, ny + 2); + mm_repetition = new RegularRepetition (db::Vector (dx, 0), db::Vector (0, dy), dx == 0 ? 1 : nx + 2, dy == 0 ? 1 : ny + 2); } else if (type == 2) { @@ -1716,7 +1728,7 @@ OASISReader::read_repetition () db::Coord dx = get_ucoord (); - mm_repetition = new RegularRepetition (db::Vector (dx, 0), db::Vector (0, 0), nx + 2, 1); + mm_repetition = new RegularRepetition (db::Vector (dx, 0), db::Vector (0, 0), dx == 0 ? 1 : nx + 2, 1); } else if (type == 3) { @@ -1725,7 +1737,7 @@ OASISReader::read_repetition () db::Coord dy = get_ucoord (); - mm_repetition = new RegularRepetition (db::Vector (0, 0), db::Vector (0, dy), 1, ny + 2); + mm_repetition = new RegularRepetition (db::Vector (0, 0), db::Vector (0, dy), 1, dy == 0 ? 1 : ny + 2); } else if (type == 4 || type == 5) { @@ -1744,8 +1756,11 @@ OASISReader::read_repetition () db::Coord x = 0; for (unsigned long i = 0; i <= n; ++i) { - x += get_ucoord (lgrid); - rep->push_back (db::Vector (x, 0)); + db::Coord d = get_ucoord (lgrid); + if (d != 0) { + x += d; + rep->push_back (db::Vector (x, 0)); + } } } else if (type == 6 || type == 7) { @@ -1763,10 +1778,13 @@ OASISReader::read_repetition () rep->reserve (n + 1); - db::Coord x = 0; + db::Coord y = 0; for (unsigned long i = 0; i <= n; ++i) { - x += get_ucoord (lgrid); - rep->push_back (db::Vector (0, x)); + db::Coord d = get_ucoord (lgrid); + if (d != 0) { + y += d; + rep->push_back (db::Vector (0, y)); + } } } else if (type == 8) { @@ -1778,7 +1796,7 @@ OASISReader::read_repetition () db::Vector dn = get_gdelta (); db::Vector dm = get_gdelta (); - mm_repetition = new RegularRepetition (dn, dm, n + 2, m + 2); + mm_repetition = new RegularRepetition (dn, dm, dn == db::Vector () ? 1 : n + 2, dm == db::Vector () ? 1 : m + 2); } else if (type == 9) { @@ -1786,9 +1804,9 @@ OASISReader::read_repetition () get (n); db::Vector dn = get_gdelta (); - mm_repetition = new RegularRepetition (dn, db::Vector (0, 0), n + 2, 1); + mm_repetition = new RegularRepetition (dn, db::Vector (0, 0), dn == db::Vector () ? 1 : n + 2, 1); - } else if (type == 10) { + } else if (type == 10 || type == 11) { IrregularRepetition *rep = new IrregularRepetition (); mm_repetition = rep; @@ -1796,31 +1814,20 @@ OASISReader::read_repetition () unsigned long n = 0; get (n); - rep->reserve (n + 1); - - db::Vector p; - for (unsigned long i = 0; i <= n; ++i) { - p += get_gdelta (); - rep->push_back (p); + unsigned long grid = 1; + if (type == 11) { + get (grid); } - } else if (type == 11) { - - IrregularRepetition *rep = new IrregularRepetition (); - mm_repetition = rep; - - unsigned long n = 0; - get (n); - - unsigned long grid = 0; - get (grid); - rep->reserve (n + 1); db::Vector p; for (unsigned long i = 0; i <= n; ++i) { - p += get_gdelta (grid); - rep->push_back (db::Vector (p.x (), p.y ())); + db::Vector d = get_gdelta (grid); + if (d != db::Vector ()) { + p += d; + rep->push_back (p); + } } } else { @@ -2236,13 +2243,13 @@ OASISReader::do_read_rectangle (bool xy_absolute, } if (m & 0x40) { - mm_geometry_w = get_ucoord (); + mm_geometry_w = get_ucoord_as_distance (); } if (m & 0x80) { mm_geometry_h = mm_geometry_w; // TODO: really? } else { if (m & 0x20) { - mm_geometry_h = get_ucoord (); + mm_geometry_h = get_ucoord_as_distance (); } } @@ -2505,7 +2512,7 @@ OASISReader::do_read_path (bool xy_absolute, db::cell_index_type cell_index, db: } if (m & 0x40) { - mm_path_halfwidth = get_ucoord (); + mm_path_halfwidth = get_ucoord_as_distance (); } if (m & 0x80) { @@ -2678,11 +2685,11 @@ OASISReader::do_read_trapezoid (unsigned char r, bool xy_absolute,db::cell_index } if (m & 0x40) { - mm_geometry_w = get_ucoord (); + mm_geometry_w = get_ucoord_as_distance (); } if (m & 0x20) { - mm_geometry_h = get_ucoord (); + mm_geometry_h = get_ucoord_as_distance (); } db::Coord delta_a = 0, delta_b = 0; @@ -2843,11 +2850,11 @@ OASISReader::do_read_ctrapezoid (bool xy_absolute,db::cell_index_type cell_index } if (m & 0x40) { - mm_geometry_w = get_ucoord (); + mm_geometry_w = get_ucoord_as_distance (); } if (m & 0x20) { - mm_geometry_h = get_ucoord (); + mm_geometry_h = get_ucoord_as_distance (); } if (m & 0x10) { @@ -3200,7 +3207,7 @@ OASISReader::do_read_circle (bool xy_absolute, db::cell_index_type cell_index, d } if (m & 0x20) { - mm_circle_radius = get_ucoord (); + mm_circle_radius = get_ucoord_as_distance (); } if (m & 0x10) { diff --git a/src/db/dbOASISReader.h b/src/db/dbOASISReader.h index 0733a9473..f5b308351 100644 --- a/src/db/dbOASISReader.h +++ b/src/db/dbOASISReader.h @@ -189,6 +189,8 @@ public: private: friend class OASISReaderLayerMapping; + typedef db::coord_traits::distance_type distance_type; + enum TableMode { NotInTable, @@ -233,15 +235,15 @@ private: modal_variable mm_text_string_id; modal_variable mm_geometry_x; modal_variable mm_geometry_y; - modal_variable mm_geometry_w; - modal_variable mm_geometry_h; + modal_variable mm_geometry_w; + modal_variable mm_geometry_h; modal_variable< std::vector > mm_polygon_point_list; - modal_variable mm_path_halfwidth; + modal_variable mm_path_halfwidth; modal_variable mm_path_start_extension; modal_variable mm_path_end_extension; modal_variable< std::vector > mm_path_point_list; modal_variable mm_ctrapezoid_type; - modal_variable mm_circle_radius; + modal_variable mm_circle_radius; modal_variable mm_last_property_name; modal_variable mm_last_property_is_sprop; modal_variable mm_last_value_list; @@ -362,6 +364,7 @@ private: db::Vector get_2delta (long grid = 1); db::Coord get_coord (long grid = 1); db::Coord get_ucoord (unsigned long grid = 1); + distance_type get_ucoord_as_distance (unsigned long grid = 1); std::pair open_dl (db::Layout &layout, const LDPair &dl, bool create); }; diff --git a/src/unit_tests/dbOASISReader.cc b/src/unit_tests/dbOASISReader.cc index df63164fb..9d9e8f247 100644 --- a/src/unit_tests/dbOASISReader.cc +++ b/src/unit_tests/dbOASISReader.cc @@ -619,7 +619,7 @@ TEST(11_4) "set props {\n" " {10 {Property string value for ID 13}}\n" "}\n" - "srefp $props {A} 0 0 1 {0 400}\n" + "srefp $props {A} 0 0 1 {0 200}\n" "set props {\n" " {10 {Property string value for ID 13}}\n" "}\n" @@ -1721,11 +1721,11 @@ TEST(3_1) "text 2 1 0 0 {310 -2900} {TEXT_ABC}\n" "text 2 1 0 0 {310 -2890} {TEXT_ABC}\n" "text 2 1 0 0 {300 -2890} {TEXT_ABC}\n" - "text 2 1 0 0 {300 -2900} {TEXT_ABC}\n" - "text 2 1 0 0 {310 -2890} {TEXT_ABC}\n" - "text 2 1 0 0 {300 -2880} {TEXT_ABC}\n" - "text 2 1 0 0 {290 -2890} {TEXT_ABC}\n" - "text 2 1 0 0 {300 -2900} {TEXT_ABC}\n" + "text 2 1 0 0 {300 -2930} {TEXT_ABC}\n" + "text 2 1 0 0 {310 -2920} {TEXT_ABC}\n" + "text 2 1 0 0 {300 -2910} {TEXT_ABC}\n" + "text 2 1 0 0 {290 -2920} {TEXT_ABC}\n" + "text 2 1 0 0 {310 -2940} {TEXT_ABC}\n" "text 2 1 0 0 {300 -3100} {TEXT_ABC}\n" "text 2 1 0 0 {289 -3088} {TEXT_ABC}\n" "text 2 1 0 0 {299 -3098} {TEXT_ABC}\n" @@ -1733,11 +1733,11 @@ TEST(3_1) "text 2 1 0 0 {310 -3300} {TEXT_ABC}\n" "text 2 1 0 0 {310 -3290} {TEXT_ABC}\n" "text 2 1 0 0 {300 -3290} {TEXT_ABC}\n" - "text 2 1 0 0 {300 -3300} {TEXT_ABC}\n" - "text 2 1 0 0 {310 -3290} {TEXT_ABC}\n" - "text 2 1 0 0 {300 -3280} {TEXT_ABC}\n" - "text 2 1 0 0 {290 -3290} {TEXT_ABC}\n" - "text 2 1 0 0 {300 -3300} {TEXT_ABC}\n" + "text 2 1 0 0 {300 -3330} {TEXT_ABC}\n" + "text 2 1 0 0 {310 -3320} {TEXT_ABC}\n" + "text 2 1 0 0 {300 -3310} {TEXT_ABC}\n" + "text 2 1 0 0 {290 -3320} {TEXT_ABC}\n" + "text 2 1 0 0 {310 -3340} {TEXT_ABC}\n" "text 2 1 0 0 {300 -3500} {TEXT_ABC}\n" "text 2 1 0 0 {288 -3488} {TEXT_ABC}\n" "text 2 1 0 0 {297 -3497} {TEXT_ABC}\n" @@ -1832,11 +1832,11 @@ TEST(3_1) "text 2 1 0 0 {310 -2900} {TEXT_ABC}\n" "text 2 1 0 0 {310 -2890} {TEXT_ABC}\n" "text 2 1 0 0 {300 -2890} {TEXT_ABC}\n" - "text 2 1 0 0 {300 -2900} {TEXT_ABC}\n" - "text 2 1 0 0 {310 -2890} {TEXT_ABC}\n" - "text 2 1 0 0 {300 -2880} {TEXT_ABC}\n" - "text 2 1 0 0 {290 -2890} {TEXT_ABC}\n" - "text 2 1 0 0 {300 -2900} {TEXT_ABC}\n" + "text 2 1 0 0 {300 -2930} {TEXT_ABC}\n" + "text 2 1 0 0 {310 -2920} {TEXT_ABC}\n" + "text 2 1 0 0 {300 -2910} {TEXT_ABC}\n" + "text 2 1 0 0 {290 -2920} {TEXT_ABC}\n" + "text 2 1 0 0 {310 -2940} {TEXT_ABC}\n" "text 2 1 0 0 {300 -3100} {TEXT_ABC}\n" "text 2 1 0 0 {289 -3088} {TEXT_ABC}\n" "text 2 1 0 0 {299 -3098} {TEXT_ABC}\n" @@ -1844,11 +1844,11 @@ TEST(3_1) "text 2 1 0 0 {310 -3300} {TEXT_ABC}\n" "text 2 1 0 0 {310 -3290} {TEXT_ABC}\n" "text 2 1 0 0 {300 -3290} {TEXT_ABC}\n" - "text 2 1 0 0 {300 -3300} {TEXT_ABC}\n" - "text 2 1 0 0 {310 -3290} {TEXT_ABC}\n" - "text 2 1 0 0 {300 -3280} {TEXT_ABC}\n" - "text 2 1 0 0 {290 -3290} {TEXT_ABC}\n" - "text 2 1 0 0 {300 -3300} {TEXT_ABC}\n" + "text 2 1 0 0 {300 -3330} {TEXT_ABC}\n" + "text 2 1 0 0 {310 -3320} {TEXT_ABC}\n" + "text 2 1 0 0 {300 -3310} {TEXT_ABC}\n" + "text 2 1 0 0 {290 -3320} {TEXT_ABC}\n" + "text 2 1 0 0 {310 -3340} {TEXT_ABC}\n" "text 2 1 0 0 {300 -3500} {TEXT_ABC}\n" "text 2 1 0 0 {288 -3488} {TEXT_ABC}\n" "text 2 1 0 0 {297 -3497} {TEXT_ABC}\n" @@ -2279,11 +2279,11 @@ TEST(3_2) "text 2 1 0 0 {310 -2900} {A}\n" "text 2 1 0 0 {310 -2890} {A}\n" "text 2 1 0 0 {300 -2890} {A}\n" - "text 2 1 0 0 {300 -2900} {A}\n" - "text 2 1 0 0 {310 -2890} {A}\n" - "text 2 1 0 0 {300 -2880} {A}\n" - "text 2 1 0 0 {290 -2890} {A}\n" - "text 2 1 0 0 {300 -2900} {A}\n" + "text 2 1 0 0 {300 -2930} {A}\n" + "text 2 1 0 0 {310 -2920} {A}\n" + "text 2 1 0 0 {300 -2910} {A}\n" + "text 2 1 0 0 {290 -2920} {A}\n" + "text 2 1 0 0 {310 -2940} {A}\n" "text 2 1 0 0 {300 -3100} {A}\n" "text 2 1 0 0 {289 -3088} {A}\n" "text 2 1 0 0 {299 -3098} {A}\n" @@ -2291,11 +2291,11 @@ TEST(3_2) "text 2 1 0 0 {310 -3300} {A}\n" "text 2 1 0 0 {310 -3290} {A}\n" "text 2 1 0 0 {300 -3290} {A}\n" - "text 2 1 0 0 {300 -3300} {A}\n" - "text 2 1 0 0 {310 -3290} {A}\n" - "text 2 1 0 0 {300 -3280} {A}\n" - "text 2 1 0 0 {290 -3290} {A}\n" - "text 2 1 0 0 {300 -3300} {A}\n" + "text 2 1 0 0 {300 -3330} {A}\n" + "text 2 1 0 0 {310 -3320} {A}\n" + "text 2 1 0 0 {300 -3310} {A}\n" + "text 2 1 0 0 {290 -3320} {A}\n" + "text 2 1 0 0 {310 -3340} {A}\n" "text 2 1 0 0 {300 -3500} {A}\n" "text 2 1 0 0 {288 -3488} {A}\n" "text 2 1 0 0 {297 -3497} {A}\n" @@ -2390,11 +2390,11 @@ TEST(3_2) "text 2 1 0 0 {310 -2900} {A}\n" "text 2 1 0 0 {310 -2890} {A}\n" "text 2 1 0 0 {300 -2890} {A}\n" - "text 2 1 0 0 {300 -2900} {A}\n" - "text 2 1 0 0 {310 -2890} {A}\n" - "text 2 1 0 0 {300 -2880} {A}\n" - "text 2 1 0 0 {290 -2890} {A}\n" - "text 2 1 0 0 {300 -2900} {A}\n" + "text 2 1 0 0 {300 -2930} {A}\n" + "text 2 1 0 0 {310 -2920} {A}\n" + "text 2 1 0 0 {300 -2910} {A}\n" + "text 2 1 0 0 {290 -2920} {A}\n" + "text 2 1 0 0 {310 -2940} {A}\n" "text 2 1 0 0 {300 -3100} {A}\n" "text 2 1 0 0 {289 -3088} {A}\n" "text 2 1 0 0 {299 -3098} {A}\n" @@ -2402,11 +2402,11 @@ TEST(3_2) "text 2 1 0 0 {310 -3300} {A}\n" "text 2 1 0 0 {310 -3290} {A}\n" "text 2 1 0 0 {300 -3290} {A}\n" - "text 2 1 0 0 {300 -3300} {A}\n" - "text 2 1 0 0 {310 -3290} {A}\n" - "text 2 1 0 0 {300 -3280} {A}\n" - "text 2 1 0 0 {290 -3290} {A}\n" - "text 2 1 0 0 {300 -3300} {A}\n" + "text 2 1 0 0 {300 -3330} {A}\n" + "text 2 1 0 0 {310 -3320} {A}\n" + "text 2 1 0 0 {300 -3310} {A}\n" + "text 2 1 0 0 {290 -3320} {A}\n" + "text 2 1 0 0 {310 -3340} {A}\n" "text 2 1 0 0 {300 -3500} {A}\n" "text 2 1 0 0 {288 -3488} {A}\n" "text 2 1 0 0 {297 -3497} {A}\n" @@ -2574,11 +2574,11 @@ TEST(3_5) "text 2 1 0 0 {310 -2900} {B}\n" "text 2 1 0 0 {310 -2890} {B}\n" "text 2 1 0 0 {300 -2890} {B}\n" - "text 2 1 0 0 {300 -2900} {B}\n" - "text 2 1 0 0 {310 -2890} {B}\n" - "text 2 1 0 0 {300 -2880} {B}\n" - "text 2 1 0 0 {290 -2890} {B}\n" - "text 2 1 0 0 {300 -2900} {B}\n" + "text 2 1 0 0 {300 -2930} {B}\n" + "text 2 1 0 0 {310 -2920} {B}\n" + "text 2 1 0 0 {300 -2910} {B}\n" + "text 2 1 0 0 {290 -2920} {B}\n" + "text 2 1 0 0 {310 -2940} {B}\n" "text 2 1 0 0 {300 -3100} {B}\n" "text 2 1 0 0 {289 -3088} {B}\n" "text 2 1 0 0 {299 -3098} {B}\n" @@ -2586,11 +2586,11 @@ TEST(3_5) "text 2 1 0 0 {310 -3300} {B}\n" "text 2 1 0 0 {310 -3290} {B}\n" "text 2 1 0 0 {300 -3290} {B}\n" - "text 2 1 0 0 {300 -3300} {B}\n" - "text 2 1 0 0 {310 -3290} {B}\n" - "text 2 1 0 0 {300 -3280} {B}\n" - "text 2 1 0 0 {290 -3290} {B}\n" - "text 2 1 0 0 {300 -3300} {B}\n" + "text 2 1 0 0 {300 -3330} {B}\n" + "text 2 1 0 0 {310 -3320} {B}\n" + "text 2 1 0 0 {300 -3310} {B}\n" + "text 2 1 0 0 {290 -3320} {B}\n" + "text 2 1 0 0 {310 -3340} {B}\n" "text 2 1 0 0 {300 -3500} {B}\n" "text 2 1 0 0 {288 -3488} {B}\n" "text 2 1 0 0 {297 -3497} {B}\n" @@ -2685,11 +2685,11 @@ TEST(3_5) "text 2 1 0 0 {310 -2900} {B}\n" "text 2 1 0 0 {310 -2890} {B}\n" "text 2 1 0 0 {300 -2890} {B}\n" - "text 2 1 0 0 {300 -2900} {B}\n" - "text 2 1 0 0 {310 -2890} {B}\n" - "text 2 1 0 0 {300 -2880} {B}\n" - "text 2 1 0 0 {290 -2890} {B}\n" - "text 2 1 0 0 {300 -2900} {B}\n" + "text 2 1 0 0 {300 -2930} {B}\n" + "text 2 1 0 0 {310 -2920} {B}\n" + "text 2 1 0 0 {300 -2910} {B}\n" + "text 2 1 0 0 {290 -2920} {B}\n" + "text 2 1 0 0 {310 -2940} {B}\n" "text 2 1 0 0 {300 -3100} {B}\n" "text 2 1 0 0 {289 -3088} {B}\n" "text 2 1 0 0 {299 -3098} {B}\n" @@ -2697,11 +2697,11 @@ TEST(3_5) "text 2 1 0 0 {310 -3300} {B}\n" "text 2 1 0 0 {310 -3290} {B}\n" "text 2 1 0 0 {300 -3290} {B}\n" - "text 2 1 0 0 {300 -3300} {B}\n" - "text 2 1 0 0 {310 -3290} {B}\n" - "text 2 1 0 0 {300 -3280} {B}\n" - "text 2 1 0 0 {290 -3290} {B}\n" - "text 2 1 0 0 {300 -3300} {B}\n" + "text 2 1 0 0 {300 -3330} {B}\n" + "text 2 1 0 0 {310 -3320} {B}\n" + "text 2 1 0 0 {300 -3310} {B}\n" + "text 2 1 0 0 {290 -3320} {B}\n" + "text 2 1 0 0 {310 -3340} {B}\n" "text 2 1 0 0 {300 -3500} {B}\n" "text 2 1 0 0 {288 -3488} {B}\n" "text 2 1 0 0 {297 -3497} {B}\n" diff --git a/src/unit_tests/dbOASISWriter.cc b/src/unit_tests/dbOASISWriter.cc index 76b83ec20..b1f292b9d 100644 --- a/src/unit_tests/dbOASISWriter.cc +++ b/src/unit_tests/dbOASISWriter.cc @@ -575,12 +575,12 @@ TEST(100) "begin_cell {$4}\n" "end_cell\n" "begin_cell {$3}\n" - "sref {$4} 90 1 1 {-10 20}\n" "sref {$1} 90 1 1 {-10 20}\n" + "sref {$4} 90 1 1 {-10 20}\n" "end_cell\n" "begin_cell {$2}\n" - "sref {$3} 90 1 1 {-10 20}\n" "sref {$1} 90 1 1 {-10 20}\n" + "sref {$3} 90 1 1 {-10 20}\n" "box 2 0 {0 -100} {2000 2200}\n" "end_cell\n" "end_lib\n" @@ -734,8 +734,8 @@ TEST(102) "sref {$1} 90 1 1 {-10 20}\n" "end_cell\n" "begin_cell {$2}\n" - "sref {$3} 90 1 1 {-10 20}\n" "sref {$1} 90 1 1 {-10 20}\n" + "sref {$3} 90 1 1 {-10 20}\n" "end_cell\n" "end_lib\n" ; @@ -1165,9 +1165,9 @@ TEST(114) const char *expected = "begin_lib 0.001\n" "begin_cell {$1}\n" - "path 1 0 0 0 0 {0 100} {0 1200}\n" "path 1 0 0 0 0 {0 1200} {1000 1200}\n" "path 1 0 0 0 0 {0 100} {1000 1200}\n" + "path 1 0 0 0 0 {0 100} {0 1200}\n" "end_cell\n" "end_lib\n" ; @@ -1245,9 +1245,9 @@ TEST(115) " {42 {42}}\n" "}\n" "begin_cellp $props {$1}\n" - "path 1 0 0 0 0 {0 100} {0 1200}\n" "path 1 0 0 0 0 {0 1200} {1000 1200}\n" "path 1 0 0 0 0 {0 100} {1000 1200}\n" + "path 1 0 0 0 0 {0 100} {0 1200}\n" "end_cell\n" "end_lib\n" ; diff --git a/testdata/oasis/t11.4.oas b/testdata/oasis/t11.4.oas index b7050a6a969462524eb00500789b75ab6ff55709..fc374952eb26d91b56e99303da9eb0ce3453ee80 100644 GIT binary patch delta 13 VcmbQrGL>b*RHg~c8>iPX0stWx1hfDE delta 13 VcmbQrGL>b*RHg-N8>iPX0stY01jhgX diff --git a/testdata/oasis/t11.4.ot b/testdata/oasis/t11.4.ot index b7abc85f0..2bf767e8e 100644 --- a/testdata/oasis/t11.4.ot +++ b/testdata/oasis/t11.4.ot @@ -63,7 +63,7 @@ record PROPERTY uint 17 ;# PLACEMENT (no mag, manhattan angles) bits 00110000 ;# CNXYRAAF int 0 ;# placement-x - int 400 ;# placement-y + int 200 ;# placement-y record PROPERTY bits 11110001 ;# property info byte UUUUVCNS diff --git a/testdata/oasis/t3.1.oas b/testdata/oasis/t3.1.oas index 105476e411e010d80c44199f7747a9bae2faa8b8..c78646d3de3c040eeed606ddce9c74a1bc4a40e5 100644 GIT binary patch delta 32 ocmey&{FQmaF|Ib&6^yGG*D#)Ans`Bk{TNe3RLnZYjW4+v0oL3MQ2+n{ delta 30 mcmey${F!;eF|K8dD;QTXu3=oqIProAYgj~7Ox(uTT#Nv|Jqw8d diff --git a/testdata/oasis/t3.1.ot b/testdata/oasis/t3.1.ot index 989961ba1..b1ff2cf45 100644 --- a/testdata/oasis/t3.1.ot +++ b/testdata/oasis/t3.1.ot @@ -10,6 +10,7 @@ # begin_lib 0.001 # begin_cell {ABC} # text 1 2 0 0 {100 -200} {TEXT_ABC} +# text 2 1 0 0 {200 -400} {TEXT_ABC} # text 2 1 0 0 {300 -400} {TEXT_ABC} # text 2 1 0 0 {300 -300} {TEXT_ABC} # text 2 1 0 0 {300 -500} {TEXT_ABC} @@ -54,12 +55,11 @@ # text 2 1 0 0 {300 -1700} {TEXT_ABC} # text 2 1 0 0 {300 -1690} {TEXT_ABC} # text 2 1 0 0 {300 -1679} {TEXT_ABC} +# text 2 1 0 0 {300 -1900} {TEXT_ABC} # text 2 1 0 0 {300 -1890} {TEXT_ABC} # text 2 1 0 0 {300 -1875} {TEXT_ABC} -# text 2 1 0 0 {200 -400} {TEXT_ABC} -# text 2 1 0 0 {267 -2136} {TEXT_ABC} -# text 2 1 0 0 {270 -2270} {TEXT_ABC} -# text 2 1 0 0 {270 -2670} {TEXT_ABC} +# text 2 1 0 0 {300 -2100} {TEXT_ABC} +# text 2 1 0 0 {310 -2100} {TEXT_ABC} # text 2 1 0 0 {320 -2100} {TEXT_ABC} # text 2 1 0 0 {289 -2112} {TEXT_ABC} # text 2 1 0 0 {299 -2112} {TEXT_ABC} @@ -67,7 +67,7 @@ # text 2 1 0 0 {278 -2124} {TEXT_ABC} # text 2 1 0 0 {288 -2124} {TEXT_ABC} # text 2 1 0 0 {298 -2124} {TEXT_ABC} -# text 2 1 0 0 {300 -1900} {TEXT_ABC} +# text 2 1 0 0 {267 -2136} {TEXT_ABC} # text 2 1 0 0 {277 -2136} {TEXT_ABC} # text 2 1 0 0 {287 -2136} {TEXT_ABC} # text 2 1 0 0 {300 -2300} {TEXT_ABC} @@ -79,7 +79,7 @@ # text 2 1 0 0 {280 -2280} {TEXT_ABC} # text 2 1 0 0 {291 -2268} {TEXT_ABC} # text 2 1 0 0 {302 -2256} {TEXT_ABC} -# text 2 1 0 0 {300 -2100} {TEXT_ABC} +# text 2 1 0 0 {270 -2270} {TEXT_ABC} # text 2 1 0 0 {281 -2258} {TEXT_ABC} # text 2 1 0 0 {292 -2246} {TEXT_ABC} # text 2 1 0 0 {300 -2500} {TEXT_ABC} @@ -88,16 +88,16 @@ # text 2 1 0 0 {300 -2700} {TEXT_ABC} # text 2 1 0 0 {290 -2690} {TEXT_ABC} # text 2 1 0 0 {280 -2680} {TEXT_ABC} -# text 2 1 0 0 {310 -2100} {TEXT_ABC} +# text 2 1 0 0 {270 -2670} {TEXT_ABC} # text 2 1 0 0 {300 -2900} {TEXT_ABC} # text 2 1 0 0 {310 -2900} {TEXT_ABC} # text 2 1 0 0 {310 -2890} {TEXT_ABC} # text 2 1 0 0 {300 -2890} {TEXT_ABC} -# text 2 1 0 0 {300 -2900} {TEXT_ABC} -# text 2 1 0 0 {310 -2890} {TEXT_ABC} -# text 2 1 0 0 {300 -2880} {TEXT_ABC} -# text 2 1 0 0 {290 -2890} {TEXT_ABC} -# text 2 1 0 0 {300 -2900} {TEXT_ABC} +# text 2 1 0 0 {300 -2930} {TEXT_ABC} +# text 2 1 0 0 {310 -2920} {TEXT_ABC} +# text 2 1 0 0 {300 -2910} {TEXT_ABC} +# text 2 1 0 0 {290 -2920} {TEXT_ABC} +# text 2 1 0 0 {310 -2940} {TEXT_ABC} # text 2 1 0 0 {300 -3100} {TEXT_ABC} # text 2 1 0 0 {289 -3088} {TEXT_ABC} # text 2 1 0 0 {299 -3098} {TEXT_ABC} @@ -105,11 +105,11 @@ # text 2 1 0 0 {310 -3300} {TEXT_ABC} # text 2 1 0 0 {310 -3290} {TEXT_ABC} # text 2 1 0 0 {300 -3290} {TEXT_ABC} -# text 2 1 0 0 {300 -3300} {TEXT_ABC} -# text 2 1 0 0 {310 -3290} {TEXT_ABC} -# text 2 1 0 0 {300 -3280} {TEXT_ABC} -# text 2 1 0 0 {290 -3290} {TEXT_ABC} -# text 2 1 0 0 {300 -3300} {TEXT_ABC} +# text 2 1 0 0 {300 -3330} {TEXT_ABC} +# text 2 1 0 0 {310 -3320} {TEXT_ABC} +# text 2 1 0 0 {300 -3310} {TEXT_ABC} +# text 2 1 0 0 {290 -3320} {TEXT_ABC} +# text 2 1 0 0 {310 -3340} {TEXT_ABC} # text 2 1 0 0 {300 -3500} {TEXT_ABC} # text 2 1 0 0 {288 -3488} {TEXT_ABC} # text 2 1 0 0 {297 -3497} {TEXT_ABC} @@ -264,11 +264,11 @@ record TEXT uint [ expr 16*10+0 ] ;# n-displacement (g-delta: 10-east=10,0) uint [ expr 16*10+2 ] ;# n-displacement (g-delta: 10-north=0,10) uint [ expr 16*10+4 ] ;# n-displacement (g-delta: 10-west=-10,0) - uint [ expr 16*10+6 ] ;# n-displacement (g-delta: 10-south=0,-10) + uint [ expr 16*40+6 ] ;# n-displacement (g-delta: 10-south=0,-40) uint [ expr 16*10+8 ] ;# n-displacement (g-delta: 10-northeast=10,10) uint [ expr 16*10+10 ] ;# n-displacement (g-delta: 10-northwest=-10,10) uint [ expr 16*10+12 ] ;# n-displacement (g-delta: 10-southwest=-10,-10) - uint [ expr 16*10+14 ] ;# n-displacement (g-delta: 10-southeast=10,-10) + uint [ expr 16*20+14 ] ;# n-displacement (g-delta: 10-southeast=20,-20) record TEXT bits 00001100 ;# 0CNXYRTL @@ -288,11 +288,11 @@ record TEXT uint [ expr 16*5+0 ] ;# n-displacement (g-delta: 10-east=10,0) uint [ expr 16*5+2 ] ;# n-displacement (g-delta: 10-north=0,10) uint [ expr 16*5+4 ] ;# n-displacement (g-delta: 10-west=-10,0) - uint [ expr 16*5+6 ] ;# n-displacement (g-delta: 10-south=0,-10) + uint [ expr 16*20+6 ] ;# n-displacement (g-delta: 10-south=0,-40) uint [ expr 16*5+8 ] ;# n-displacement (g-delta: 10-northeast=10,10) uint [ expr 16*5+10 ] ;# n-displacement (g-delta: 10-northwest=-10,10) uint [ expr 16*5+12 ] ;# n-displacement (g-delta: 10-southwest=-10,-10) - uint [ expr 16*5+14 ] ;# n-displacement (g-delta: 10-southeast=10,-10) + uint [ expr 16*10+14 ] ;# n-displacement (g-delta: 10-southeast=20,-20) record TEXT bits 00001100 ;# 0CNXYRTL diff --git a/testdata/oasis/t3.2.oas b/testdata/oasis/t3.2.oas index 6f03c6c5297dea3051491c86a078265237b9bfde..e73bc2170151cf56c05de6d11ce3482c41e7561f 100644 GIT binary patch delta 61 zcmaFE{Em6TeuFmF6^yGG*D#)A66Tr6%*CiLv5pbM;$~+G2nspI6cH5z6<}l*=CEU$ K`0@87Miu}u{Se~- delta 59 zcmaFI{DyhLe!XRkD;QTXu3=oqD9kgFnTt_h0>a{EX9@@k35$q|i33S+GcpTv*fCA~ J_?L-+0RRZl4~75$ diff --git a/testdata/oasis/t3.2.ot b/testdata/oasis/t3.2.ot index 702785626..eed183df8 100644 --- a/testdata/oasis/t3.2.ot +++ b/testdata/oasis/t3.2.ot @@ -12,6 +12,7 @@ # begin_lib 0.001 # begin_cell {ABC} # text 1 2 0 0 {100 -200} {A} +# text 2 1 0 0 {200 -400} {B} # text 2 1 0 0 {300 -400} {B} # text 2 1 0 0 {300 -300} {B} # text 2 1 0 0 {300 -500} {A} @@ -56,12 +57,11 @@ # text 2 1 0 0 {300 -1700} {A} # text 2 1 0 0 {300 -1690} {A} # text 2 1 0 0 {300 -1679} {A} +# text 2 1 0 0 {300 -1900} {A} # text 2 1 0 0 {300 -1890} {A} # text 2 1 0 0 {300 -1875} {A} -# text 2 1 0 0 {200 -400} {B} -# text 2 1 0 0 {267 -2136} {A} -# text 2 1 0 0 {270 -2270} {A} -# text 2 1 0 0 {270 -2670} {A} +# text 2 1 0 0 {300 -2100} {A} +# text 2 1 0 0 {310 -2100} {A} # text 2 1 0 0 {320 -2100} {A} # text 2 1 0 0 {289 -2112} {A} # text 2 1 0 0 {299 -2112} {A} @@ -69,7 +69,7 @@ # text 2 1 0 0 {278 -2124} {A} # text 2 1 0 0 {288 -2124} {A} # text 2 1 0 0 {298 -2124} {A} -# text 2 1 0 0 {300 -1900} {A} +# text 2 1 0 0 {267 -2136} {A} # text 2 1 0 0 {277 -2136} {A} # text 2 1 0 0 {287 -2136} {A} # text 2 1 0 0 {300 -2300} {A} @@ -81,7 +81,7 @@ # text 2 1 0 0 {280 -2280} {A} # text 2 1 0 0 {291 -2268} {A} # text 2 1 0 0 {302 -2256} {A} -# text 2 1 0 0 {300 -2100} {A} +# text 2 1 0 0 {270 -2270} {A} # text 2 1 0 0 {281 -2258} {A} # text 2 1 0 0 {292 -2246} {A} # text 2 1 0 0 {300 -2500} {A} @@ -90,16 +90,16 @@ # text 2 1 0 0 {300 -2700} {A} # text 2 1 0 0 {290 -2690} {A} # text 2 1 0 0 {280 -2680} {A} -# text 2 1 0 0 {310 -2100} {A} +# text 2 1 0 0 {270 -2670} {A} # text 2 1 0 0 {300 -2900} {A} # text 2 1 0 0 {310 -2900} {A} # text 2 1 0 0 {310 -2890} {A} # text 2 1 0 0 {300 -2890} {A} -# text 2 1 0 0 {300 -2900} {A} -# text 2 1 0 0 {310 -2890} {A} -# text 2 1 0 0 {300 -2880} {A} -# text 2 1 0 0 {290 -2890} {A} -# text 2 1 0 0 {300 -2900} {A} +# text 2 1 0 0 {300 -2930} {A} +# text 2 1 0 0 {310 -2920} {A} +# text 2 1 0 0 {300 -2910} {A} +# text 2 1 0 0 {290 -2920} {A} +# text 2 1 0 0 {310 -2940} {A} # text 2 1 0 0 {300 -3100} {A} # text 2 1 0 0 {289 -3088} {A} # text 2 1 0 0 {299 -3098} {A} @@ -107,11 +107,11 @@ # text 2 1 0 0 {310 -3300} {A} # text 2 1 0 0 {310 -3290} {A} # text 2 1 0 0 {300 -3290} {A} -# text 2 1 0 0 {300 -3300} {A} -# text 2 1 0 0 {310 -3290} {A} -# text 2 1 0 0 {300 -3280} {A} -# text 2 1 0 0 {290 -3290} {A} -# text 2 1 0 0 {300 -3300} {A} +# text 2 1 0 0 {300 -3330} {A} +# text 2 1 0 0 {310 -3320} {A} +# text 2 1 0 0 {300 -3310} {A} +# text 2 1 0 0 {290 -3320} {A} +# text 2 1 0 0 {310 -3340} {A} # text 2 1 0 0 {300 -3500} {A} # text 2 1 0 0 {288 -3488} {A} # text 2 1 0 0 {297 -3497} {A} @@ -277,11 +277,11 @@ record TEXT uint [ expr 16*10+0 ] ;# n-displacement (g-delta: 10-east=10,0) uint [ expr 16*10+2 ] ;# n-displacement (g-delta: 10-north=0,10) uint [ expr 16*10+4 ] ;# n-displacement (g-delta: 10-west=-10,0) - uint [ expr 16*10+6 ] ;# n-displacement (g-delta: 10-south=0,-10) + uint [ expr 16*40+6 ] ;# n-displacement (g-delta: 10-south=0,-40) uint [ expr 16*10+8 ] ;# n-displacement (g-delta: 10-northeast=10,10) uint [ expr 16*10+10 ] ;# n-displacement (g-delta: 10-northwest=-10,10) uint [ expr 16*10+12 ] ;# n-displacement (g-delta: 10-southwest=-10,-10) - uint [ expr 16*10+14 ] ;# n-displacement (g-delta: 10-southeast=10,-10) + uint [ expr 16*20+14 ] ;# n-displacement (g-delta: 10-southeast=20,-20) record TEXT bits 00001100 ;# 0CNXYRTL @@ -301,11 +301,11 @@ record TEXT uint [ expr 16*5+0 ] ;# n-displacement (g-delta: 10-east=10,0) uint [ expr 16*5+2 ] ;# n-displacement (g-delta: 10-north=0,10) uint [ expr 16*5+4 ] ;# n-displacement (g-delta: 10-west=-10,0) - uint [ expr 16*5+6 ] ;# n-displacement (g-delta: 10-south=0,-10) + uint [ expr 16*20+6 ] ;# n-displacement (g-delta: 10-south=0,-40) uint [ expr 16*5+8 ] ;# n-displacement (g-delta: 10-northeast=10,10) uint [ expr 16*5+10 ] ;# n-displacement (g-delta: 10-northwest=-10,10) uint [ expr 16*5+12 ] ;# n-displacement (g-delta: 10-southwest=-10,-10) - uint [ expr 16*5+14 ] ;# n-displacement (g-delta: 10-southeast=10,-10) + uint [ expr 16*10+14 ] ;# n-displacement (g-delta: 10-southeast=20,-20) record TEXT bits 00001100 ;# 0CNXYRTL diff --git a/testdata/oasis/t3.5.oas b/testdata/oasis/t3.5.oas index 2801dae8c381f032358e2bc14e4ac2f9e4edd7ce..60fc266a51206fcadef9e5fab16869d803329f7e 100644 GIT binary patch delta 48 zcmaFG{DyhLUez|%6^yGG*D#)A66Tr6%*CiLv5pbM;$~+G2nspI6cH7(j&b7yE=B-z CP7XZ) delta 59 zcmaFE{EB(PUcF_ED;QTXu3=oqD9kgFnTt_h0>a{EX9@@k35$q|i33S+GcpTv*fCA~ J_