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])Gets a dictionary representation of the pymead object.
plot([ax, show, save_file])Plots the airfoil to a
matplotlibfigure.point_removal_deletes_curve()point_sequence()remove()remove_point([idx, point])reverse_point_sequence()set_point_sequence(point_sequence)split(split)update()Attributes
AirfoilToolsDatFile- 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 aPymeadObjrather than a string or float value, thename()method should be the value that is stored. For an example, see the overridden value of this method inpymead.core.airfoil.Airfoil. All subclasses ofPymeadObjmust implement this method, since it is the way pymead objects are stored in saved instances of aGeometryCollection(.jmeafiles).
- plot(ax: Axes | None = None, show: bool = True, save_file: str | None = None, **plt_kwargs)[source]#
Plots the airfoil to a
matplotlibfigure.- 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:Noneshow (bool) – Whether to immediately show the curve plot. Ignored if
axis notNone. Default:Truesave_file (str or None) – Name of the file to save. If
None, the curve image will not be saved to file. Ignored ifaxis notNone. Default:Noneplt_kwargs – Additional keyword arguments to pass to
matplotlib.pyplot.plot