Color Discrepancy Between Tessellated and Non-tessellated STEP Files

I'm importing STEP files using OCCT 7.8 and there is a discrepancy in the model’s coloration depending on the representation.

Basically, when the STEP file has an exact representation of the geometry (via ABSH for example), the colors are correctly retrieved. However, STEP files with tessellated representation (via TSH, supported since v7.7) do not pick up the override colors.

I produced a simple example that I am attaching to this ticket to illustrate the problem. In them, I have a red parallelepiped, but with a single blue face.

The structure of the geometry in all files is as follows:

SHAPE
...SOLID........STYLED_ITEM(red)
......FACE......OVER_RIDING_STYLED_ITEM(blue)
......FACE
......FACE
......FACE
......FACE
......FACE

The CatiaCube_NoTess file is imported correctly, but the CatiaCube_Tess is completely red. I can’t find the blue color information in it.

The importer’s code is the same for both representations and follows the documentation.

The question is: Is there a different process to get colors of tessellated models? Or is it an unfinished feature? Maybe a bug?

Thanks in advance.

Dmitrii Pasukhin's picture

Hello, it is a bug. Thank you for a report. We will investigate and plan that issue in the release.

https://tracker.dev.opencascade.org/view.php?id=33638

Best regards, Dmitrii.

Douglas Oliveira's picture

Thank you, Dmitrii, for the answer.

Another question for you, there is some workaround while this issue is not fixed?

To elaborate, I’m aware of the StepData_StepModel object that preserves the STEP entity structure.
After the transfer process, is it possible to retrieve the corresponding shape entity from a TopoDS_Shape?

I already know how to retrieve styles associated to a shape entity, but I don't know how to make this link.

Any guidance or suggestions you could provide would be greatly appreciated.

Dmitrii Pasukhin's picture

Hello, the issue is fixed and waiting for integration. You can monitore issue https://tracker.dev.opencascade.org/view.php?id=33638

Best regards, Dmitrii.