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

0024283: STEP read failes to read unbound advanced_face

Fix to avoid exception if sphere is written without bounds.
This commit is contained in:
gka
2013-12-04 10:47:40 +04:00
committed by abv
parent 0c4033b4d1
commit 4efafd1f3a
3 changed files with 39 additions and 6 deletions

View File

@@ -55,12 +55,15 @@ void RWStepShape_RWAdvancedFace::ReadStep
Standard_Integer nsub2;
if (data->ReadSubList (num,2,"bounds",ach,nsub2)) {
Standard_Integer nb2 = data->NbParams(nsub2);
aBounds = new StepShape_HArray1OfFaceBound (1, nb2);
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
if (data->ReadEntity (nsub2, i2,"face_bound", ach, STANDARD_TYPE(StepShape_FaceBound), anent2))
aBounds->SetValue(i2, anent2);
}
if( nb2)
{
aBounds = new StepShape_HArray1OfFaceBound (1, nb2);
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
if (data->ReadEntity (nsub2, i2,"face_bound", ach, STANDARD_TYPE(StepShape_FaceBound), anent2))
aBounds->SetValue(i2, anent2);
}
}
}
// --- inherited field : faceGeometry ---