if ( Sh.IsNull()) {
Message_Msg Msg1156("IGES_1156"); //"the Vertex number %d is a null object." FAIL!!!
Handle(TCollection_HAsciiString) label = GetModel()->StringLabel(start);
- Msg1156.Arg("vertex %d");
- Msg1156.Arg(index);
+ Msg1156.Arg("vertex");
Msg1156.Arg(label);
SendWarning(start,Msg1156);
}
Msg1306.Arg(inum);
SendWarning(start,Msg1306);
TopoDS_Edge Sh;
- AddShapeResult(start,Sh);
+ AddShapeResult(start,Sh); // add null shape to avoid shift of indexing
}
else {
TopoDS_Shape Sh = TC.TransferTopoCurve(thecurve);
}
else if (Sh.ShapeType() == TopAbs_WIRE) {
// pas traite
- Message_Msg Msg1325("IGES_1325"); //"Edge : result of TransferTopoCurve is WIRE"
+ Message_Msg Msg1325("IGES_1325"); //"Item %d of EdgeList cannot be represented by single edge (non-continuous or composite curve)."
Msg1325.Arg(inum);
SendWarning(start,Msg1325);
- //AddWarning(start,"Edge : result of TransferTopoCurve is WIRE");
- }
+ AddShapeResult(start,Sh);
+ }
}
else {
Message_Msg Msg1156("IGES_1156");
Msg1156.Arg("underlying curve");
Msg1156.Arg(label);
SendWarning(start,Msg1156);
- }
+ AddShapeResult(start,Sh); // add null shape to avoid shift of indexing
+ }
}
}
}
if ( Sh.IsNull()) {
Message_Msg Msg1156("IGES_1156");
Handle(TCollection_HAsciiString) label = GetModel()->StringLabel(start);
- Msg1156.Arg("edge %d");
- Msg1156.Arg(index);
+ Msg1156.Arg("edge");
Msg1156.Arg(label);
SendWarning(start,Msg1156);
}
else if (( itype == 0) && (theedge ->IsKind(STANDARD_TYPE(IGESSolid_EdgeList)))) {
DeclareAndCast(IGESSolid_EdgeList,thelist,theedge);
TopoDS_Shape Sh = TransferEdge(thelist,indexlist);
- curve3d->Add (Sh);
- }
+ if (Sh.IsNull())
+ {
+ continue; // skip non-translated edge hoping for the best; warning is already generated by TransferEdge()
+ }
+ curve3d->Add(Sh);
+ }
else {
Message_Msg Msg1365("IGES_1365"); //"Improper type for the edge"
Handle(TCollection_HAsciiString) label = GetModel()->StringLabel(start);
Msg1365.Arg(iedge);
SendWarning(start,Msg1365);
- //AddWarning (start, "Improper type for the edge");
continue;
}
if (!orientation) curve3d->Reverse();