Source code for pyleecan.Methods.Slot.SlotM12.get_surface_active
# -*- coding: utf-8 -*-
from numpy import linspace, zeros
from ....Classes.Segment import Segment
from ....Classes.Arc1 import Arc1
from ....Classes.SurfLine import SurfLine
[docs]def get_surface_active(self, alpha=0, delta=0):
"""Return the full active surface
Parameters
----------
self : SlotM12
A SlotM12 object
alpha : float
float number for rotation (Default value = 0) [rad]
delta : complex
complex number for translation (Default value = 0)
Returns
-------
surf_act: Surface
Surface corresponding to the Active Area
"""
# get the name of the lamination
st = self.get_name_lam()
point_dict = self._comp_point_coordinate()
ZM0 = point_dict["ZM0"]
ZM1 = point_dict["ZM1"]
ZM2 = point_dict["ZM2"]
ZM3 = point_dict["ZM3"]
ZM4 = point_dict["ZM4"]
curve_list = list()
curve_list.append(Segment(ZM1, ZM2))
curve_list.append(Arc1(ZM2, ZM3, abs(ZM0)))
curve_list.append(Segment(ZM3, ZM4))
curve_list.append(Segment(ZM4, ZM1))
Zmid = (ZM1 + ZM3) / 2
surface = SurfLine(
line_list=curve_list, label="Wind_" + st + "_R0_T0_S0", point_ref=Zmid
)
# Apply transformation
surface.rotate(alpha)
surface.translate(delta)
return surface