This commit is contained in:
2025-05-04 11:29:00 +03:30
parent cf3846bee9
commit 38573265e8
3 changed files with 289 additions and 1 deletions
+127
View File
@@ -1080,6 +1080,7 @@ bool DetectXCAEAConditions(
XBoxZone rejectedPivot;
XBoxZone insidePivots[];
int insidePivotsCount = 0;
XBoxZone fakeBreakedPivot;
bool isRejectedOnMid = false;
bool hasInsidePivots = false;
bool hasPivots = HasChild(pivots);
@@ -1123,6 +1124,28 @@ bool DetectXCAEAConditions(
true //
);
Clean(allowedRejectedPivots);
//
// Select Fake Breakout Box ...
ENUM_XCA_PIVOTS allowedFakeBreakedPivots[] = {
XCA_PEAK,
XCA_VALE,
};
has = SelectFakeBreakedBox(
allowedFakeBreakedPivots,
fakeBreakedPivot,
pivots,
zBar,
cBar,
pBar,
p2Bar //
);
Clean(allowedFakeBreakedPivots);
if (has)
{
//
Print("Faked Breaked Box Detected ...");
}
}
//
@@ -1413,6 +1436,7 @@ bool DetectXCAEAConditions(
Clean(insidePivots);
pConditions.Clean();
rejectedPivot.Clean();
fakeBreakedPivot.Clean();
//
return result;
@@ -1673,6 +1697,109 @@ bool SelectRejectedBox(
return result;
}
//
bool SelectFakeBreakedBox(
ENUM_XCA_PIVOTS &allowedTypes[],
XBoxZone &box,
XBoxZone &boxes[],
XOHCL &zBar,
XOHCL &cBar,
XOHCL &pBar,
XOHCL &p2Bar //
)
{
//
bool result = false;
//
box.Clean();
//
// Validate ...
result =
zBar.IsValid() &&
cBar.IsValid() &&
pBar.IsValid() &&
p2Bar.IsValid() &&
HasChild(boxes);
if (!result)
{
return result;
}
//
XBoxZone tmp[];
Copy(
boxes,
tmp //
);
//
int idx = -1;
XBoxZone iBox;
while (HasChild(tmp))
{
//
idx = GetYoungest(tmp);
result = IsValidIndex(idx);
if (!result)
{
break;
}
//
iBox = tmp[idx];
ArrayRemove(
tmp,
idx,
1 //
);
//
// Checking Box Type Allowed ...
ENUM_XCA_PIVOTS iType = GetPivotType(iBox);
result = IsValid(iType) &&
(!HasChild(allowedTypes)
? true
: Contains(
iType,
allowedTypes //
));
if (!result)
{
//
iBox.Clean();
continue;
}
//
// Check Box Fake Breakeout ...
result = IsFakeBreakeout(
iBox,
cBar.Index() //
);
if (result)
{
//
box = iBox;
break;
}
//
iBox.Clean();
}
//
Clean(tmp);
iBox.Clean();
//
result = box.IsValid();
//
return result;
}
//
int ExtractValues(
double &values[],