pyleecan.GUI.Dxf.DXF_Surf module

class DXF_Surf(dxf_path=None, Zh=None, lam=None, is_vent=True)[source]

Bases: Ui_DXF_Surf, QDialog

Dialog to create Vents or BoreUD 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_Surf) – a DXF_Surf object

init_graph()[source]

Initialize the viewer

Parameters:

self (DXF_Surf) – a DXF_Surf object

set_center()[source]

Update the position of the center

update_graph()[source]

Clean and redraw all the lines in viewer

Parameters:

self (DXF_Surf) – a DXF_Surf object

check_selection()[source]

Check if every line in the selection form a surface

Parameters:

self (DXF_Surf) – a DXF_Surf object

Returns:

is_surf – True if it forms a surface

Return type:

bool

get_surface()[source]

Validate the selection and create a surface object

Parameters:

self (DXF_Surf) – a DXF_Surf object

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

Generate the HoleUD object corresponding to the selected surfaces

Parameters:

self (DXF_Surf) – a DXF_Surf 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_Surf) – a DXF_Surf object

save()[source]

Save the HoleUD object in a json file

Parameters:

self (DXF_Surf) – a DXF_Surf object

open_tuto()[source]

Open the tutorial video in a web browser

staticMetaObject = <PySide2.QtCore.QMetaObject object>