Read

plot3d.read.read_ap_nasa(filename: str)[source]
Reads an AP NASA File and converts it to Block format which can be exported to a plot3d file

AP NASA file represents a single block. The first 7 integers are il,jl,kl,ile,ite,jtip,nbld

Parameters:

filename (str) – location of the .ap file

Returns:

block (Block): file in block format nbld (int): Number of blades

Return type:

Tuple containing

plot3d.read.read_plot3D(filename: str, binary: bool = True, big_endian: bool = False, read_double: bool = True)[source]

Reads a Plot3D file and returns blocks.

Parameters:
  • filename (str) – Name of the file to read, e.g. .p3d, .xyz or .plot3d.

  • binary (bool, optional) – Indicates if the file is binary. Defaults to True.

  • big_endian (bool, optional) – Use big endian format when reading binary files. Defaults to False.

  • read_double (bool, optional) – Read 8-byte doubles when True and 4-byte floats otherwise.

Returns:

List of blocks inside the Plot3D file.

Return type:

List[Block]

plot3d.read.read_word(f)[source]

Continously read a word from an ascii file

Parameters:

f (io) – file handle

Yields:

float – value from ascii file