mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0021317: Face cannot be fixed by Shape Healing
Fix that face, in which only wire was reordered during shape healing, was not replaced. Add test case for this fix Add status for shifted wires in reordering. Modified test case de/step_1/E3 according to new reference data
This commit is contained in:
@@ -594,6 +594,7 @@ Standard_Boolean ShapeAnalysis_Wire::CheckOrder(ShapeAnalysis_WireOrder& sawo,
|
||||
case 2: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE2); break;
|
||||
case -1: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE3); break;
|
||||
case -2: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE4); break;
|
||||
case 3: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_DONE5); break;//only shifted
|
||||
case -10: myStatus = ShapeExtend::EncodeStatus (ShapeExtend_FAIL1); break;
|
||||
}
|
||||
return LastCheckStatus (ShapeExtend_DONE);
|
||||
|
@@ -393,8 +393,32 @@ void ShapeAnalysis_WireOrder::Perform(const Standard_Boolean /*closed*/)
|
||||
if(stTmp>=0) stTmp = (mainSeq->Value(i) > 0 ? 1 : -1);
|
||||
myOrd->SetValue(i,mainSeq->Value(i));
|
||||
}
|
||||
myStat = stTmp;
|
||||
return;
|
||||
if (stTmp == 0) {
|
||||
myStat = stTmp;
|
||||
return;
|
||||
}
|
||||
else {//check if edges were only shifted in reverse or forward, not reordered
|
||||
Standard_Boolean isShiftReverse = Standard_True, isShiftForward = Standard_True;
|
||||
Standard_Integer tmpFirst = 0, tmpSecond = 0, length = mainSeq->Length();
|
||||
for(i = 1; i <= length - 1; i++) {
|
||||
tmpFirst = mainSeq->Value(i);
|
||||
tmpSecond = mainSeq->Value(i+1);
|
||||
if (!(tmpSecond - tmpFirst == 1 || (tmpFirst == length && tmpSecond == 1)))
|
||||
isShiftForward = Standard_False;
|
||||
if (!(tmpFirst - tmpSecond == 1 || (tmpSecond == length && tmpFirst == 1)))
|
||||
isShiftReverse = Standard_False;
|
||||
}
|
||||
tmpFirst = mainSeq->Value(length);
|
||||
tmpSecond = mainSeq->Value(1);
|
||||
if (!(tmpSecond - tmpFirst == 1 || (tmpFirst == length && tmpSecond == 1)))
|
||||
isShiftForward = Standard_False;
|
||||
if (!(tmpFirst - tmpSecond == 1 || (tmpSecond == length && tmpFirst == 1)))
|
||||
isShiftReverse = Standard_False;
|
||||
if (isShiftForward || isShiftReverse)
|
||||
stTmp = 3;
|
||||
myStat = stTmp;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
Reference in New Issue
Block a user