I trying to read IGES File.
But Program down during execution. Here My code to read Iges. and Down Position.
IGES Made by UG.
Help me. thank you

IGESControl_Reader Reader;
Standard_Integer status = Reader.ReadFile(aFileName);
Standard_Boolean failsonly = Standard_False;

if (status != IFSelect_RetDone) return status;


IFSelect_PrintCount mode = IFSelect_ItemsByEntity;
Reader.PrintCheckLoad(failsonly, mode);

// IFSelect_RetVoid,
// IFSelect_RetDone,
// IFSelect_RetError,
// IFSelect_RetFail,
// IFSelect_RetStop

Handle(TColStd_HSequenceOfTransient) myAllFace,myVisFace;
myAllFace = Reader.GiveList("iges-faces");
myVisFace = Reader.GiveList("iges-vigible-roots", myAllFace);

Standard_Integer i, nb = myVisFace->Length();
for(i=1;i Handle(Standard_Transient) ent = myVisFace->Value(i);
Standard_Boolean ok = Reader.TransferEntity(ent); ==> Here Down.....
// Standard_Boolean ok = Reader.TransferOne(i);

TopoDS_Shape aShape = Reader.OneShape();

return status;

SandAnar's picture

I think that you try to work with bad data address ent. The problem may in myVisFace transient, cause you get it by incorrect string "iges-vigible-roots" instead possible "iges-visible-root". All what I can advise you is to check the transient for null.
Wth Bst Rgrds, SandAnar - Druid from CessPit.

jangyj1's picture

Thank you for your reply.
I changed vigible->visible
But it does not work neither.
Any way thank you. But there is no another way to solve...???