SurfLine (class)

Warning : this file has been generated, you shouldn’t edit it

class SurfLine(line_list=[], point_ref=0, label='', init_dict=None)[source]

Bases: pyleecan.Classes.Surface.Surface

SurfLine define by list of lines that delimit it, label and point reference.

VERSION = 1
get_lines()

The list returned contains all the Line of the SurfLine

Parameters:self (SurfLine) – A SurfLine object
Returns:line_list – list of lines delimiting the surface
Return type:list
rotate(angle)

Rotate the surface

Parameters:
  • self (SurfLine) – A SurfLine object
  • angle (float) – the angle of rotation [rad]
Returns:

Return type:

None

translate(Zt)

Translate the surface

Parameters:
  • self (SurfLine) – A SurfLine object
  • Zt (complex) – Complex value for translation
Returns:

Return type:

None

check()

assert the Surface is correct (the radius > 0)

Parameters:self (Surface) – A Surface object
Returns:
Return type:None
comp_length()

Compute the length of the SurfLine object

Parameters:self (SurfLine) – A SurfLine object
Returns:length – Length of the surface [m]
Return type:float
get_patch(color='w', edgecolor='K')

Returns the PolarArc Patch to be display in matplotlib

Parameters:
  • self (SurfLine) – a SurfLine object
  • color – the color of the patch (Default value = PATCH_COLOR)
  • edgecolor – the edge color of the patch (Default value = PATCH_EDGE)
Returns:

patch – The patch corresponding to the surface

Return type:

matplotlib.patches.Polygon

discretize(Npoint=-1)

Returns the discretize version of the SurfLine

Parameters:
  • self (SurfLine) – A SurfLine object
  • Npoint (int) – Number of point on each line (Default value = -1 => use the line default discretization)
Returns:

point_list – List of complex coordinates

Return type:

list

comp_surface()

Compute the SurfLine surface

Parameters:self (SurfLine) – A SurfLine object
Returns:surf – The SurfLine surface [m**2]
Return type:float
as_dict()[source]

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

line_list

List of Lines