mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0033331: Data Exchange, Step Import - Unsupported Representation Items
Fixed problem with iteration on Null RI
This commit is contained in:
parent
6b9e0dc3f8
commit
efe960751c
@ -4692,9 +4692,16 @@ void collectRepresentationItems(const Interface_Graph& theGraph,
|
|||||||
const Handle(StepShape_ShapeRepresentation)& theRepresentation,
|
const Handle(StepShape_ShapeRepresentation)& theRepresentation,
|
||||||
NCollection_Sequence<Handle(StepRepr_RepresentationItem)>& theItems)
|
NCollection_Sequence<Handle(StepRepr_RepresentationItem)>& theItems)
|
||||||
{
|
{
|
||||||
Handle(StepRepr_HArray1OfRepresentationItem) aReprItems = theRepresentation->Items();
|
for (StepRepr_HArray1OfRepresentationItem::Iterator anIter(theRepresentation->Items()->Array1());
|
||||||
for (Standard_Integer itemIt = aReprItems->Lower(); itemIt <= aReprItems->Upper(); itemIt++)
|
anIter.More(); anIter.Next())
|
||||||
theItems.Append(aReprItems->Value(itemIt));
|
{
|
||||||
|
const Handle(StepRepr_RepresentationItem)& anReprItem = anIter.Value();
|
||||||
|
if (anReprItem.IsNull())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
theItems.Append(anReprItem);
|
||||||
|
}
|
||||||
|
|
||||||
Interface_EntityIterator entIt = theGraph.TypedSharings(theRepresentation, STANDARD_TYPE(StepRepr_RepresentationRelationship));
|
Interface_EntityIterator entIt = theGraph.TypedSharings(theRepresentation, STANDARD_TYPE(StepRepr_RepresentationRelationship));
|
||||||
for (entIt.Start(); entIt.More(); entIt.Next())
|
for (entIt.Start(); entIt.More(); entIt.Next())
|
||||||
|
14
tests/bugs/step/bug33331
Normal file
14
tests/bugs/step/bug33331
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
puts "===================================="
|
||||||
|
puts "0033331: Data Exchange, Step Import - Unsupported Representation Items"
|
||||||
|
puts "===================================="
|
||||||
|
puts ""
|
||||||
|
|
||||||
|
pload DCAF
|
||||||
|
catch {Close D}
|
||||||
|
|
||||||
|
param "read.stepcaf.subshapes.name" 1
|
||||||
|
|
||||||
|
ReadStep D [locate_data_file bug33331.stp]
|
||||||
|
|
||||||
|
param "read.stepcaf.subshapes.name" 0
|
||||||
|
Close D
|
Loading…
x
Reference in New Issue
Block a user