exportMesh static method

void exportMesh(
  1. String fileName,
  2. Mesh mesh, [
  3. PLYOptions? options,
  4. String? path,
])

Implementation

static void exportMesh(String fileName, Mesh mesh, [PLYOptions? options, String? path]){
  options ??= PLYOptions();
  if(options.type == ExportTypes.ascii){
    SaveFile.saveString(
      printName: fileName,
      fileType: 'ply',
      data: String.fromCharCodes(parseMesh(mesh,options)),
      path: path
    );
  }
  else{
    SaveFile.saveBytes(
      printName: fileName,
      fileType: 'ply',
      bytes: Uint8List.fromList(parseMesh(mesh,options)),
      path: path
    );
  }
}