For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Problem with IGES (TransferRoots)

Robert Gaisbauer's picture


i'm working on a linux machine running occ50. i have written the following procedure for reading iges files:

IGESToBRep_Reader reader;
Standard_Integer stat = reader.LoadFile((char*)filename);
cout if (reader.Check (Standard_True)) cout reader.TransferRoots(Standard_False);

this work fine for most IGES files, but for some, like the attached, it crashes in the last line with output:

Beginning of IGES data translation.
read.precision.mode : 0
read.iges.bspline.continuity : 1
read.surfacecurve.mode : 0

that's all. i have tried loading the file with the DRAW test program and everything works fine.

so i'm not sure, do i have a mistake in my function or is there a bug hidden somewhere in the TransferRoots routine ...

looking foreward to any suggestions

the iges-file can be downloaded on

Patrik Mueller's picture


try this:

IGESControl_Reader Reader;

Standard_Integer status = Reader.ReadFile(aFileName);

if (status != IFSelect_RetDone) return status;
TopoDS_Shape aShape = Reader.OneShape();

return status;

The difference is using "IGESControl_Reader" instead of "IGESToBRep_Reader"



Robert Gaisbauer's picture

hi patrik!

thx for your urgent reply. unfortunately i have already tried your approach. but the result is absolutely the same.

nevertheless, thx a lot

Patrik Mueller's picture

Hi Robert,

I can open your IGES file without problems. Perhaps you can give me some more infos or code??


Robert Gaisbauer's picture

thx again!

i have tried it again now, and it works somehow. but i'm not sure if it works again tomorrow. i uploaded a second file, which doesn't work either.

when executed in gdb, i get the error message:


Program received signal SIGSEGV, Segmentation fault.
0x4360469a in ShapeExtend_WireData::Add(TopoDS_Shape const&, int) ()
from /home/robert/netgen/occ/lib/

Patrik Mueller's picture

Hi Robert,

I also get crashes if I try to open the IGES file. I'm afraid you can't use it at the moment.



jerome dufaure's picture

I have download your file A6-610-314-0132.igs.
It crashes when i try to open it with OCC.
I Hvae converted it in STEP format.
Now I open it with no bugs.
If you want to use this file, i think using a step file is a good way.
Good luck

Francois Lauzon's picture

the root entity you have in your iges files is a IGESSolid_ManifoldSolid and one of the surface in the solid can't be transfered, and the solid can't be build. So you might try to transfer all of the faces instead with something like this:

// read file in memory
IGESControl_Reader aReader;
IFSelect_ReturnStatus stat=aReader.ReadFile((char*)filename);

// get iges faces
// usually, you might use
// Handle(TColStd_HSequenceOfTransient) aListInit=aReader.GiveList("xst-transferrable-roots");
Handle(TColStd_HSequenceOfTransient) aList=aReader.GiveList("iges-faces");

// transfert all the iges entity
TopTools_SequenceOfShape listOfShapes;
for (j=1; jLength(); j++) {
// downcast to an iges entity
Handle(IGESData_IGESEntity) igesEntity= Handle(IGESData_IGESEntity)::DownCast(aList->Value(j));
if (!igesEntity.IsNull()) {
// clear any old shape
try {
// transfert is ok
if (aReader.IsDone()) {

// get the shape
TopoDS_Shape aShape=aReader.OneShape();
catch (Standard_Failure) {
catch (...) {

Good Luck,

Robert Gaisbauer's picture

happy new year all together!

thank you for that tip. i will use your approach just to be sure everything works. one last questions: are you using occ5.1 or an older version? i'm using occ5.0, so i thought perhaps 5.1 manages the file. but occ5.1 doesn't link with my gcc 3.3.1 and i didn't manage to rebuild it.


Francois Lauzon's picture

I am using 5.1

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.