B2020-073 Fixes a bad pare break in procedure FRC-0.1 step 14 RNO. It was as not keep all the children together with the parent.

This commit is contained in:
John Jenko 2020-05-20 19:06:19 +00:00
parent 0d572f335a
commit c266192519

View File

@ -1584,7 +1584,11 @@ namespace Volian.Print.Library
// The top of this step is more than 1/2 way down the page
if ((-yLocation + yStart) >= yLowerLimit)
if (myPara != lastBreak)
if ((-yLocation + yStart) >= yLowerLimit && !myPara.HasSecondRNOThatWillFit(yStart, yLowerLimit, yUpperLimit ,myList, stepLevel)) // Only if it is more than the lower limit // B2020-013 if it has a second RNO see if it will fit - Callaway OTO-AC-00002 step 2
// Second RNO check was added for the following:
// B2020-013 premature break in RNO column - Callaway OTO-AC-00002 step 2
// B2020-016 for Robinson AOP-010 step 27 was breaking too soon
// B2020-073 was not keeping all of RNO sub-step together - Comanche Peak FRC-0.1 (unit 1) Step 14
if ((-yLocation + yStart) >= yLowerLimit && !myPara.HasSecondRNOThatWillFit(yStart, yLowerLimit, yUpperLimit, myList, stepLevel)) // Only if it is more than the lower limit
return myPara;
// B2019-103, B2019-114 Break at a step if the step will fit on a page by itself and it will
// not fit in the current page
@ -1631,7 +1635,9 @@ namespace Volian.Print.Library
}
// B2020-013 premature break in RNO column - Callaway OTO-AC-00002 step 2
private bool HasSecondRNOThatWillFit(float yStart, float yLowerLimit, float yUpperLimit, StepLevelList myList, int stepLevel)//float ystart, float ylowerlimit)
// B2020-016 bad pagination on RNOs for Robinson AOP-010 step 27 , AOP-024 Step 10, EOP E-0 step 10, EOP ECA-2.1 step 28
// B2020-073 was not keeping all of RNO sub-step together - Comanche Peak FRC-0.1 (unit 1) Step 14
private bool HasSecondRNOThatWillFit(float yStart, float yLowerLimit, float yUpperLimit, StepLevelList myList, int stepLevel)
{
if (!MyItemInfo.IsInRNO || stepLevel+1 >= myList.Count)
return false; // does not have second RNO
@ -1640,11 +1646,14 @@ namespace Volian.Print.Library
while (!tmp.MyItemInfo.IsRNOPart) tmp = tmp.MyParent;
if (tmp.MyItemInfo.RNOs != null && tmp.MyItemInfo.RNOs.Count > 0)
{
foreach (float yLocation in myList[stepLevel+1].Keys) // loop thru yLocation from pagination list
for (int i = 1; stepLevel + i < myList.Count; i++) // loop thru the other step levels
{
if ((-yLocation + yStart) >= yLowerLimit)
if (myList[stepLevel + 1][yLocation].MyParent.MyItemInfo.IsRNOPart) // B2020-016 for Robinson AOP-010 step 27 was breaking too soon
foreach (float yLocation in myList[stepLevel + i].Keys) // loop thru yLocation from pagination list
{
if ((tmp != myList[stepLevel + i][yLocation] && myList[stepLevel + i][yLocation].MyItemInfo.IsRNOPart) ||
(myList[stepLevel + i][yLocation].MyParent != tmp) && myList[stepLevel + i][yLocation].MyParent.MyItemInfo.IsRNOPart)
return true; // has a second RNO that will fit
}
}
}
return false;