IGES TransferRoots vs. TransferEntity

I am using IGESControl_Reader and am confused by some behavior. I have 2 different loops procesing the file in different ways. In the first method, no shapes are returned by the transfer process, so nothing is processed. In the second method, the entities are transferred and the shapes are created. I've tried variations of the first method, by getting the list of entities and calling reader.TransferEntity(), but it doesn't change the results. The first method does work for some files, but not this particular one - it's just a small file with 3 shapes (I can send it to you if you'd like).

The first method:

for(int index = 1; index {
reader.ClearShapes();
reader.TransferOne(index);
int shapeCount = reader.NbShapes();
for(int shapeIndex = 1; shapeIndex {
//... process each shape
}
}

and the second method:

reader.TransferRoots();
int shapeCount = reader.NbShapes();
for(int shapeIndex = 1; shapeIndex {
//... process each shape
}

Michael Rice's picture

There is a typo in the above post - the loops should be <= on the tests. The does do <=. So, still looking for why TransferEntity() does not create any shapes, but TransferRoots() does.

Michael