Import colors in IGES format

Hi all,

I need to know how to get colors from IGES entity, while reading a IGES file.
Can anyone help me ?

Also, I want to know how can I process the transformation (iges-type: 124) on entities while translating them.

thank you !

Forum supervisor's picture

Hello,

To process colors you will need the XDE module.
Consult documentation - IGES and XDE User's Guides.
You will also find some more information in a similar post on STEP (http://www.opencascade.com/community/forum/thread_5265/).

Type 124 (transformation matrix) is automatically considered during translation.

Hope this helps you.

Best regards,
Forum supervisor

PLN's picture

thank you for your quick answer,
I've already red that document concerning XDE, but it's very hard to understand how to convert the
IGESData_ColorEntity
to
QuantityColor

If you had a small source example dealing with that part, i'll be very intersting in using it.

Also, i'm agree with Deelip in thread 5265, more efforts should be done on the The OCC documentation about XDE, IGES and STEP use.
More concrete source code example will be appreciated.

Forum supervisor's picture

Hello,

We have an XDE sample, which is part of the Advanced Samples pack available to our support clients only. Its snapshot
was given in the mentioned thread (here is a direct URL - http://www.opencascade.com/pub/demos/xde-snapshot.gif).

Otherwise, you may try to experiment in Draw Test Harness (XDEDRAWEXE executable).

Draw> source $env(CSF_XCAFDefaults)/dftree.tcl
Draw> NewDoc MyDoc MDTV-XCAF
Draw> ReadIges MyDoc myfile.igs
Draw> DFBrowse MyDoc

and see the source code of the commands. Use for example:
Draw> getsourcefile ReadIges

Best regards,
Forum supervisor

PLN's picture

Does someone know how to get color assosiated to the ColorRank of an entity ?

Patrik Mueller's picture

Hi,

take a look at the following methods:

IGESCAFControl_Reader::ReadColors
IGESCAFControl::DecodeColor

HTH,

Patrik

PLN's picture

THANK YOU !!!!

PLN's picture

Does someone know how to get color assosiated to the ColorRank of an IGES entity ?

Jansen Yu's picture

Hi,

I'm trying to use these commands to test XDE but it says NewDoc (ReadIges too) is not recognised. What's the problem?

In addition, are there any ways to get some samples related to XDE iges read/write?

Thanks a lot in advance!

Jansen

Jansen Yu's picture

Hi,

I'm trying to use these commands to test XDE but it says NewDoc (ReadIges too) is not recognised. What's the problem?

In addition, are there any ways to get some samples related to XDE iges read/write?

Thanks a lot in advance!

Jansen

Jansen Yu's picture

Hi,

I'm trying to use these commands to test XDE but it says NewDoc (ReadIges too) is not recognised. What's the problem?

In addition, are there any ways to get some samples related to XDE iges read/write?

Thanks a lot in advance!

Jansen