sivicncdriver.ui package¶
Submodules¶
sivicncdriver.ui.interface module¶
The interface module¶
Provides the MainWindow class.
-
class
sivicncdriver.ui.interface.
MainWindow
[source]¶ Bases:
PyQt5.QtWidgets.QMainWindow
,sivicncdriver.ui.main_window.Ui_MainWindow
The main window of the application.
-
config_as_dict
()[source]¶ Get the configuration as a dict.
Returns: The configuration as a dict. Return type: dict
-
draw_file
(gcode=None)[source]¶ Draws a gcode file.
Parameters: gcode – gcode to use in place of the one form code_edit.
-
highlight_selected_path
()[source]¶ Looks for selected line in the code_edit, then updates the drawing to highlight the corresponding path.
-
parse_error
(line)[source]¶ Handles parsing errors.
Parameters: line – The line where the error occurred.
-
print
(txt, msg_type='operator')[source]¶ Prints a message on the application console.
Parameters: - txt (str) – The message
- msg_type (str) – The type of the message. Can be “operator”, “machine”, “error” or “info”
-
run_thread
(gcode, n=None, disable=True, allow_waiting=True)[source]¶ Run a thread to send the given gcode.
Parameters: - gcode (list) – The gcode as a list of commands.
- n (int) – A length for the sending_process progress bar.
- disable (bool) – Disable ui elements which trigger sending.
- allow_waiting (bool) – Adds the command to the waiting queue.
-
save_config
(filename=None)[source]¶ Saves a configuration.
Parameters: filename (str) – The name of the file.
-
sending_end
()[source]¶ Manages the end of upload. If some commands are waiting, run them at the end.
-
set_serial_mode
(mode)[source]¶ Change serial mode.
Parameters: mode (str) – can be “manual” or “file”
-
sivicncdriver.ui.main_window module¶
sivicncdriver.ui.preprocessor module¶
The preprocessor module¶
Provides the PreprocessorDialog class.
-
class
sivicncdriver.ui.preprocessor.
PreprocessorDialog
(gcode, parent=None)[source]¶ Bases:
PyQt5.QtWidgets.QDialog
,sivicncdriver.ui.preprocessor_window.Ui_dialog
The preprocessor dialog.
sivicncdriver.ui.preprocessor_window module¶
sivicncdriver.ui.ressources_rc module¶
sivicncdriver.ui.view3d module¶
-
class
sivicncdriver.ui.view3d.
View3D
(parent=None, width=5, height=4, dpi=100)[source]¶ Bases:
matplotlib.backends.backend_qt5agg.FigureCanvasQTAgg
Prints G-Codes in 3D.
-
compute_data
(gcode)[source]¶ Computes the paths generated by a gcode file.
Parameters: gcode (str) – The gcode.
-
draw
(**kwargs)[source]¶ Parameters: - reverse_x (bool) – Should the x axis be reversed ? (default : False)
- reverse_y (bool) – Should the y axis be reversed ? (default : False)
- reverse_z (bool) – Should the z axis be reversed ? (default : False)
- highlight_line (int) – A line which is to be highlighted. (default : None)
-
parse_error
¶
-