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

0031786: Data Exchange - After the importing STEP file the free shape is empty

Fixed throwing an exception when the relation to read views is incorrect
This commit is contained in:
dpasukhi
2021-11-29 11:36:21 +03:00
committed by sshutina
parent a030834dea
commit c6e707147f

View File

@@ -4293,8 +4293,10 @@ Standard_Boolean STEPCAFControl_Reader::ReadViews(const Handle(XSControl_WorkSes
for (; anIter.More(); anIter.Next()) {
if (anIter.Value()->IsKind(STANDARD_TYPE(StepRepr_MappedItem))) {
Handle(StepRepr_MappedItem) anItem = Handle(StepRepr_MappedItem)::DownCast(anIter.Value());
Handle(StepRepr_Representation) aRepr = anItem->MappingSource()->MappedRepresentation();
collectViewShapes(theWS, theDoc, aRepr, aShapes);
if (Handle(StepRepr_Representation) aRepr = anItem->MappingSource()->MappedRepresentation())
{
collectViewShapes(theWS, theDoc, aRepr, aShapes);
}
}
else if (anIter.Value()->IsKind(STANDARD_TYPE(StepVisual_AnnotationOccurrence)) ||
anIter.Value()->IsKind(STANDARD_TYPE(StepVisual_DraughtingCallout))) {