# pyleecan.Classes.Arc3 module¶

Method code available at https://github.com/Eomys/pyleecan/tree/master/pyleecan/Methods/Geometry/Arc3

class Arc3(begin=0, end=0, is_trigo_direction=True, prop_dict=None, init_dict=None, init_str=None)[source]

Bases: `Arc`

Half circle define by two points

VERSION = 1
check()

assert that the arc is correct (begin != end)

Parameters:

self (Arc3) – An Arc3 object

Return type:

None

Raises:

PointArc3Error – The beginning point and the ending point of an Arc3 can’t be the same

comp_length()

Compute the length of the arc

Parameters:

self (Arc3) – An Arc3 object

Returns:

length – length of the arc

Return type:

float

Compute the radius of the arc

Parameters:

self (Arc3) – An Arc3 object

Returns:

Return type:

float

discretize(nb_point=99)

Return the discretize version of the Arc. Begin and end are always return

Parameters:
• self (Arc3) – An Arc3 object

• nb_point (int) – Number of points to add to discretize the arc (Default value = ARC_NPOINT_D)

Returns:

list_point – list of complex coordinate of the points

Return type:

list

Raises:

NbPointArc1DError – nb_point must be an integer >=0

get_angle(is_deg=False)

Return the angle of the arc

Parameters:
• self (Arc3) – An Arc3 object

• is_deg (bool) – True to convert to degree

Returns:

angle – Angle of the arc

Return type:

float

get_begin()

Return the begin point of the arc

Parameters:

self (Arc3) – An Arc3 object

Returns:

begin – Begin point of the Arc3

Return type:

complex

get_center()

Return the center of the arc

Parameters:

self (Arc3) – An Arc3 object

Returns:

Zc – Complex coordinates of the center of the Arc3

Return type:

complex

get_end()

Return the end point of the arc

Parameters:

self (Arc3) – An Arc3 object

Returns:

end – Complex coordinates of the end point of the Arc3

Return type:

complex

get_middle()

Return the point at the middle of the arc

Parameters:

self (Arc3) – An Arc3 object

Returns:

Zmid – Complex coordinates of the middle of the Arc3

Return type:

complex

reverse()

Reverse the begin and end point of the Line

Parameters:

self (Arc3) – An Arc3 object

rotate(angle)

Rotation of the Arc3 of angle

Parameters:
• self (Arc3) – An Arc3 Object

• angle (float) – the angle of rotation [rad]

Return type:

None

scale(scale_factor)

Scale the coordinates of the begin/end

Parameters:
• self (Arc3) – An Arc3 Object

• scale_factor (float) – the Scale factor [-]

Return type:

None

split_half(is_begin=True)

Cut the line in half (modify the object Arc3 => Arc2)

Parameters:
• self (Arc3) – An Arc3 object

• is_begin (bool) – True to keep the part begin=>middle, False for the part middle=>end

translate(Zt)

Translate the Arc3 object with

Parameters:
• self (Arc3) – An Arc3 object

• Zt (complex) – Complex value for translation

Return type:

None

split_point(Z1, is_begin=True)

Cut the Arc according to a point on the arc

Parameters:
• self (Arc3) – An Arc3 object

• Z1 (complex) – Cutting point on the line

• is_begin (bool) – True to keep the part begin=>Z1, False for the part Z1=>end

save(save_path='', is_folder=False, type_handle_old=2, type_compression=0)

Save the object to the save_path

Parameters:
• self – A pyleecan object

• save_path (str) – path to the folder to save the object

• is_folder (bool) – to split the object in different files: separate simulation machine and materials (json only)

• type_handle_old (int) – How to handle old file in folder mode (0:Nothing, 1:Delete, 2:Move to “Backup” folder)

• type_compression (int) – Available only for json, 0: no compression, 1: gzip

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

Compare two objects and return list of differences

as_dict(type_handle_ndarray=0, keep_function=False, **kwargs)[source]

Convert this object in a json serializable dict (can be use in __init__). type_handle_ndarray: int

How to handle ndarray (0: tolist, 1: copy, 2: nothing)

keep_functionbool

True to keep the function object, else return str

Optional keyword input parameter is for internal use only and may prevent json serializability.

copy()[source]

Creates a deepcopy of the object

property begin

begin point of the arc

Type:

complex

property end

end of the arc

Type:

complex

property is_trigo_direction

Rotation direction of the arc

Type:

bool