Translate CASCADE shape(color) to IGES file

Dear all,

I can't find how to translate OpenCASCADE shape(only color) to IGES entity attribute(color) when i write IGES file.

Could anybody help me, Please ?


Christian CAILLET's picture

Actually, you can act on the produced IGES entities, once converted from TopoDS_Shape and before writing them to file. A simple way is then to set a color on each of them. So, on the Writer for IGES, after calling AddShape and before calling Write.

The class IGESControlStd_Writer has a method Model which returns the IGES Model, which itself carries the IGES entities. On IGES Entities (class IGESData_IGESEntity), there is a method InitColor, which allows to set, either an immediate value (integer) or a Color Entity already created. So, it is possible to act on some or all of the IGES entities to be written.