Handle(StepShape_ShapeRepresentation)::DownCast(RR->Rep1());
if(SR==SR2)
SR2 = Handle(StepShape_ShapeRepresentation)::DownCast(RR->Rep2());
- Interface_EntityIterator subs2 = graph.Sharings(SR2);
- for(subs2.Start(); subs2.More(); subs2.Next()) {
- Handle(StepShape_ShapeDefinitionRepresentation) SDR2 =
- Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(subs2.Value());
- if(!SDR2.IsNull()) IsRoot = Standard_False;
- //else {
- // if(SR==SRR->Rep2()) IsRoot = Standard_False;
- //}
+ if(!SR2.IsNull())
+ {
+ Interface_EntityIterator subs2 = graph.Sharings(SR2);
+ for(subs2.Start(); subs2.More(); subs2.Next()) {
+ Handle(StepShape_ShapeDefinitionRepresentation) SDR2 =
+ Handle(StepShape_ShapeDefinitionRepresentation)::DownCast(subs2.Value());
+ if(!SDR2.IsNull()) IsRoot = Standard_False;
+ //else {
+ // if(SR==SRR->Rep2()) IsRoot = Standard_False;
+ //}
+ }
}
}
}
--- /dev/null
+puts "============"
+puts "OCC27404"
+puts "============"
+puts ""
+#######################################################################
+# Data Exchange - access violation when reading STEP file
+#######################################################################
+
+param read.step.product.mode 0
+newmodel
+
+XNewDoc D
+
+ReadStep D [locate_data_file bug27404_pmi.stp]