IGES: How to identify the type of an object from an IGES file?

Hi All,

How to identify the type of an object from an IGES file?

For example, I have an IGES file containing a cube. I can verify this using an IGES viewer. But I want to identify this as "cube" through my program using OCC. How to do that?

Is it possible to identify "objects as a whole" contained in an IGES file ?



Rob Bachrach's picture

There is no easy way that I know of. You would need to brute force it. So, for a cube, you would need to traverse the topology and find a shape consisting of 6 connected faces. Make sure the faces are composed of planar surfaces, and make sure their normals are as necessary to compute a cube. Of course, if you need something more complicated than a cube, this can mean trouble.

Roman Lygin's picture

Hi Jahfer,

IMHO, this is an inapplicable question in a general case. What kind of information would you expect if the file stored a car engine model ?
If you refer to the IGES standard you will learn that it just stores geometrical (and topological) entities (surfaces, curves), groups and assemblies, colors, and other stuff.
If you agree with your model supplier, he/she could store some descriptive information in the file and you could restore it from there. You could use Name entities, Start section of the file, whatever works for you both.

Hope this helps.