diff --git a/src/db/db/gsiDeclDbCell.cc b/src/db/db/gsiDeclDbCell.cc index af71fabda..03f960205 100644 --- a/src/db/db/gsiDeclDbCell.cc +++ b/src/db/db/gsiDeclDbCell.cc @@ -2718,9 +2718,9 @@ Class decl_Cell ("db", "Cell", "@return The bounding box of the cell\n" "\n" "The bounding box is computed over all layers. To compute the bounding box over single layers, " - "use \\bbox_per_layer.\n" + "use \\bbox with a layer index argument.\n" ) + - gsi::method ("bbox_per_layer", (const db::Cell::box_type &(db::Cell::*) (unsigned int) const) &db::Cell::bbox, gsi::arg ("layer_index"), + gsi::method ("bbox|#bbox_per_layer", (const db::Cell::box_type &(db::Cell::*) (unsigned int) const) &db::Cell::bbox, gsi::arg ("layer_index"), "@brief Gets the per-layer bounding box of the cell\n" "\n" "@return The bounding box of the cell considering only the given layer\n" @@ -2733,11 +2733,11 @@ Class decl_Cell ("db", "Cell", "@return The bounding box of the cell\n" "\n" "The bounding box is computed over all layers. To compute the bounding box over single layers, " - "use \\dbbox_per_layer.\n" + "use \\dbbox with a layer index argument.\n" "\n" "This method has been introduced in version 0.25." ) + - gsi::method_ext ("dbbox_per_layer", &cell_dbbox_per_layer, gsi::arg ("layer_index"), + gsi::method_ext ("dbbox|#dbbox_per_layer", &cell_dbbox_per_layer, gsi::arg ("layer_index"), "@brief Gets the per-layer bounding box of the cell in micrometer units\n" "\n" "@return The bounding box of the cell considering only the given layer\n" @@ -3913,7 +3913,7 @@ Class decl_Instance ("db", "Instance", "\n" "This method has been introduced in version 0.25." ) + - gsi::method_ext ("bbox_per_layer", &inst_bbox_per_layer, gsi::arg ("layer_index"), + gsi::method_ext ("bbox|#bbox_per_layer", &inst_bbox_per_layer, gsi::arg ("layer_index"), "@brief Gets the bounding box of the instance for a given layer\n" "@param layer_index The index of the layer the bounding box will be computed for.\n" "The bounding box incorporates all instances that the array represents. " @@ -3922,11 +3922,11 @@ Class decl_Instance ("db", "Instance", "\n" "This method has been introduced in version 0.25." ) + - gsi::method_ext ("dbbox_per_layer", &inst_dbbox_per_layer, gsi::arg ("layer_index"), + gsi::method_ext ("dbbox|#dbbox_per_layer", &inst_dbbox_per_layer, gsi::arg ("layer_index"), "@brief Gets the bounding box of the instance in micron units\n" "@param layer_index The index of the layer the bounding box will be computed for.\n" - "Gets the bounding box (see \\bbox_per_layer) of the instance, but will compute the micrometer unit box by " - "multiplying \\bbox_per_layer with the database unit.\n" + "Gets the bounding box (see \\bbox) of the instance, but will compute the micrometer unit box by " + "multiplying \\bbox with the database unit.\n" "\n" "This method has been introduced in version 0.25." ) + @@ -4412,7 +4412,7 @@ static db::CellInstArray::box_type cell_inst_array_bbox_per_layer (const db::Cel Class decl_CellInstArray ("db", "CellInstArray", cell_inst_array_defs::methods (false /*old version*/) + - gsi::method_ext ("bbox_per_layer", &cell_inst_array_bbox_per_layer, gsi::arg ("layout"), gsi::arg ("layer_index"), + gsi::method_ext ("bbox|#bbox_per_layer", &cell_inst_array_bbox_per_layer, gsi::arg ("layout"), gsi::arg ("layer_index"), "@brief Gets the bounding box of the array with respect to one layer\n" "The bounding box incorporates all instances that the array represents. It needs the layout object to access the " "actual cell from the cell index." @@ -4474,7 +4474,7 @@ static db::DBox cell_dinst_array_bbox_per_layer (const db::DCellInstArray *a, co Class decl_DCellInstArray ("db", "DCellInstArray", cell_inst_array_defs::methods (true /*new version*/) + - gsi::method_ext ("bbox_per_layer", &cell_dinst_array_bbox_per_layer, gsi::arg ("layout"), gsi::arg ("layer_index"), + gsi::method_ext ("bbox|#bbox_per_layer", &cell_dinst_array_bbox_per_layer, gsi::arg ("layout"), gsi::arg ("layer_index"), "@brief Gets the bounding box of the array with respect to one layer\n" "The bounding box incorporates all instances that the array represents. It needs the layout object to access the " "actual cell from the cell index." diff --git a/testdata/ruby/dbInstanceTest.rb b/testdata/ruby/dbInstanceTest.rb index f59c0bfd5..17c6d5bc5 100644 --- a/testdata/ruby/dbInstanceTest.rb +++ b/testdata/ruby/dbInstanceTest.rb @@ -53,21 +53,23 @@ class DBInstance_TestClass < TestBase assert_equal(c1.bbox.to_s, "(10,-10;50,40)") assert_equal(c1.bbox_per_layer(lindex).to_s, "(10,-10;50,40)") assert_equal(c1.bbox_per_layer(ldummy).to_s, "()") + assert_equal(c1.bbox(lindex).to_s, "(10,-10;50,40)") + assert_equal(c1.bbox(ldummy).to_s, "()") tr = RBA::Trans::new( RBA::Trans::R90, RBA::Point::new( 101, -51 ) ) inst = RBA::CellInstArray::new( c1.cell_index, tr ) assert_equal(inst.bbox(ly).to_s, "(61,-41;111,-1)") - assert_equal(inst.bbox_per_layer(ly, lindex).to_s, "(61,-41;111,-1)") - assert_equal(inst.bbox_per_layer(ly, ldummy).to_s, "()") + assert_equal(inst.bbox(ly, lindex).to_s, "(61,-41;111,-1)") + assert_equal(inst.bbox(ly, ldummy).to_s, "()") inst_ref = c2.insert( inst ) assert_equal( inst_ref.to_s, "cell_index=0 r90 101,-51" ) assert_equal( inst_ref.bbox.to_s, "(61,-41;111,-1)" ) assert_equal( inst_ref.cell_inst.bbox(ly).to_s, "(61,-41;111,-1)" ) - assert_equal( inst_ref.bbox_per_layer(lindex).to_s, "(61,-41;111,-1)" ) - assert_equal( inst_ref.cell_inst.bbox_per_layer(ly, lindex).to_s, "(61,-41;111,-1)" ) - assert_equal( inst_ref.bbox_per_layer(ldummy).to_s, "()" ) - assert_equal( inst_ref.cell_inst.bbox_per_layer(ly, ldummy).to_s, "()" ) + assert_equal( inst_ref.bbox(lindex).to_s, "(61,-41;111,-1)" ) + assert_equal( inst_ref.cell_inst.bbox(ly, lindex).to_s, "(61,-41;111,-1)" ) + assert_equal( inst_ref.bbox(ldummy).to_s, "()" ) + assert_equal( inst_ref.cell_inst.bbox(ly, ldummy).to_s, "()" ) tr = RBA::Trans::new( RBA::Trans::R90, RBA::Point::new( 100, -50 ) ) inst = RBA::CellInstArray::new( c1.cell_index, tr ) @@ -514,21 +516,23 @@ class DBInstance_TestClass < TestBase assert_equal(c1.dbbox.to_s, "(0.01,-0.01;0.05,0.04)") assert_equal(c1.dbbox_per_layer(lindex).to_s, "(0.01,-0.01;0.05,0.04)") assert_equal(c1.dbbox_per_layer(ldummy).to_s, "()") + assert_equal(c1.dbbox(lindex).to_s, "(0.01,-0.01;0.05,0.04)") + assert_equal(c1.dbbox(ldummy).to_s, "()") tr = RBA::DTrans::new( RBA::DTrans::R90, RBA::DPoint::new( 0.101, -0.051 ) ) inst = RBA::DCellInstArray::new( c1.cell_index, tr ) assert_equal(inst.bbox(ly).to_s, "(0.061,-0.041;0.111,-0.001)") - assert_equal(inst.bbox_per_layer(ly, lindex).to_s, "(0.061,-0.041;0.111,-0.001)") - assert_equal(inst.bbox_per_layer(ly, ldummy).to_s, "()") + assert_equal(inst.bbox(ly, lindex).to_s, "(0.061,-0.041;0.111,-0.001)") + assert_equal(inst.bbox(ly, ldummy).to_s, "()") inst_ref = c2.insert( inst ) assert_equal( inst_ref.to_s, "cell_index=0 r90 101,-51" ) assert_equal( inst_ref.dbbox.to_s, "(0.061,-0.041;0.111,-0.001)" ) assert_equal( inst_ref.dcell_inst.bbox(ly).to_s, "(0.061,-0.041;0.111,-0.001)" ) - assert_equal( inst_ref.dbbox_per_layer(lindex).to_s, "(0.061,-0.041;0.111,-0.001)" ) - assert_equal( inst_ref.dcell_inst.bbox_per_layer(ly, lindex).to_s, "(0.061,-0.041;0.111,-0.001)" ) - assert_equal( inst_ref.dbbox_per_layer(ldummy).to_s, "()" ) - assert_equal( inst_ref.dcell_inst.bbox_per_layer(ly, ldummy).to_s, "()" ) + assert_equal( inst_ref.dbbox(lindex).to_s, "(0.061,-0.041;0.111,-0.001)" ) + assert_equal( inst_ref.dcell_inst.bbox(ly, lindex).to_s, "(0.061,-0.041;0.111,-0.001)" ) + assert_equal( inst_ref.dbbox(ldummy).to_s, "()" ) + assert_equal( inst_ref.dcell_inst.bbox(ly, ldummy).to_s, "()" ) tr = RBA::DTrans::new( RBA::DTrans::R90, RBA::DPoint::new( 0.100, -0.050 ) ) inst = RBA::DCellInstArray::new( c1.cell_index, tr ) diff --git a/testdata/ruby/dbLayoutTests2.rb b/testdata/ruby/dbLayoutTests2.rb index 1d318957b..cc079830f 100644 --- a/testdata/ruby/dbLayoutTests2.rb +++ b/testdata/ruby/dbLayoutTests2.rb @@ -206,22 +206,28 @@ class DBLayoutTests2_TestClass < TestBase assert_equal( c1.bbox.to_s, "(10,-10;50,40)" ) assert_equal( c1.bbox_per_layer( lindex ).to_s, "(10,-10;50,40)" ) assert_equal( c1.bbox_per_layer( ldummy ).to_s, "()" ) + assert_equal( c1.bbox( lindex ).to_s, "(10,-10;50,40)" ) + assert_equal( c1.bbox( ldummy ).to_s, "()" ) + assert_equal( c1.dbbox_per_layer( lindex ).to_s, "(0.01,-0.01;0.05,0.04)" ) + assert_equal( c1.dbbox_per_layer( ldummy ).to_s, "()" ) + assert_equal( c1.dbbox( lindex ).to_s, "(0.01,-0.01;0.05,0.04)" ) + assert_equal( c1.dbbox( ldummy ).to_s, "()" ) c1.swap( lindex, ldummy ) - assert_equal( c1.bbox_per_layer( lindex ).to_s, "()" ) - assert_equal( c1.bbox_per_layer( ldummy ).to_s, "(10,-10;50,40)" ) + assert_equal( c1.bbox( lindex ).to_s, "()" ) + assert_equal( c1.bbox( ldummy ).to_s, "(10,-10;50,40)" ) c1.clear( lindex ) c1.clear( ldummy ) - assert_equal( c1.bbox_per_layer( lindex ).to_s, "()" ) - assert_equal( c1.bbox_per_layer( ldummy ).to_s, "()" ) + assert_equal( c1.bbox( lindex ).to_s, "()" ) + assert_equal( c1.bbox( ldummy ).to_s, "()" ) c1.shapes( lindex ).insert( RBA::Box::new( 10, -10, 50, 40 ) ) - assert_equal( c1.bbox_per_layer( lindex ).to_s, "(10,-10;50,40)" ) - assert_equal( c1.bbox_per_layer( ldummy ).to_s, "()" ) + assert_equal( c1.bbox( lindex ).to_s, "(10,-10;50,40)" ) + assert_equal( c1.bbox( ldummy ).to_s, "()" ) c1.clear_shapes - assert_equal( c1.bbox_per_layer( lindex ).to_s, "()" ) - assert_equal( c1.bbox_per_layer( ldummy ).to_s, "()" ) + assert_equal( c1.bbox( lindex ).to_s, "()" ) + assert_equal( c1.bbox( ldummy ).to_s, "()" ) assert_equal( ly.unique_cell_name("c3"), "c3" ) assert_equal( ly.unique_cell_name("c1"), "c1$1" ) @@ -255,8 +261,8 @@ class DBLayoutTests2_TestClass < TestBase tr = RBA::Trans::new( RBA::Trans::R90, RBA::Point::new( 100, -50 ) ) inst = RBA::CellInstArray::new( c1.cell_index, tr ) assert_equal( inst.bbox( ly ).to_s, c1.bbox.transformed(tr).to_s ) - assert_equal( inst.bbox_per_layer( ly, lindex ).to_s, c1.bbox.transformed(tr).to_s ) - assert_equal( inst.bbox_per_layer( ly, ldummy ).to_s, "()" ) + assert_equal( inst.bbox( ly, lindex ).to_s, c1.bbox.transformed(tr).to_s ) + assert_equal( inst.bbox( ly, ldummy ).to_s, "()" ) assert_equal( inst.size, 1 ) assert_equal( inst.is_complex?, false ) c2.insert( inst ) @@ -496,8 +502,8 @@ class DBLayoutTests2_TestClass < TestBase tr = RBA::Trans::new( RBA::Trans::R90, RBA::Point::new( 100, -50 ) ) inst = RBA::CellInstArray::new( c1.cell_index, tr ) assert_equal( inst.bbox( ly ).to_s, c1.bbox.transformed(tr).to_s ) - assert_equal( inst.bbox_per_layer( ly, lindex ).to_s, c1.bbox.transformed(tr).to_s ) - assert_equal( inst.bbox_per_layer( ly, ldummy ).to_s, "()" ) + assert_equal( inst.bbox( ly, lindex ).to_s, c1.bbox.transformed(tr).to_s ) + assert_equal( inst.bbox( ly, ldummy ).to_s, "()" ) assert_equal( inst.size, 1 ) assert_equal( inst.is_complex?, false ) c2.insert( inst, pid )