Using draco compression for glTF.

Hello all,

I am trying to use draco compression for glTF export, but glTFs are not compressed. Here is my code,

int main(int argc, char* argv[])
{
//step_to_gltf(argv[0], argv[1], 1);

STEPCAFControl_Reader reader;
reader.SetNameMode(Standard_True);
reader.SetColorMode(Standard_True);
IFSelect_ReturnStatus readstat = reader.ReadFile("Cylinder.stp");
if (!(IFSelect_RetDone == readstat))
{
std::cout << "Error: Please provide correct input file path." << std::endl;
return 1;
}

Handle(TDocStd_Document) doc;
Handle(XCAFApp_Application) anApp = XCAFApp_Application::GetApplication();
anApp->NewDocument("MDTV-XCAF", doc);
if (!reader.Transfer(doc)) {
std::cout << "Cannot read input file" << std::endl;
return 1;
}
else {
std::cout << "Step reading Successful\n" << std::endl;
}

TDF_Label aLabel = doc->Main();
Handle(XCAFDoc_ShapeTool) myAssembly = XCAFDoc_DocumentTool::ShapeTool(aLabel);

for (XCAFPrs_DocumentExplorer aDocExplorer(doc, XCAFPrs_DocumentExplorerFlags_None);
aDocExplorer.More(); aDocExplorer.Next())
{
const XCAFPrs_DocumentNode& aDocNode = aDocExplorer.Current();
TopoDS_Shape cmp = myAssembly->GetShape(aDocNode.RefLabel);
BRepMesh_IncrementalMesh mesh(cmp, 0.125, 0.125, Standard_True);
}

RWGltf_CafWriter gltf("D:/Cylinder_COMP.gltf", Standard_False);
Standard_Real aSystemUnitFactor = UnitsMethods::GetCasCadeLengthUnit();
gltf.ChangeCoordinateSystemConverter().SetInputLengthUnit(aSystemUnitFactor);
gltf.ChangeCoordinateSystemConverter().SetInputCoordinateSystem(RWMesh_CoordinateSystem_glTF);
TColStd_IndexedDataMapOfStringString strobj;
Message_ProgressRange msg;
auto draco = gltf.CompressionParameters();
draco.DracoCompression = true;
gltf.SetCompressionParameters(draco);
bool p = gltf.Perform(doc, strobj, msg);
if (p) {
std::cout << "Gltf Export completed" << std::endl;
}
return 0;
}

I am getting same output for 'draco.DracoCompression = true' and 'draco.DracoCompression = false' I am not getting any error messages as well . Am I missing something here?

OpenCASCADE: v 7.7.0 OS: Windows 10, x64

Thanks and Regards,
Prajwal