修正一个bug
This commit is contained in:
parent
3076a17c18
commit
5b658bbef7
@ -413,14 +413,14 @@ SSX_BQworkpieceResult sx_BQ_getWorkpieceCorners(
|
|||||||
if (idx0 < 0)
|
if (idx0 < 0)
|
||||||
{
|
{
|
||||||
*errCode = SX_ERR_INVLD_CLOSES_PT;
|
*errCode = SX_ERR_INVLD_CLOSES_PT;
|
||||||
return;
|
return workpieceCorners;
|
||||||
}
|
}
|
||||||
_getEdgeLinkingContour(&v_trees[idx0], true, firstPt, region[0].edgeLink_1, scanLines, true, workpieceParam.lineLen);
|
_getEdgeLinkingContour(&v_trees[idx0], true, firstPt, region[0].edgeLink_1, scanLines, true, workpieceParam.lineLen);
|
||||||
int idx1 = _getPointClosestContour(v_trees, true, lastPt, scanLines, true);
|
int idx1 = _getPointClosestContour(v_trees, true, lastPt, scanLines, true);
|
||||||
if (idx1 < 0)
|
if (idx1 < 0)
|
||||||
{
|
{
|
||||||
*errCode = SX_ERR_INVLD_CLOSES_PT;
|
*errCode = SX_ERR_INVLD_CLOSES_PT;
|
||||||
return;
|
return workpieceCorners;
|
||||||
}
|
}
|
||||||
_getEdgeLinkingContour(&v_trees[idx1], true, lastPt, region[0].edgeLink_2, scanLines, true, workpieceParam.lineLen);
|
_getEdgeLinkingContour(&v_trees[idx1], true, lastPt, region[0].edgeLink_2, scanLines, true, workpieceParam.lineLen);
|
||||||
if ((region[0].edgeLink_1.size() < 5) || (region[0].edgeLink_2.size() < 5))
|
if ((region[0].edgeLink_1.size() < 5) || (region[0].edgeLink_2.size() < 5))
|
||||||
@ -438,14 +438,14 @@ SSX_BQworkpieceResult sx_BQ_getWorkpieceCorners(
|
|||||||
if (idx0 < 0)
|
if (idx0 < 0)
|
||||||
{
|
{
|
||||||
*errCode = SX_ERR_INVLD_CLOSES_PT;
|
*errCode = SX_ERR_INVLD_CLOSES_PT;
|
||||||
return;
|
return workpieceCorners;
|
||||||
}
|
}
|
||||||
_getEdgeLinkingContour(&h_trees[idx0], false, firstPt, region[1].edgeLink_1, scanLines, true, workpieceParam.lineLen);
|
_getEdgeLinkingContour(&h_trees[idx0], false, firstPt, region[1].edgeLink_1, scanLines, true, workpieceParam.lineLen);
|
||||||
idx1 = _getPointClosestContour(h_trees, false, lastPt, scanLines, true);
|
idx1 = _getPointClosestContour(h_trees, false, lastPt, scanLines, true);
|
||||||
if (idx1 < 0)
|
if (idx1 < 0)
|
||||||
{
|
{
|
||||||
*errCode = SX_ERR_INVLD_CLOSES_PT;
|
*errCode = SX_ERR_INVLD_CLOSES_PT;
|
||||||
return;
|
return workpieceCorners;
|
||||||
}
|
}
|
||||||
_getEdgeLinkingContour(&h_trees[idx1], false, lastPt, region[1].edgeLink_2, scanLines, true, workpieceParam.lineLen);
|
_getEdgeLinkingContour(&h_trees[idx1], false, lastPt, region[1].edgeLink_2, scanLines, true, workpieceParam.lineLen);
|
||||||
if ((region[1].edgeLink_1.size() < 5) || (region[1].edgeLink_2.size() < 5))
|
if ((region[1].edgeLink_1.size() < 5) || (region[1].edgeLink_2.size() < 5))
|
||||||
@ -462,14 +462,14 @@ SSX_BQworkpieceResult sx_BQ_getWorkpieceCorners(
|
|||||||
if (idx0 < 0)
|
if (idx0 < 0)
|
||||||
{
|
{
|
||||||
*errCode = SX_ERR_INVLD_CLOSES_PT;
|
*errCode = SX_ERR_INVLD_CLOSES_PT;
|
||||||
return;
|
return workpieceCorners;
|
||||||
}
|
}
|
||||||
_getEdgeLinkingContour(&v_trees[idx0], true, firstPt, region[2].edgeLink_1, scanLines, false, workpieceParam.lineLen);
|
_getEdgeLinkingContour(&v_trees[idx0], true, firstPt, region[2].edgeLink_1, scanLines, false, workpieceParam.lineLen);
|
||||||
idx1 = _getPointClosestContour(v_trees, true, lastPt, scanLines, false);
|
idx1 = _getPointClosestContour(v_trees, true, lastPt, scanLines, false);
|
||||||
if (idx1 < 0)
|
if (idx1 < 0)
|
||||||
{
|
{
|
||||||
*errCode = SX_ERR_INVLD_CLOSES_PT;
|
*errCode = SX_ERR_INVLD_CLOSES_PT;
|
||||||
return;
|
return workpieceCorners;
|
||||||
}
|
}
|
||||||
_getEdgeLinkingContour(&v_trees[idx1], true, lastPt, region[2].edgeLink_2, scanLines, false, workpieceParam.lineLen);
|
_getEdgeLinkingContour(&v_trees[idx1], true, lastPt, region[2].edgeLink_2, scanLines, false, workpieceParam.lineLen);
|
||||||
if ((region[2].edgeLink_1.size() < 5) || (region[2].edgeLink_2.size() < 5))
|
if ((region[2].edgeLink_1.size() < 5) || (region[2].edgeLink_2.size() < 5))
|
||||||
@ -486,14 +486,14 @@ SSX_BQworkpieceResult sx_BQ_getWorkpieceCorners(
|
|||||||
if (idx0 < 0)
|
if (idx0 < 0)
|
||||||
{
|
{
|
||||||
*errCode = SX_ERR_INVLD_CLOSES_PT;
|
*errCode = SX_ERR_INVLD_CLOSES_PT;
|
||||||
return;
|
return workpieceCorners;
|
||||||
}
|
}
|
||||||
_getEdgeLinkingContour(&h_trees[idx0], false, firstPt, region[3].edgeLink_1, scanLines, false, workpieceParam.lineLen);
|
_getEdgeLinkingContour(&h_trees[idx0], false, firstPt, region[3].edgeLink_1, scanLines, false, workpieceParam.lineLen);
|
||||||
idx1 = _getPointClosestContour(h_trees, false, lastPt, scanLines, true);
|
idx1 = _getPointClosestContour(h_trees, false, lastPt, scanLines, true);
|
||||||
if (idx1 < 0)
|
if (idx1 < 0)
|
||||||
{
|
{
|
||||||
*errCode = SX_ERR_INVLD_CLOSES_PT;
|
*errCode = SX_ERR_INVLD_CLOSES_PT;
|
||||||
return;
|
return workpieceCorners;
|
||||||
}
|
}
|
||||||
_getEdgeLinkingContour(&h_trees[idx1], false, lastPt, region[3].edgeLink_2, scanLines, false, workpieceParam.lineLen);
|
_getEdgeLinkingContour(&h_trees[idx1], false, lastPt, region[3].edgeLink_2, scanLines, false, workpieceParam.lineLen);
|
||||||
if ((region[3].edgeLink_1.size() < 5) || (region[3].edgeLink_2.size() < 5))
|
if ((region[3].edgeLink_1.size() < 5) || (region[3].edgeLink_2.size() < 5))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user