|
@@ -65,19 +65,27 @@ Wafer* CameraImageHandler::getWafer() const{
|
|
|
}
|
|
|
|
|
|
Waffle* CameraImageHandler::getWaffle() const{
|
|
|
- return waffle;
|
|
|
+ return m_pWaffle;
|
|
|
}
|
|
|
|
|
|
MaterialBox* CameraImageHandler::getMaterialBox() const
|
|
|
{
|
|
|
- return materialBox;
|
|
|
+ return m_pMaterialBox;
|
|
|
}
|
|
|
|
|
|
Bond* CameraImageHandler::getBond() const {
|
|
|
return m_pBond;
|
|
|
}
|
|
|
|
|
|
-void CameraImageHandler::initGroup(int CameraId) {
|
|
|
+void CameraImageHandler::initGroup(int CameraId)
|
|
|
+{
|
|
|
+ /** 这里面为什么又在Group 里面创建一个呢? ,不能同步?
|
|
|
+ */
|
|
|
+ //CreateGroupData();
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/* int CameraId, QString path, enum MaterialWindowType materialWindowType*/
|
|
|
QStringList dispmodel1;
|
|
|
dispmodel1 << "P die align" << "D device align";
|
|
@@ -112,37 +120,67 @@ void CameraImageHandler::initGroup(int CameraId) {
|
|
|
else if (CameraId == 2)
|
|
|
{
|
|
|
MaterialWindowType = 2;
|
|
|
- waffle = new Waffle(0);
|
|
|
+ m_pWaffle = new Waffle(0);
|
|
|
+ if (m_pCViewInterface != nullptr)
|
|
|
+ {
|
|
|
+ std::vector<ns_mat::WAFFLE_MATRIX_POINT_STRUCT> veWaffle;
|
|
|
+ m_pCViewInterface->GetWafflePackAllPointInfo(veWaffle);
|
|
|
+ m_pWaffle->UpdataVal(veWaffle);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ m_pWaffle->UpdataGenerateTestData();
|
|
|
+ }
|
|
|
m_pGroup = new Group(CameraId, ":/images/test_image/image_3.png", MaterialWindowType, dispmodel2, this);
|
|
|
}
|
|
|
else if (CameraId == 3)
|
|
|
{
|
|
|
MaterialWindowType = 3;
|
|
|
- materialBox = new MaterialBox(0);
|
|
|
+ m_pMaterialBox = new MaterialBox(0);
|
|
|
m_pGroup = new Group(CameraId, ":/images/test_image/image_5.png", MaterialWindowType, dispmodel3, this);
|
|
|
}
|
|
|
else if (CameraId == 4)
|
|
|
{
|
|
|
- MaterialWindowType = 1;
|
|
|
- m_pWafer = new Wafer(0);
|
|
|
+ MaterialWindowType = 1;
|
|
|
+ m_pWafer = new Wafer(0);
|
|
|
+ if (m_pCViewInterface != nullptr)
|
|
|
+ {
|
|
|
+ std::vector<ns_mat::WAFER_MATRIX_POINT_INFO_STRUCT> veWafer;
|
|
|
+ m_pCViewInterface->GetWaferAllPointInfo(veWafer);
|
|
|
+ m_pWafer->UpdataVal(veWafer);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ m_pWafer->UpdataGenerateTestData();
|
|
|
+ }
|
|
|
m_pGroup = new Group(CameraId, ":/images/test_image/image_7.png", MaterialWindowType, dispmodel4, this);
|
|
|
}
|
|
|
else if (CameraId == 5)
|
|
|
{
|
|
|
MaterialWindowType = 1;
|
|
|
m_pWafer = new Wafer(0);
|
|
|
+ if (m_pCViewInterface != nullptr)
|
|
|
+ {
|
|
|
+ std::vector<ns_mat::WAFER_MATRIX_POINT_INFO_STRUCT> veWafer;
|
|
|
+ m_pCViewInterface->GetWaferAllPointInfo(veWafer);
|
|
|
+ m_pWafer->UpdataVal(veWafer);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ m_pWafer->UpdataGenerateTestData();
|
|
|
+ }
|
|
|
m_pGroup = new Group(CameraId, ":/images/test_image/image_1.png", MaterialWindowType, dispmodel1, this);
|
|
|
}
|
|
|
else if (CameraId == 6)
|
|
|
{
|
|
|
MaterialWindowType = 2;
|
|
|
- waffle = new Waffle(0);
|
|
|
+ m_pWaffle = new Waffle(0);
|
|
|
m_pGroup = new Group(CameraId, ":/images/test_image/image_3.png", MaterialWindowType, dispmodel2, this);
|
|
|
}
|
|
|
else if (CameraId == 7)
|
|
|
{
|
|
|
MaterialWindowType = 3;
|
|
|
- materialBox = new MaterialBox(0);
|
|
|
+ m_pMaterialBox = new MaterialBox(0);
|
|
|
m_pGroup = new Group(CameraId, ":/images/test_image/image_5.png", MaterialWindowType, dispmodel3, this);
|
|
|
}
|
|
|
else if (CameraId == 8)
|
|
@@ -156,3 +194,112 @@ void CameraImageHandler::initGroup(int CameraId) {
|
|
|
m_pGroup = nullptr; // 如果 CameraId 不匹配,则 group 为 nullptr
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+void CameraImageHandler::CreateGroupData(const CameraInfo& cameraInfo)
|
|
|
+{
|
|
|
+ QString strPatch = R"(D:\config\MaterialInfo\)"; // 真实的路径
|
|
|
+ switch (cameraInfo.iCameraId)
|
|
|
+ {
|
|
|
+ case 0: //TODO: yang
|
|
|
+ {
|
|
|
+ strPatch += CreateMaterialType(cameraInfo.eType);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ {
|
|
|
+ strPatch += CreateMaterialType(cameraInfo.eType);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ {
|
|
|
+ strPatch += CreateMaterialType(cameraInfo.eType);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ {
|
|
|
+ strPatch += CreateMaterialType(cameraInfo.eType);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ {
|
|
|
+ strPatch += CreateMaterialType(cameraInfo.eType);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ //m_pGroup = new Group(cameraInfo, strPatch, this);
|
|
|
+}
|
|
|
+
|
|
|
+QString CameraImageHandler::CreateMaterialType(MATERIAL_TYPE materialType)
|
|
|
+{
|
|
|
+ QString strLoadPatch;
|
|
|
+
|
|
|
+ switch (materialType)
|
|
|
+ {
|
|
|
+ case MATERIAL_NULL:
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case MATERIAL_WAFER:
|
|
|
+ {
|
|
|
+ strLoadPatch = "Wafer";
|
|
|
+ m_pWafer = new Wafer(0); //TODO:以下传入指针实现同步?
|
|
|
+ if (m_pCViewInterface != nullptr)
|
|
|
+ {
|
|
|
+ std::vector<ns_mat::WAFER_MATRIX_POINT_INFO_STRUCT> veWafer;
|
|
|
+ m_pCViewInterface->GetWaferAllPointInfo(veWafer);
|
|
|
+ m_pWafer->UpdataVal(veWafer);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ m_pWafer->UpdataGenerateTestData();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case MATERIAL_WAFFLE:
|
|
|
+ {
|
|
|
+ strLoadPatch = "Waffle";
|
|
|
+ m_pWaffle = new Waffle(0);
|
|
|
+ if (m_pCViewInterface != nullptr)
|
|
|
+ {
|
|
|
+ std::vector<ns_mat::WAFFLE_MATRIX_POINT_STRUCT> veWaffle;
|
|
|
+ m_pCViewInterface->GetWafflePackAllPointInfo(veWaffle);
|
|
|
+ m_pWaffle->UpdataVal(veWaffle);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ m_pWaffle->UpdataGenerateTestData();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case MATERIAL_BOX: //-----------------------------未提供
|
|
|
+ {
|
|
|
+ strLoadPatch = "MaterialBox";
|
|
|
+ m_pMaterialBox = new MaterialBox(0);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ case MATERIAL_BOND:
|
|
|
+ {
|
|
|
+ strLoadPatch = "Bond";
|
|
|
+ m_pBond = new Bond(0);
|
|
|
+ if (m_pCViewInterface != nullptr)
|
|
|
+ {
|
|
|
+ std::vector<ns_mat::POINT_INFO_STRUCT> stPointInfo;
|
|
|
+ m_pCViewInterface->GetBondAllPointInfo(stPointInfo);
|
|
|
+ m_pBond->UpdataVal(stPointInfo);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ m_pBond->UpdataGenerateTestData();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ return strLoadPatch;
|
|
|
+}
|