@@ -506,8 +506,6 @@ void Graphics::drawObjects(gui::Painter& painter)
506506 }
507507
508508 if (show_bundled_nets_) {
509- painter.setPen (gui::Painter::kYellow , true );
510-
511509 if (!hard_macros_.empty ()) {
512510 drawBundledNets (painter, hard_macros_);
513511 }
@@ -580,21 +578,31 @@ template <typename T>
580578void Graphics::drawBundledNets (gui::Painter& painter,
581579 const std::vector<T>& macros)
582580{
583- for (const auto & bundled_net : bundled_nets_) {
584- const T& source = macros[bundled_net.terminals .first ];
585- const T& target = macros[bundled_net.terminals .second ];
581+ painter.setPen (gui::Painter::kYellow , true );
586582
587- if (target. isClusterOfUnplacedIOPins () ) {
588- drawDistToRegion (painter, source, target );
589- continue ;
590- }
583+ for ( const auto & net : nets_ ) {
584+ drawBundledNet (painter, macros, net );
585+ }
586+ }
591587
592- odb::Point from (source.getPinX (), source.getPinY ());
593- odb::Point to (target.getPinX (), target.getPinY ());
588+ template <typename T>
589+ void Graphics::drawBundledNet (gui::Painter& painter,
590+ const std::vector<T>& macros,
591+ const BundledNet& net)
592+ {
593+ const T& source = macros[net.terminals .first ];
594+ const T& target = macros[net.terminals .second ];
594595
595- addOutlineOffsetToLine (from, to);
596- painter.drawLine (from, to);
596+ if (target.isClusterOfUnplacedIOPins ()) {
597+ drawDistToRegion (painter, source, target);
598+ return ;
597599 }
600+
601+ odb::Point from (source.getPinX (), source.getPinY ());
602+ odb::Point to (target.getPinX (), target.getPinY ());
603+
604+ addOutlineOffsetToLine (from, to);
605+ painter.drawLine (from, to);
598606}
599607
600608template <typename T>
@@ -700,9 +708,9 @@ void Graphics::setOnlyFinalResult(bool only_final_result)
700708 only_final_result_ = only_final_result;
701709}
702710
703- void Graphics::setBundledNets (const std::vector<BundledNet>& bundled_nets )
711+ void Graphics::setNets (const BundledNetList& nets )
704712{
705- bundled_nets_ = bundled_nets ;
713+ nets_ = nets ;
706714}
707715
708716void Graphics::setTargetClusterId (const int target_cluster_id)
@@ -757,7 +765,7 @@ void Graphics::eraseDrawing()
757765 hard_macros_.clear ();
758766 macro_blockages_.clear ();
759767 placement_blockages_.clear ();
760- bundled_nets_ .clear ();
768+ nets_ .clear ();
761769 outline_.reset (0 , 0 , 0 , 0 );
762770 outlines_.clear ();
763771 blocked_regions_for_pins_.clear ();
0 commit comments