diff --git a/src/mpl2/src/SACoreSoftMacro.cpp b/src/mpl2/src/SACoreSoftMacro.cpp index ad680493073..d0f66ad7c93 100644 --- a/src/mpl2/src/SACoreSoftMacro.cpp +++ b/src/mpl2/src/SACoreSoftMacro.cpp @@ -117,7 +117,16 @@ void SACoreSoftMacro::run() for (const int macro_id : pos_seq_) { SoftMacro& macro = macros_[macro_id]; - macro.setWidth(best_valid_result_->macro_id_to_width.at(macro_id)); + const float valid_result_width + = best_valid_result_->macro_id_to_width.at(macro_id); + + if (macro.isMacroCluster()) { + const float area = macro.getArea(); + const float valid_result_height = area / valid_result_width; + macro.setShapeF(valid_result_width, valid_result_height); + } else { + macro.setWidth(valid_result_width); + } } packFloorplan();