SurfRing (class)

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

class SurfRing(out_surf=-1, in_surf=-1, point_ref=0, label='', init_dict=None)[source]

Bases: pyleecan.Classes.Surface.Surface

SurfRing is a surface between two closed surfaces (lamination surfaces for instance)

VERSION = 1
get_lines()

The list returned contains all the Line of the SurRing

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

Rotate the surface

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

Return type:

None

translate(Zt)

Translate the surface

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

Return type:

None

check()

assert the Surface is correct

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

Compute the length of the SurfRing object (length of both surfaces)

Parameters:self (SurfRing) – A SurfRing object
Returns:length – Length of the surface [m]
Return type:float
get_patches(color='w', edgecolor='k', is_edge_only=False, linestyle=None)

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)
  • is_edge_only (bool) – To set the transparancy of the face color to 0 and 1 for the edge color
  • linestyle (str) – Line style of the edge {‘-‘, ‘–’, ‘-.’, ‘:’, ‘’, (offset, on-off-seq), …}
Returns:

patch_list – List of patches corresponding to the surface

Return type:

list of matplotlib.patches.Polygon

discretize(Npoint=-1)

Returns the discretize version of the SurfRing

Parameters:
  • self (SurfRing) – A SurfRing 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 SurfRing surface

Parameters:self (SurfRing) – A SurfRing object
Returns:surf – The SurfRing surface [m**2]
Return type:float
plot_lines(fig=None)

Plot the SurfRing-Contour in a matplotlib fig (For plotting unclosed contour, for Polygon use plot method from Surface object)

Parameters:
  • self (SurfRing) – A SurfRing object
  • fig – if None, open a new fig and plot, else add to the current one (Default value = None)
Returns:

Return type:

None

comp_point_ref(is_set=False)

Compute the point ref of the Surface

Parameters:
  • self (SurfRing) – A SurfRing 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__)

out_surf

Outter surface

in_surf

Inner surface