DXF_Hole module

class DXF_Hole(dxf_path=None, Zh=None, Lmag=None, lam=None)[source]

Bases: pyleecan.GUI.Dxf.Ui_DXF_Hole.Ui_DXF_Hole, PySide2.QtWidgets.QDialog

Dialog to create HoleUD objects from DXF files

open_document()[source]

Open a new dxf in the viewer

Parameters

self (DXF_Hole) – a DXF_Hole object

init_graph()[source]

Initialize the viewer

Parameters

self (DXF_Hole) – a DXF_Hole object

update_graph()[source]

Clean and redraw all the lines in viewer

Parameters

self (DXF_Hole) – a DXF_Hole object

check_selection()[source]

Check if every line in the selection form a surface

Parameters

self (DXF_Hole) – a DXF_Hole object

Returns

is_surf – True if it forms a surface

Return type

bool

add_surface()[source]

Validate the selection and create a surface object

Parameters

self (DXF_Hole) – a DXF_Hole object

enable_magnetization()[source]

Enable/Disable the combobox/float edit for magnetization according to type

remove_selection()[source]
get_hole()[source]

Generate the HoleUD object corresponding to the selected surfaces

Parameters

self (DXF_Hole) – a DXF_Hole object

Returns

hole – User defined hole according to selected surfaces

Return type

HoleUD

plot()[source]

Plot the current state of the hole

Parameters

self (DXF_Hole) – a DXF_Hole object

delete_surface()[source]

Delete a selected surface

Parameters

self (DXF_Hole) – a DXF_Hole object

highlight_surface()[source]

Highlight a surface to find it on the viewer

Parameters

self (DXF_Hole) – a DXF_Hole object

save()[source]

Save the HoleUD object in a json file

Parameters

self (DXF_Hole) – a DXF_Hole object

staticMetaObject = <PySide2.QtCore.QMetaObject object>