custom properties from STEP to GLTF

Hi guys!
I use STEPCAFControl_Reader for reading step-files and STEPCAFControl_Reader for writing gltf.

Is it possible to get custom properties (like "density" from the attached file) from the intermidiate TDocStd_Document or in any other way?

I need to write it into extra fields of the resulting gltf.

#206=DERIVED_UNIT((#201,#202));
#207=DERIVED_UNIT((#203,#204));
#208=MEASURE_REPRESENTATION_ITEM('density measure',
POSITIVE_RATIO_MEASURE(19.3),#206);
#209=MEASURE_REPRESENTATION_ITEM('density measure',
POSITIVE_RATIO_MEASURE(0.76),#207);
#210=PROPERTY_DEFINITION_REPRESENTATION(#220,#214);
#211=PROPERTY_DEFINITION_REPRESENTATION(#221,#215);
#212=PROPERTY_DEFINITION_REPRESENTATION(#222,#216);
#213=PROPERTY_DEFINITION_REPRESENTATION(#223,#217);
#214=REPRESENTATION('material name',(#218),#2031);
#215=REPRESENTATION('density',(#208),#2031);
#216=REPRESENTATION('material name',(#219),#2032);
#217=REPRESENTATION('density',(#209),#2032);
#218=DESCRIPTIVE_REPRESENTATION_ITEM('\X2\0417043E043B043E0442043E\X0\',
'\X2\0417043E043B043E0442043E\X0\');
#219=DESCRIPTIVE_REPRESENTATION_ITEM('\X2\04140435044004350432043E\X0\
(\X2\043404430431\X0\)','\X2\04140435044004350432043E\X0\ (\X2\043404430431\X0\)');
#220=PROPERTY_DEFINITION('material property','material name',#2051);
#221=PROPERTY_DEFINITION('material property','density of part',#2051);
#222=PROPERTY_DEFINITION('material property','material name',#2052);
#223=PROPERTY_DEFINITION('material property','density of part',#2052);
#224=SURFACE_STYLE_RENDERING_WITH_PROPERTIES($,#253,(#226));
#225=SURFACE_STYLE_RENDERING_WITH_PROPERTIES($,#254,(#227));

Kirill Gavrilov's picture

This specific entity "density" is translated into XCAFDoc_Material within XCAF document, so that you may retrieve it with help of XCAFDoc_MaterialTool::GetDensityForShape() for an appropriate shape label.

Attachments: