pymead.core.pymead_obj.PymeadObj#

class PymeadObj(sub_container: str, geo_col=None)[source]#

Bases: ABC, DualRep

Base class for all objects in pymead.

__init__(sub_container: str, geo_col=None)[source]#
Parameters:

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

Methods

get_dict_rep()

Gets a dictionary representation of the pymead object.

name()

Retrieves the parameter name

set_name(name)

Sets the object name.

Attributes

abstract get_dict_rep() dict[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).

name()[source]#

Retrieves the parameter name

Returns:

The parameter name

Return type:

str

set_name(name: str)[source]#

Sets the object name.

Parameters:

name (str) – The object name