#ifndef DIST_DOT_PROCESS
|
#define DIST_DOT_PROCESS
|
|
class CDistDotProcess
|
{
|
public:
|
CDistDotProcess();
|
CDistDotProcess(DimensionDir eDir, int id);
|
~CDistDotProcess();
|
|
public:
|
//1. get id
|
int getID(void);
|
|
//2. Ö´Ðмì²â
|
int Execute(DimensionDir eDir, MeasureInfo inf, Point2I offset);
|
|
//3. ÐòÁл¯²ÎÊýºÍ·´ÐòÁкŲÎÊý
|
int Serialized(void* pBuffer, int size);
|
int Deserialized(void* pBuffer, int size);
|
|
//4. ÉèÖÃROIÇøÓò
|
void setRoiRegion(HalconCpp::HObject &hRegion);
|
|
//5. ÉèÖòâÁ¿Ö±Ïß
|
void setLineRegion(HalconCpp::HObject &hRegion);
|
|
//6. »ñȡλÖÃ
|
Point2I getPose(void);
|
|
//7. ÉèÖÃλÖÃ
|
void setPoint(Point2I pt, int nType);
|
|
public:
|
DimensionDir m_eDir; //
|
CString m_strName; //Name
|
int m_idxRefer; //index
|
int m_nRef; //Pos+
|
int m_nRef_; //Pos-
|
|
int m_distMode;
|
int m_minValue;
|
int m_maxValue;
|
int m_ngType;
|
int m_incValue;
|
|
int m_distMode2;
|
int m_minValue2;
|
int m_maxValue2;
|
int m_ngType2;
|
int m_incValue2;
|
|
Point2D m_ptMeasureResult;
|
Point2D m_ptNearResult;
|
Point2D m_ptMatchResult;
|
Point2I m_locPointResult;
|
|
HalconCpp::HObject m_hRegion;
|
HalconCpp::HObject m_hLineRegion;
|
|
std::vector<NgDotInfo> m_nNgInfo;
|
|
private:
|
int m_id; //ID
|
|
double m_xPos;
|
double m_yPos;
|
|
double m_cx;
|
double m_cy;
|
double m_angle;
|
double m_len1;
|
double m_len2;
|
|
double m_xMmvsp;
|
double m_yMmvsp;
|
Point2I m_topPoint;
|
Point2I m_botPoint;
|
Point2I m_topMark;
|
Point2I m_botMark;
|
|
private:
|
//1. ²éÕÒ²éÕÒ
|
int findPairEdge(DimensionDir eDir, MeasureInfo infMeasure, Point2I offset);
|
|
//2. ·ÖÎöÇøÓò
|
Line2D GetTargeLine(void);
|
|
//3. »ñȡĿ±êµãµÄλÖÃ
|
int getKeyPose(Point2I offset);
|
|
//4. ½á¹ûÅжÏ
|
void JudgeResult(void);
|
|
//5. ¼ì²âµÚÒ»¸öÅжÏ
|
void JudgeFirstResult(void);
|
|
//6. ¼ì²âµÚ¶þ¸öȱÏÝ
|
void JudgeSecondResult(void);
|
|
//7. »ñÈ¡·Ö±æÂÊ
|
void getMmvsp(DimensionDir eDir);
|
};
|
|
#endif
|