Getting colours from STEP Model

Hello.

I initially thought this was a bug, so I reported https://tracker.dev.opencascade.org/view.php?id=32728; however it seems I'm doing it wrong, so I'll start over here.

We've got an application that imports STeP files: we need to preserve the structure, but also translate attributes (colours, layers, etc...).
It's built like in the example I'm posting (octest.cxx).
We are usually able to get everything right, but, with a particular sample, we get no colours at all.

kgv writes: "This particular STEP file consists of a single Compound having 9 children. Children are represented by 3 unique Solids instanced 9 times - with different Locations. Each Solid defines a basic surface color, and this color is overridden by some Faces inside Solid. Using XCAFDoc_ShapeTool::GetShape() taking TopoDS_Shape on input might be quite tricky, as shapes should be specified with correct Locations, and color might be specified at every shape level".

So my first question is: does "tricky" means impossible? Is there a way to achieve this without deeply changing the way our app is built?

Failing that, kgv also provided an alternative sample which works, but, in order to integrate it, I'd like to understand it better.
It uses things like XCAFPrs_DocumentExplorer, XCAFPrs::CollectStyleSettings(), etc...
None of this is described in the user guide (https://dev.opencascade.org/doc/overview/html/occt_user_guides__xde.html) and the reference docs only describe these very briefly.
Is there some other documentation I should/could look into?

Thanks in advance.

Attachments: