Dear all,
I am currently implementing a 3dm Nurbs handler on Linux.
I have an issue with reading 3dm files. I followed the example “example_read”, but I always fall on the “Could not read model” case… Here is my code :
bool onNurbsCurve3dmReader::read(const QString& file){
FILE* text_fp = ON::OpenFile(file.toStdString().c_str(),"w");
if ( text_fp ){
ON_BinaryFile archive(ON::read3dm, text_fp);
ONX_Model model;
bool rc = model.Read(archive, NULL);
fclose(text_fp);
if (rc){
dtkInfo() << "Read model sucessfully";
return true;
}
else{
dtkInfo() << "Could not read model";
return false;
}
}
}
I am trying to read a simple sphere model.
I tried with different Rhino file format (Rhino 2,3,4,5), created and saved directly from the Rhino 5 interface on windows.
What can be the reason of such a read failure ?
Elisa