diff --git a/src/db/db/dbRecursiveShapeIterator.h b/src/db/db/dbRecursiveShapeIterator.h index 90a0102ec..376b978d6 100644 --- a/src/db/db/dbRecursiveShapeIterator.h +++ b/src/db/db/dbRecursiveShapeIterator.h @@ -474,6 +474,14 @@ public: } } + /** + * @brief Gets the shape selection flags + */ + unsigned int shape_flags () const + { + return m_shape_flags; + } + /** * @brief Changes the layer to be traversed * diff --git a/src/db/db/dbRegion.cc b/src/db/db/dbRegion.cc index 94234ea91..ae5ca987e 100644 --- a/src/db/db/dbRegion.cc +++ b/src/db/db/dbRegion.cc @@ -591,7 +591,7 @@ Region::texts_as_dots (const std::string &pat, bool pattern) const std::pair si = begin_iter (); if (! dr) { // some optimization - si.first.shape_flags (db::ShapeIterator::Texts); + si.first.shape_flags (si.first.shape_flags () & db::ShapeIterator::Texts); } std::auto_ptr res (new db::FlatEdges ()); @@ -610,7 +610,7 @@ Region::texts_as_dots (const std::string &pat, bool pattern, db::DeepShapeStore std::pair si = begin_iter (); if (! dr) { // some optimization - si.first.shape_flags (db::ShapeIterator::Texts); + si.first.shape_flags (si.first.shape_flags () & db::ShapeIterator::Texts); } if (! si.first.layout ()) { @@ -644,7 +644,7 @@ Region::texts_as_boxes (const std::string &pat, bool pattern, db::Coord enl) con std::pair si = begin_iter (); if (! dr) { // some optimization - si.first.shape_flags (db::ShapeIterator::Texts); + si.first.shape_flags (si.first.shape_flags () & db::ShapeIterator::Texts); } std::auto_ptr res (new db::FlatRegion ()); @@ -663,7 +663,7 @@ Region::texts_as_boxes (const std::string &pat, bool pattern, db::Coord enl, db: std::pair si = begin_iter (); if (! dr) { // some optimization - si.first.shape_flags (db::ShapeIterator::Texts); + si.first.shape_flags (si.first.shape_flags () & db::ShapeIterator::Texts); } if (! si.first.layout ()) { diff --git a/src/db/db/gsiDeclDbRecursiveShapeIterator.cc b/src/db/db/gsiDeclDbRecursiveShapeIterator.cc index 5f232a871..d57da88da 100644 --- a/src/db/db/gsiDeclDbRecursiveShapeIterator.cc +++ b/src/db/db/gsiDeclDbRecursiveShapeIterator.cc @@ -409,7 +409,7 @@ Class decl_RecursiveShapeIterator ("db", "RecursiveS "\n" "This method has been introduced in version 0.23.\n" ) + - gsi::method ("shape_flags=", &db::RecursiveShapeIterator::shape_flags, + gsi::method ("shape_flags=", (void (db::RecursiveShapeIterator::*)(unsigned int)) &db::RecursiveShapeIterator::shape_flags, "@brief Specifies the shape selection flags\n" "@args flags\n" "\n" diff --git a/src/drc/drc/built-in-macros/drc.lym b/src/drc/drc/built-in-macros/drc.lym index d5044ec66..e74188e6e 100644 --- a/src/drc/drc/built-in-macros/drc.lym +++ b/src/drc/drc/built-in-macros/drc.lym @@ -3539,7 +3539,7 @@ CODE def polygons(*args) layers = parse_input_layers(*args) - DRCLayer::new(@engine, @engine._cmd(@engine, :_input, @layout_var, @cell.cell_index, layers, @sel, @box, @clip, @overlapping, RBA::Shapes::SBoxes | RBA::Shapes::SPaths | RBA::Shapes::SPolygons)) + DRCLayer::new(@engine, @engine._cmd(@engine, :_input, @layout_var, @cell.cell_index, layers, @sel, @box, @clip, @overlapping, RBA::Shapes::SBoxes | RBA::Shapes::SPaths | RBA::Shapes::SPolygons | RBA::Shapes::SEdgePairs)) end # %DRC% @@ -5235,6 +5235,10 @@ CODE sf = layout.dbu / self.dbu if @deep @dss ||= RBA::DeepShapeStore::new + # TODO: align with LayoutToNetlist by using a "master" L2N + # object which keeps the DSS. + @dss.text_property_name = "LABEL" + @dss.text_enlargement = 1 r = RBA::Region::new(iter, @dss, RBA::ICplxTrans::new(sf.to_f)) else r = RBA::Region::new(iter, RBA::ICplxTrans::new(sf.to_f)) diff --git a/src/drc/unit_tests/drcSimpleTests.cc b/src/drc/unit_tests/drcSimpleTests.cc index 87e8590ae..4d8c6b11d 100644 --- a/src/drc/unit_tests/drcSimpleTests.cc +++ b/src/drc/unit_tests/drcSimpleTests.cc @@ -302,7 +302,7 @@ TEST(7_AntennaWithDiodes) db::compare_layouts (_this, layout, au, db::NoNormalization); } -TEST(8_FlatTextsAndPolygons) +TEST(8_TextsAndPolygons) { std::string rs = tl::testsrc (); rs += "/testdata/drc/drcSimpleTests_8.drc"; diff --git a/testdata/drc/drcSimpleTests_8.drc b/testdata/drc/drcSimpleTests_8.drc index cafec7b3f..faab090a9 100644 --- a/testdata/drc/drcSimpleTests_8.drc +++ b/testdata/drc/drcSimpleTests_8.drc @@ -10,12 +10,12 @@ flat_labels = labels(1, 0) flat_all = input(1, 0) flat_poly = polygons(1, 0) -flat_texts_from_labels1 = flat_labels.texts("XYZ", false) -flat_texts_from_labels2 = flat_labels.texts("*", true) -flat_texts_from_all1 = flat_all.texts("XYZ", false) -flat_texts_from_all2 = flat_all.texts("*", true) -flat_texts_from_poly1 = flat_poly.texts("XYZ", false) -flat_texts_from_poly2 = flat_poly.texts("*", true) +flat_texts_from_labels1 = flat_labels.texts(text("XYZ")) +flat_texts_from_labels2 = flat_labels.texts("*") +flat_texts_from_all1 = flat_all.texts(text("XYZ")) +flat_texts_from_all2 = flat_all.texts("*") +flat_texts_from_poly1 = flat_poly.texts(text("XYZ")) +flat_texts_from_poly2 = flat_poly.texts("*") flat_labels.output(100, 0) flat_all.output(101, 0) @@ -35,12 +35,12 @@ deep_labels = labels(1, 0) deep_all = input(1, 0) deep_poly = polygons(1, 0) -deep_texts_from_labels1 = deep_labels.texts("XYZ", false) -deep_texts_from_labels2 = deep_labels.texts("*", true) -deep_texts_from_all1 = deep_all.texts("XYZ", false) -deep_texts_from_all2 = deep_all.texts("*", true) -deep_texts_from_poly1 = deep_poly.texts("XYZ", false) -deep_texts_from_poly2 = deep_poly.texts("*", true) +deep_texts_from_labels1 = deep_labels.texts(text("XYZ")) +deep_texts_from_labels2 = deep_labels.texts("*") +deep_texts_from_all1 = deep_all.texts(text("XYZ")) +deep_texts_from_all2 = deep_all.texts("*") +deep_texts_from_poly1 = deep_poly.texts(text("XYZ")) +deep_texts_from_poly2 = deep_poly.texts("*") deep_labels.output(200, 0) deep_all.output(201, 0) diff --git a/testdata/drc/drcSimpleTests_au2.oas b/testdata/drc/drcSimpleTests_au2.oas index 7f15c2f3d..787eddb7a 100644 Binary files a/testdata/drc/drcSimpleTests_au2.oas and b/testdata/drc/drcSimpleTests_au2.oas differ diff --git a/testdata/drc/drcSimpleTests_au4.oas b/testdata/drc/drcSimpleTests_au4.oas index aa37d1e7d..7a7a8d6b0 100644 Binary files a/testdata/drc/drcSimpleTests_au4.oas and b/testdata/drc/drcSimpleTests_au4.oas differ diff --git a/testdata/drc/drcSimpleTests_au8.oas b/testdata/drc/drcSimpleTests_au8.oas new file mode 100644 index 000000000..869056430 Binary files /dev/null and b/testdata/drc/drcSimpleTests_au8.oas differ