Trouble getting geometry out of IGES Model

I use IGESFile_Read(filename, model, protocol) to read the contents of an iges file. I then interrogate the model to see if there are any entities.

When i read a couple sample files the model does get populated but the problem is they all look like TColStd_HSequenceOfTransient objects to me.

My Question is, how do I get the geometry objects for lines, arcs, splines, etc.?
The purpose of this is for a 2d Cad Viewer application.

Sharjith Naramparambath's picture

I am not sure why you are using IGESFile_Read but the sample application clearly shows the use of IGESControl_Reader to get a TopoDS_Shape from an IGES file by calling TransferRoots() and OneShape() methods from its base class. I haven't tried it myself though, you can directly get the IGES model by calling the IGESModel() method to get it as and IGESData_IGESModel and then make further interrogations to get Entity according to Rank.