pymead.core.line.PolyLine#

class PolyLine(source: str, coords: ndarray | None = None, start: int | None = None, end: int | None = None, point_sequence: PointSequence | None = None, name: str | None = None, num_header_rows: int = 0, delimiter: str | None = None, scale: float = 1.0, rotation_rad: float = 0.0, translation_x: float = 0.0, translation_y: float = 0.0, **kwargs)[source]#

Bases: ParametricCurve

__init__(source: str, coords: ndarray | None = None, start: int | None = None, end: int | None = None, point_sequence: PointSequence | None = None, name: str | None = None, num_header_rows: int = 0, delimiter: str | None = None, scale: float = 1.0, rotation_rad: float = 0.0, translation_x: float = 0.0, translation_y: float = 0.0, **kwargs)[source]#
Parameters:

sub_container (str) – Sub-container where this object will be stored in the GeometryCollection

Methods

add_polyline_airfoil()

evaluate([t])

get_dict_rep()

Gets a dictionary representation of the pymead object.

plot([ax, show, save_file])

Plots the airfoil to a matplotlib figure.

point_removal_deletes_curve()

point_sequence()

remove()

remove_point([idx, point])

reverse_point_sequence()

set_point_sequence(point_sequence)

split(split)

update()

Attributes

AirfoilTools

DatFile

get_dict_rep()[source]#

Gets a dictionary representation of the pymead object. In general, this dictionary should consist of only the required arguments for object instantiation. For example, the dictionary representation of a point looks something like this: {"x": 0.3, "y": 0.5}. If the argument requires a reference to a PymeadObj rather than a string or float value, the name() method should be the value that is stored. For an example, see the overridden value of this method in pymead.core.airfoil.Airfoil. All subclasses of PymeadObj must implement this method, since it is the way pymead objects are stored in saved instances of a GeometryCollection (.jmea files).

plot(ax: Axes | None = None, show: bool = True, save_file: str | None = None, **plt_kwargs)[source]#

Plots the airfoil to a matplotlib figure.

Parameters:
  • ax (plt.Axes or None) – Matplotlib Axes object on which the curve will be plotted. If specified, this method will only. If None, a new figure will be created. Default: None

  • show (bool) – Whether to immediately show the curve plot. Ignored if ax is not None. Default: True

  • save_file (str or None) – Name of the file to save. If None, the curve image will not be saved to file. Ignored if ax is not None. Default: None

  • plt_kwargs – Additional keyword arguments to pass to matplotlib.pyplot.plot