Trapeze (class)

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

class Trapeze(height=1, W2=1, W1=1, point_ref=0, label='', init_dict=None)[source]

Bases: pyleecan.Classes.Surface.Surface

trapeze define by the center of symmetry(point_ref), the label, the polar angle, the height and the big and small weight

VERSION = 1
check()

Check if the Trapeze object is correct

Parameters:

self (Trapeze) – a Trapeze Object

Returns:

Return type:

None

Raises:
  • TrapezeError – the W1 base of Trapeze must be greater than 0
  • TrapezeError – the W2 base of Trapeze must be greater than 0
comp_length()

Returns the length of the Trapeze

Parameters:self (Trapeze) – a Trapeze object
Returns:length – Length of the surface [m]
Return type:float
comp_surface()

Compute the Trapeze surface

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

It returns the discretize version of the Trapeze

Parameters:self (Trapeze) – a Trapeze object
Returns:point_list – list of complex coordinate of the points
Return type:list
get_lines()

Returns the Lines that delimit the Trapeze

Parameters:self (Trapeze) – a Trapeze object
Returns:line_list – list of 4 segments
Return type:list
get_patch(color='w', edgecolor='K')

Returns the Trapeze Patch to be display in matplotlib

Parameters:
  • self (Trapeze) – a Trapeze object
  • color – the color of the patch (Default value = PATCH_COLOR)
  • edgecolor – the color of the patch’s edges (Default value = PATCH_EDGE)
Returns:

patch – The patch corresponding to the surface

Return type:

matplotlib.patches.Polygon

rotate(angle)

Rotate the surface

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

Return type:

None

translate(Zt)

Translate the Trapeze

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

Return type:

None

as_dict()[source]

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

height

the height of the Trapeze

W2

the big base of Trapeze

W1

the small base of the Trapeze