mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0031675: Data Exchange - Error opening the STEP-file
Add a check for null array object ("Elements") within StepShape_GeometricSet.cxx
This commit is contained in:
parent
ce97cd9708
commit
16bb5630bc
@ -49,5 +49,7 @@ StepShape_GeometricSetSelect StepShape_GeometricSet::ElementsValue(const Standar
|
|||||||
|
|
||||||
Standard_Integer StepShape_GeometricSet::NbElements () const
|
Standard_Integer StepShape_GeometricSet::NbElements () const
|
||||||
{
|
{
|
||||||
|
if (elements.IsNull())
|
||||||
|
return 0;
|
||||||
return elements->Length();
|
return elements->Length();
|
||||||
}
|
}
|
||||||
|
16
tests/bugs/step/bug31675
Normal file
16
tests/bugs/step/bug31675
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
puts "===================================="
|
||||||
|
puts "0031675: Er-ror opening the STEP-file"
|
||||||
|
puts "===================================="
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
pload DCAF
|
||||||
|
|
||||||
|
# Read file
|
||||||
|
ReadStep D [locate_data_file bug31675.stp]
|
||||||
|
XGetOneShape res D
|
||||||
|
|
||||||
|
# Checking
|
||||||
|
checknbshapes res -face 1036 -wire 2103 -compound 6
|
||||||
|
checkshape res f
|
||||||
|
|
||||||
|
Close D
|
Loading…
x
Reference in New Issue
Block a user