Detailed error messages.

This commit is contained in:
Viktor Kovacs 2021-04-19 08:32:52 +02:00
parent 068e7d1f40
commit c4a0d68a37

View File

@ -50,9 +50,15 @@ OV.Importer3dm = class extends OV.ImporterBase
{
let rhinoDoc = this.rhino.File3dm.fromByteArray (fileContent);
if (rhinoDoc === null) {
this.SetError ();
this.SetMessage ('Failed to read Rhino file.');
return;
}
this.ImportRhinoDocument (rhinoDoc);
if (OV.IsModelEmpty (this.model)) {
this.SetError ();
this.SetMessage ('The model doesn\'t contain meshes.');
}
}
ImportRhinoDocument (rhinoDoc)