|
@@ -13,39 +13,39 @@ Bond::Bond(QWidget* parent)
|
|
|
|
|
|
void Bond::UpdataGenerateTestData()
|
|
void Bond::UpdataGenerateTestData()
|
|
{
|
|
{
|
|
- // 生成测试数据:2x2 PCB,每个PCB 2x2 PT矩阵,每个PT矩阵 2x3固晶点
|
|
|
|
- int pcbIndex = 0;
|
|
|
|
- int dieIndex = 0;
|
|
|
|
- std::srand(std::time(nullptr));
|
|
|
|
- for (int pcbRow = 0; pcbRow < 2; ++pcbRow) {
|
|
|
|
- for (int pcbCol = 0; pcbCol < 2; ++pcbCol) {
|
|
|
|
- int iPcbMatId = ++pcbIndex;
|
|
|
|
- pcbDimensions[iPcbMatId] = qMakePair(2, 2); // PCB包含2x2 PT矩阵
|
|
|
|
-
|
|
|
|
- int ptIndex = 0;
|
|
|
|
- for (int ptRow = 0; ptRow < 2; ++ptRow) {
|
|
|
|
- for (int ptCol = 0; ptCol < 2; ++ptCol) {
|
|
|
|
- int iPtMatId = ++ptIndex;
|
|
|
|
- ptDimensions[iPcbMatId][iPtMatId] = qMakePair(2, 3); // PT矩阵包含2x3固晶点
|
|
|
|
-
|
|
|
|
- for (int dieRow = 0; dieRow < 2; ++dieRow) {
|
|
|
|
- for (int dieCol = 0; dieCol < 3; ++dieCol) {
|
|
|
|
- ns_mat::POINT_INFO_STRUCT point;
|
|
|
|
- point.stIndex.iPcbMatId = iPcbMatId;
|
|
|
|
- point.stIndex.iPtMatId = iPtMatId;
|
|
|
|
- point.stIndex.iPcbRow = pcbRow;
|
|
|
|
- point.stIndex.iPcbCol = pcbCol;
|
|
|
|
- point.stIndex.iPtRow = dieRow;
|
|
|
|
- point.stIndex.iPtCol = dieCol;
|
|
|
|
- point.stIndex.iIndex = ++dieIndex;
|
|
|
|
- point.stBondStatus.bDieStatus = static_cast<ns_mat::DIE_STATUS>(std::rand() % 7);
|
|
|
|
- bondData.append(point);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ //// 生成测试数据:2x2 PCB,每个PCB 2x2 PT矩阵,每个PT矩阵 2x3固晶点
|
|
|
|
+ //int pcbIndex = 0;
|
|
|
|
+ //int dieIndex = 0;
|
|
|
|
+ //std::srand(std::time(nullptr));
|
|
|
|
+ //for (int pcbRow = 0; pcbRow < 2; ++pcbRow) {
|
|
|
|
+ // for (int pcbCol = 0; pcbCol < 2; ++pcbCol) {
|
|
|
|
+ // int iPcbMatId = ++pcbIndex;
|
|
|
|
+ // pcbDimensions[iPcbMatId] = qMakePair(2, 2); // PCB包含2x2 PT矩阵
|
|
|
|
+
|
|
|
|
+ // int ptIndex = 0;
|
|
|
|
+ // for (int ptRow = 0; ptRow < 2; ++ptRow) {
|
|
|
|
+ // for (int ptCol = 0; ptCol < 2; ++ptCol) {
|
|
|
|
+ // int iPtMatId = ++ptIndex;
|
|
|
|
+ // ptDimensions[iPcbMatId][iPtMatId] = qMakePair(2, 3); // PT矩阵包含2x3固晶点
|
|
|
|
+
|
|
|
|
+ // for (int dieRow = 0; dieRow < 2; ++dieRow) {
|
|
|
|
+ // for (int dieCol = 0; dieCol < 3; ++dieCol) {
|
|
|
|
+ // ns_mat::POINT_INFO_STRUCT point;
|
|
|
|
+ // point.stIndex.iPcbMatId = iPcbMatId;
|
|
|
|
+ // point.stIndex.iPtMatId = iPtMatId;
|
|
|
|
+ // point.stIndex.iPcbRow = pcbRow;
|
|
|
|
+ // point.stIndex.iPcbCol = pcbCol;
|
|
|
|
+ // point.stIndex.iPtRow = dieRow;
|
|
|
|
+ // point.stIndex.iPtCol = dieCol;
|
|
|
|
+ // point.stIndex.iIndex = ++dieIndex;
|
|
|
|
+ // point.stBondStatus.bDieStatus = static_cast<ns_mat::DIE_STATUS>(std::rand() % 7);
|
|
|
|
+ // bondData.append(point);
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ //}
|
|
}
|
|
}
|
|
/*
|
|
/*
|
|
void Bond::initFrom(QWidget* parent) {
|
|
void Bond::initFrom(QWidget* parent) {
|
|
@@ -259,6 +259,10 @@ void Bond::initFrom(QWidget* parent) {
|
|
double matrixFontSize = qMin(dieWidth/ratio, dieHeight / ratio)*0.1;
|
|
double matrixFontSize = qMin(dieWidth/ratio, dieHeight / ratio)*0.1;
|
|
matrixFont.setPointSizeF(matrixFontSize); // 使用浮点大小
|
|
matrixFont.setPointSizeF(matrixFontSize); // 使用浮点大小
|
|
|
|
|
|
|
|
+ if (bondData.size() == 0) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
for (int i = 0; i < bondData.size(); ++i) {
|
|
for (int i = 0; i < bondData.size(); ++i) {
|
|
|
|
|
|
// 绘制固晶点
|
|
// 绘制固晶点
|
|
@@ -292,23 +296,7 @@ void Bond::initFrom(QWidget* parent) {
|
|
dieText->setPos(dieRect.center() - QPointF(dieText->boundingRect().width() / 2,
|
|
dieText->setPos(dieRect.center() - QPointF(dieText->boundingRect().width() / 2,
|
|
dieText->boundingRect().height() / 2));
|
|
dieText->boundingRect().height() / 2));
|
|
}
|
|
}
|
|
- /*
|
|
|
|
- //绘制pt矩阵和Pcb矩阵
|
|
|
|
- for (auto outerIt = m_pcbMaxPointmap.begin(); outerIt != m_pcbMaxPointmap.end(); ++outerIt) {
|
|
|
|
- int outerKey = outerIt.key(); // 外层 key
|
|
|
|
- const QMap<int, QPointF>& innerMap = outerIt.value();
|
|
|
|
-
|
|
|
|
- qDebug() << "Outer Key:" << outerKey;
|
|
|
|
-
|
|
|
|
- for (auto innerIt = innerMap.begin(); innerIt != innerMap.end(); ++innerIt) {
|
|
|
|
- int innerKey = innerIt.key(); // 内层 key
|
|
|
|
- const QPointF& maxPtPoint = innerIt.value();
|
|
|
|
- const QPointF& minPtPoint = m_pcbMinPointmap.value(outerKey).value(innerKey);
|
|
|
|
- qDebug() << " Inner Key:" << innerKey;
|
|
|
|
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- */
|
|
|
|
QPen ptpen(Qt::blue, 0.5);
|
|
QPen ptpen(Qt::blue, 0.5);
|
|
QPen pcbpen(Qt::red, 0.5);
|
|
QPen pcbpen(Qt::red, 0.5);
|
|
QPen subpen(Qt::black, 0.5);
|
|
QPen subpen(Qt::black, 0.5);
|