How to read materials ?

Hi again,
I'm still trying to make and XDE step export/import module. I found a XCAFDoc_MaterialTool class and want to use it dealing with materials (basically all I want is a name and a density to import/export). But as I haven't found any documentation about it I have to experiment.
While writing, I can set materials to shapes. While reading, I can get a sequence of materials labels and a sequence of shapes labels, but I don't see how to make a link between them.

My materials are set like this (lbox0 and lbox1 are shapes TDF_Label):

Handle(TCollection_HAsciiString) nomA= new TCollection_HAsciiString("Acier");
Handle(TCollection_HAsciiString) nomP= new TCollection_HAsciiString("Pate a Sel");
Handle(TCollection_HAsciiString) desc = new TCollection_HAsciiString("materiau");
Handle(TCollection_HAsciiString) densnom = new TCollection_HAsciiString("gram_per_cubic_centimeter");
Handle(TCollection_HAsciiString) densdesc = new TCollection_HAsciiString("massic_density");

TDF_Label matAcier = myMaterials->AddMaterial(nomA, desc, 3.56, densnom, densdesc);
TDF_Label matPate = myMaterials->AddMaterial(nomP, desc, 3.06, densnom, densdesc);


Now I can extract informations out of matAcier or matPate with GetMaterial(), i can get them in a TDF_LabelSequence with GetMaterialLabels(), but can't link them to my boxes labels.


PS:Sorry for bothering you every day ^^

S's picture

Are these functions even operational yet ?