PolarArc (class)

File generated according to Generator/ClassesRef/Geometry/PolarArc.csv WARNING! All changes made in this file will be lost!

class PolarArc(angle=1, height=1, point_ref=0, label='', init_dict=None)[source]

Bases: pyleecan.Classes.Surface.Surface

PolarArc defined by the center of object(point_ref), the label, the angle and the height

VERSION = 1
get_lines()

return the list of lines that delimits the PolarArc

Parameters:self (PolarArc) – a PolarArc object
Returns:line_list – List of line need to draw the slot (2 Segment + 2 Arc1)
Return type:list
rotate(angle)

Do the rotation of the PolarArc

Parameters:
  • self (PolarArc) – a PolarArc
  • angle (float) – the angle for rotation [rad]
Returns:

Return type:

None

translate(Zt)

Do the translation of the PolarArc

Parameters:
  • self (PolarArc) – a PolarArc object
  • Zt (complex) – Complex value for translation
Returns:

Return type:

None

check()

check if the PolarArc object is correct

Parameters:self (PolarArc) – a PolarArc Object
Returns:
Return type:None
Raises:AnglePolarArcError – The angle of a polar arc must be different to 0
comp_length()

Returns the length of the PolarArc

Parameters:self (PolarArc) – a PolarArc object
Returns:length – length of the PolarArc [m]
Return type:float
discretize(nb_point)

Returns the discretize version of the PolarArc

Parameters:nb_point (int) – number of points wanted per line
Returns:point_list – List of complex coordinate of the points
Return type:list
get_patches(color='w', edgecolor='k', is_edge_only=False, linestyle=None)

Returns the PolarArc Patch to be display in matplotlib :param self: a PolarArc object :type self: PolarArc :param color: The color of the patch (Default value = PATCH_COLOR) :param edgecolor: The color of the edgecolor (Default value = PATCH_EDGE) :param is_edge_only: To set the transparancy of the face color to 0 and 1 for the edge color :type is_edge_only: bool :param linestyle: Line style of the edge {‘-‘, ‘–’, ‘-.’, ‘:’, ‘’, (offset, on-off-seq), …} :type linestyle: str

Returns:patch_list – List of patches corresponding to the surface
Return type:list of matplotlib.patches.Polygon
comp_surface()

Compute the PolarArc surface

Parameters:self (PolarArc) – A PolarArc object
Returns:surf – The PolarArc surface [m**2]
Return type:float
comp_point_ref(is_set=False)

Compute the point ref of the Surface

Parameters:
  • self (PolarArc) – A PolarArc object
  • is_set (bool) – True to update the point_ref property
Returns:

point_ref – the reference point of the surface

Return type:

complex

save(save_path='')

Save the object to the save_path

Parameters:
  • self – A pyleecan object
  • save_path (str) – path to the folder to save the object
get_logger()

Get the object logger or its parent’s one

Parameters:obj – A pyleecan object
Returns:logger – Pyleecan object dedicated logger
Return type:logging.Logger
as_dict()[source]

Convert this objet in a json seriable dict (can be use in __init__)

angle

Polar angle

height

The Heigth of the PolarAngle