@@ -952,8 +952,7 @@ ShapePtr PadDirectConnectionStraps::getClosestShape(
952952 for (auto it = search_shapes.qbegin (bgi::intersects (search_rect)
953953 && bgi::satisfies ([&](const auto & other) {
954954 return other->getNet () == net
955- && other->getType ()
956- == target_shapes_type_;
955+ && isTargetShape (other.get ());
957956 }));
958957 it != search_shapes.qend ();
959958 it++) {
@@ -1016,7 +1015,7 @@ void PadDirectConnectionStraps::makeShapesFacingCore(
10161015 std::map<odb::dbTechLayer*, std::set<odb::dbTechLayer*>> connectable_layers;
10171016 for (const auto & [layer, shapes] : other_shapes) {
10181017 for (const auto & shape : shapes) {
1019- if (shape-> getType () == target_shapes_type_ ) {
1018+ if (isTargetShape ( shape. get ()) ) {
10201019 const auto layers = getGrid ()->connectableLayers (layer);
10211020 pin_layers.insert (layers.begin (), layers.end ());
10221021 for (auto * clayer : layers) {
@@ -1571,6 +1570,32 @@ bool PadDirectConnectionStraps::refineShape(
15711570 return false ;
15721571}
15731572
1573+ bool PadDirectConnectionStraps::isTargetShape (const Shape* shape) const
1574+ {
1575+ if (target_shapes_type_) {
1576+ return shape->getType () == target_shapes_type_.value ();
1577+ }
1578+
1579+ switch (shape->getType ()) {
1580+ case odb::dbWireShapeType::STRIPE:
1581+ case odb::dbWireShapeType::RING:
1582+ return true ;
1583+ case odb::dbWireShapeType::NONE:
1584+ case odb::dbWireShapeType::PADRING:
1585+ case odb::dbWireShapeType::BLOCKRING:
1586+ case odb::dbWireShapeType::FOLLOWPIN:
1587+ case odb::dbWireShapeType::IOWIRE:
1588+ case odb::dbWireShapeType::COREWIRE:
1589+ case odb::dbWireShapeType::BLOCKWIRE:
1590+ case odb::dbWireShapeType::BLOCKAGEWIRE:
1591+ case odb::dbWireShapeType::FILLWIRE:
1592+ case odb::dbWireShapeType::DRCFILL:
1593+ return false ;
1594+ }
1595+
1596+ return false ;
1597+ }
1598+
15741599// //////
15751600
15761601RepairChannelStraps::RepairChannelStraps (
0 commit comments