/// <summary> /// Creates an array of Sub Division Mesh from the .Obj file given by the user. /// Each Group within the .Obj file is represented by one SubDivsion Mesh. /// </summary> /// <param name="filePath">The file to be imported</param> /// <returns></returns> public static SubDivisionMesh[] ImportFromOBJ(string filePath) { if (string.IsNullOrWhiteSpace(filePath)) { throw new System.ArgumentNullException("filePath"); } filePath = GeometryExtension.LocateFile(filePath); if (!File.Exists(filePath)) { throw new System.ArgumentException(string.Format(Properties.Resources.FileNotFound, filePath), "filePath"); } MeshData result = ObjHandler.Import(filePath); return(result.ConvertToSubDivisionMesh()); }