1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0025014: ShapeAnalysis_WireOrder produces Standard_RangeError on empty wire (debug mode only)

The reason of exception is liquidated.

Test case for issue CR25014

Clean obsolete commented out code
This commit is contained in:
nbv
2014-09-11 16:37:22 +04:00
committed by bugmaster
parent 24b40f605a
commit 3e9b53cbf9
3 changed files with 16 additions and 165 deletions

View File

@@ -185,8 +185,12 @@ static Standard_Boolean IsBetter(const Standard_Integer first,
void ShapeAnalysis_WireOrder::Perform(const Standard_Boolean /*closed*/)
{
Standard_Integer i, nb = myXYZ->Length() / 2;
myOrd = new TColStd_HArray1OfInteger(1,nb); myOrd->Init(0);
myStat = 0;
Standard_Integer i, nb = NbEdges();
if(nb == 0)
return; // no edges loaded, nothing to do -- return with status OK
myOrd = new TColStd_HArray1OfInteger(1,nb);
myOrd->Init(0);
Handle(TColStd_HSequenceOfInteger) seq = new TColStd_HSequenceOfInteger;
TColStd_SequenceOfTransient loops;