mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-08 18:40:55 +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:
parent
0c4033b4d1
commit
4efafd1f3a
@ -55,12 +55,15 @@ void RWStepShape_RWAdvancedFace::ReadStep
|
|||||||
Standard_Integer nsub2;
|
Standard_Integer nsub2;
|
||||||
if (data->ReadSubList (num,2,"bounds",ach,nsub2)) {
|
if (data->ReadSubList (num,2,"bounds",ach,nsub2)) {
|
||||||
Standard_Integer nb2 = data->NbParams(nsub2);
|
Standard_Integer nb2 = data->NbParams(nsub2);
|
||||||
aBounds = new StepShape_HArray1OfFaceBound (1, nb2);
|
if( nb2)
|
||||||
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
{
|
||||||
//szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
|
aBounds = new StepShape_HArray1OfFaceBound (1, nb2);
|
||||||
if (data->ReadEntity (nsub2, i2,"face_bound", ach, STANDARD_TYPE(StepShape_FaceBound), anent2))
|
for (Standard_Integer i2 = 1; i2 <= nb2; i2 ++) {
|
||||||
aBounds->SetValue(i2, anent2);
|
//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 ---
|
// --- inherited field : faceGeometry ---
|
||||||
|
11
tests/bugs/step/bug24283_1
Normal file
11
tests/bugs/step/bug24283_1
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
puts "============"
|
||||||
|
puts "OCC24283"
|
||||||
|
puts "============"
|
||||||
|
puts ""
|
||||||
|
#####################################################
|
||||||
|
# STEP read failes to read unbound advanced_face
|
||||||
|
#####################################################
|
||||||
|
|
||||||
|
ReadStep D [locate_data_file bug24283_spheres.stp]
|
||||||
|
|
||||||
|
|
19
tests/bugs/step/bug24283_2
Normal file
19
tests/bugs/step/bug24283_2
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
puts "============"
|
||||||
|
puts "OCC24283"
|
||||||
|
puts "============"
|
||||||
|
puts ""
|
||||||
|
#####################################################
|
||||||
|
# STEP read failes to read unbound advanced_face
|
||||||
|
#####################################################
|
||||||
|
|
||||||
|
stepread [locate_data_file bug24283_spheres.stp] a *
|
||||||
|
tpcompound result
|
||||||
|
|
||||||
|
vinit
|
||||||
|
vdisplay result
|
||||||
|
vfit
|
||||||
|
vsetdispmode 1
|
||||||
|
set only_screen 1
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user