How to get the unit information from the iges file.

Hi All,

I mean if the raw iges file is saved as INCH unit, I just want to load it as INCH unit. I can't find API to get this information from IGESCAFControl_Reader.
Any suggestion is welcome. Thanks in advance.

-Ding

Cauchy Ding's picture

I got it. It can be accessed by
Handle_TCollection_HAsciiString unit = reader.IGESModel()->GlobalSection().UnitName();
And before call reader.Transfer(), you can set it by
Standard_CString unit2 = unit->ToCString();
if(!Interface_Static::SetCVal ("xstep.cascade.unit", unit2))
JUMP_ERROR;