pyleecan.GUI.Dxf.DXF_Slot module

class DXF_Slot(dxf_path=None, Zs=None, lam=None, is_notch=False)[source]

Bases: Ui_DXF_Slot, QDialog

Dialog to create SlotUD objects from DXF files

convert_dxf_with_FEMM(file_path, tol)

Convert a DXF file with FEMM: - Merge point according to tolerance - Convert lines to Arc and Segments

Parameters:
  • self ((DXF_Hole, DXF_Slot, DXF_Surf)) – GUI DXF widget

  • file_path (str) – Path to the file to convert

  • tol (float) – Tolerance to merge point [local unit]

enable_tolerance()[source]

Enable/Disable tolerance widget

open_document()[source]

Open a new dxf in the viewer

Parameters:

self (DXF_Slot) – a DXF_Slot object

init_graph()[source]

Initialize the viewer

Parameters:

self (DXF_Slot) – a DXF_Slot object

set_center()[source]

Update the position of the center

update_graph()[source]

Clean and redraw all the lines in viewer

Parameters:

self (DXF_Slot) – a DXF_Slot object

check_selection()[source]

Check if every line in the selection are connected

Parameters:

self (DXF_Slot) – a DXF_Slot object

Returns:

is_line – True if it forms a line

Return type:

bool

remove_selection()[source]
get_slot()[source]

Generate the SlotUD object corresponding to the selected lines

Parameters:

self (DXF_Slot) – a DXF_Slot object

Returns:

sot – User defined slot according to selected lines

Return type:

SlotUD

plot()[source]

Plot the current state of the slot

Parameters:

self (DXF_Slot) – a DXF_Slot object

save()[source]

Save the SlotUD object in a json file

Parameters:

self (DXF_Slot) – a DXF_Slot object

open_tuto()[source]

Open the tutorial video in a web browser

staticMetaObject = <PySide2.QtCore.QMetaObject object>