- Extrude and cut

This commit is contained in:
bklronin
2024-06-15 00:18:32 +02:00
parent e35ff3e9a1
commit 055a90b62e
5 changed files with 377 additions and 240 deletions

166
Gui.py
View File

@@ -16,15 +16,15 @@ from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor,
QImage, QKeySequence, QLinearGradient, QPainter,
QPalette, QPixmap, QRadialGradient, QTransform)
from PySide6.QtWidgets import (QApplication, QGridLayout, QGroupBox, QHBoxLayout,
QHeaderView, QMainWindow, QMenuBar, QPushButton,
QSizePolicy, QStatusBar, QTabWidget, QTextEdit,
QTreeView, QVBoxLayout, QWidget)
QListWidget, QListWidgetItem, QMainWindow, QMenuBar,
QPushButton, QSizePolicy, QStatusBar, QTabWidget,
QTextEdit, QVBoxLayout, QWidget)
class Ui_fluencyCAD(object):
def setupUi(self, fluencyCAD):
if not fluencyCAD.objectName():
fluencyCAD.setObjectName(u"fluencyCAD")
fluencyCAD.resize(1755, 671)
fluencyCAD.resize(1755, 685)
self.centralwidget = QWidget(fluencyCAD)
self.centralwidget.setObjectName(u"centralwidget")
self.gridLayout = QGridLayout(self.centralwidget)
@@ -60,25 +60,25 @@ class Ui_fluencyCAD(object):
self.groupBox.setObjectName(u"groupBox")
self.gridLayout_3 = QGridLayout(self.groupBox)
self.gridLayout_3.setObjectName(u"gridLayout_3")
self.pushButton_7 = QPushButton(self.groupBox)
self.pushButton_7.setObjectName(u"pushButton_7")
self.pb_extrdop = QPushButton(self.groupBox)
self.pb_extrdop.setObjectName(u"pb_extrdop")
self.gridLayout_3.addWidget(self.pushButton_7, 0, 0, 1, 1)
self.gridLayout_3.addWidget(self.pb_extrdop, 0, 0, 1, 1)
self.pushButton_14 = QPushButton(self.groupBox)
self.pushButton_14.setObjectName(u"pushButton_14")
self.pb_cutop = QPushButton(self.groupBox)
self.pb_cutop.setObjectName(u"pb_cutop")
self.gridLayout_3.addWidget(self.pushButton_14, 0, 1, 1, 1)
self.gridLayout_3.addWidget(self.pb_cutop, 0, 1, 1, 1)
self.pushButton_15 = QPushButton(self.groupBox)
self.pushButton_15.setObjectName(u"pushButton_15")
self.pb_arrayop = QPushButton(self.groupBox)
self.pb_arrayop.setObjectName(u"pb_arrayop")
self.gridLayout_3.addWidget(self.pushButton_15, 1, 1, 1, 1)
self.gridLayout_3.addWidget(self.pb_arrayop, 1, 0, 1, 1)
self.pushButton_16 = QPushButton(self.groupBox)
self.pushButton_16.setObjectName(u"pushButton_16")
self.pb_revop = QPushButton(self.groupBox)
self.pb_revop.setObjectName(u"pb_revop")
self.gridLayout_3.addWidget(self.pushButton_16, 1, 0, 1, 1)
self.gridLayout_3.addWidget(self.pb_revop, 1, 1, 1, 1)
self.gridLayout.addWidget(self.groupBox, 0, 5, 3, 1, Qt.AlignTop)
@@ -92,16 +92,16 @@ class Ui_fluencyCAD(object):
self.verticalLayout_2.addWidget(self.pb_nw_sktch)
self.pb_edt_sktch = QPushButton(self.groupBox_6)
self.pb_edt_sktch.setObjectName(u"pb_edt_sktch")
self.verticalLayout_2.addWidget(self.pb_edt_sktch)
self.pb_del_sketch = QPushButton(self.groupBox_6)
self.pb_del_sketch.setObjectName(u"pb_del_sketch")
self.verticalLayout_2.addWidget(self.pb_del_sketch)
self.pb_edt_sktch = QPushButton(self.groupBox_6)
self.pb_edt_sktch.setObjectName(u"pb_edt_sktch")
self.verticalLayout_2.addWidget(self.pb_edt_sktch)
self.pushButton_13 = QPushButton(self.groupBox_6)
self.pushButton_13.setObjectName(u"pushButton_13")
@@ -110,33 +110,6 @@ class Ui_fluencyCAD(object):
self.gridLayout.addWidget(self.groupBox_6, 0, 0, 1, 1)
self.groupBox_3 = QGroupBox(self.centralwidget)
self.groupBox_3.setObjectName(u"groupBox_3")
self.gridLayout_4 = QGridLayout(self.groupBox_3)
self.gridLayout_4.setObjectName(u"gridLayout_4")
self.pb_con_line = QPushButton(self.groupBox_3)
self.pb_con_line.setObjectName(u"pb_con_line")
self.gridLayout_4.addWidget(self.pb_con_line, 0, 1, 1, 1)
self.pb_con_ptpt = QPushButton(self.groupBox_3)
self.pb_con_ptpt.setObjectName(u"pb_con_ptpt")
self.gridLayout_4.addWidget(self.pb_con_ptpt, 0, 0, 1, 1)
self.pb_con_horiz = QPushButton(self.groupBox_3)
self.pb_con_horiz.setObjectName(u"pb_con_horiz")
self.gridLayout_4.addWidget(self.pb_con_horiz, 1, 0, 1, 1)
self.pb_con_vert = QPushButton(self.groupBox_3)
self.pb_con_vert.setObjectName(u"pb_con_vert")
self.gridLayout_4.addWidget(self.pb_con_vert, 1, 1, 1, 1)
self.gridLayout.addWidget(self.groupBox_3, 2, 0, 1, 1)
self.groupBox_7 = QGroupBox(self.centralwidget)
self.groupBox_7.setObjectName(u"groupBox_7")
self.verticalLayout_5 = QVBoxLayout(self.groupBox_7)
@@ -169,13 +142,58 @@ class Ui_fluencyCAD(object):
self.gridLayout.addWidget(self.groupBox_7, 3, 0, 1, 1)
self.InputTab = QTabWidget(self.centralwidget)
self.InputTab.setObjectName(u"InputTab")
sizePolicy = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.Preferred)
self.groupBox_3 = QGroupBox(self.centralwidget)
self.groupBox_3.setObjectName(u"groupBox_3")
self.gridLayout_4 = QGridLayout(self.groupBox_3)
self.gridLayout_4.setObjectName(u"gridLayout_4")
self.pb_con_line = QPushButton(self.groupBox_3)
self.pb_con_line.setObjectName(u"pb_con_line")
self.gridLayout_4.addWidget(self.pb_con_line, 0, 1, 1, 1)
self.pb_con_ptpt = QPushButton(self.groupBox_3)
self.pb_con_ptpt.setObjectName(u"pb_con_ptpt")
self.gridLayout_4.addWidget(self.pb_con_ptpt, 0, 0, 1, 1)
self.pb_con_horiz = QPushButton(self.groupBox_3)
self.pb_con_horiz.setObjectName(u"pb_con_horiz")
self.gridLayout_4.addWidget(self.pb_con_horiz, 1, 0, 1, 1)
self.pb_con_vert = QPushButton(self.groupBox_3)
self.pb_con_vert.setObjectName(u"pb_con_vert")
self.gridLayout_4.addWidget(self.pb_con_vert, 1, 1, 1, 1)
self.gridLayout.addWidget(self.groupBox_3, 2, 0, 1, 1)
self.groupBox_5 = QGroupBox(self.centralwidget)
self.groupBox_5.setObjectName(u"groupBox_5")
sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.InputTab.sizePolicy().hasHeightForWidth())
self.InputTab.setSizePolicy(sizePolicy)
sizePolicy.setHeightForWidth(self.groupBox_5.sizePolicy().hasHeightForWidth())
self.groupBox_5.setSizePolicy(sizePolicy)
self.groupBox_5.setMaximumSize(QSize(300, 16777215))
self.verticalLayout_3 = QVBoxLayout(self.groupBox_5)
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
self.element_list = QListWidget(self.groupBox_5)
self.element_list.setObjectName(u"element_list")
self.verticalLayout_3.addWidget(self.element_list)
self.gridLayout.addWidget(self.groupBox_5, 0, 3, 4, 1)
self.InputTab = QTabWidget(self.centralwidget)
self.InputTab.setObjectName(u"InputTab")
sizePolicy1 = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.Preferred)
sizePolicy1.setHorizontalStretch(0)
sizePolicy1.setVerticalStretch(0)
sizePolicy1.setHeightForWidth(self.InputTab.sizePolicy().hasHeightForWidth())
self.InputTab.setSizePolicy(sizePolicy1)
self.sketch_tab = QWidget()
self.sketch_tab.setObjectName(u"sketch_tab")
self.verticalLayout_4 = QVBoxLayout(self.sketch_tab)
@@ -194,24 +212,6 @@ class Ui_fluencyCAD(object):
self.gridLayout.addWidget(self.InputTab, 0, 2, 4, 1)
self.groupBox_5 = QGroupBox(self.centralwidget)
self.groupBox_5.setObjectName(u"groupBox_5")
sizePolicy1 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
sizePolicy1.setHorizontalStretch(0)
sizePolicy1.setVerticalStretch(0)
sizePolicy1.setHeightForWidth(self.groupBox_5.sizePolicy().hasHeightForWidth())
self.groupBox_5.setSizePolicy(sizePolicy1)
self.groupBox_5.setMaximumSize(QSize(300, 16777215))
self.verticalLayout_3 = QVBoxLayout(self.groupBox_5)
self.verticalLayout_3.setObjectName(u"verticalLayout_3")
self.comp_tree = QTreeView(self.groupBox_5)
self.comp_tree.setObjectName(u"comp_tree")
self.verticalLayout_3.addWidget(self.comp_tree)
self.gridLayout.addWidget(self.groupBox_5, 0, 3, 4, 1)
self.gl_box = QGroupBox(self.centralwidget)
self.gl_box.setObjectName(u"gl_box")
sizePolicy2 = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.MinimumExpanding)
@@ -256,29 +256,29 @@ class Ui_fluencyCAD(object):
self.pb_circtool.setText(QCoreApplication.translate("fluencyCAD", u"Circle", None))
self.pb_slotool.setText(QCoreApplication.translate("fluencyCAD", u"Slot", None))
self.groupBox.setTitle(QCoreApplication.translate("fluencyCAD", u"Modify", None))
self.pushButton_7.setText(QCoreApplication.translate("fluencyCAD", u"Cut", None))
self.pushButton_14.setText(QCoreApplication.translate("fluencyCAD", u"Arry", None))
self.pushButton_15.setText(QCoreApplication.translate("fluencyCAD", u"Extrd", None))
self.pushButton_16.setText(QCoreApplication.translate("fluencyCAD", u"Rev", None))
self.pb_extrdop.setText(QCoreApplication.translate("fluencyCAD", u"Extrd", None))
self.pb_cutop.setText(QCoreApplication.translate("fluencyCAD", u"Cut", None))
self.pb_arrayop.setText(QCoreApplication.translate("fluencyCAD", u"Arry", None))
self.pb_revop.setText(QCoreApplication.translate("fluencyCAD", u"Rev", None))
self.groupBox_6.setTitle(QCoreApplication.translate("fluencyCAD", u"Sketchtools", None))
self.pb_nw_sktch.setText(QCoreApplication.translate("fluencyCAD", u"Nw Sktch Wp", None))
self.pb_edt_sktch.setText(QCoreApplication.translate("fluencyCAD", u"Edt Sketch", None))
self.pb_nw_sktch.setText(QCoreApplication.translate("fluencyCAD", u"Add Sketch", None))
self.pb_del_sketch.setText(QCoreApplication.translate("fluencyCAD", u"Sktch del", None))
self.pb_edt_sktch.setText(QCoreApplication.translate("fluencyCAD", u"Edt Sketch", None))
self.pushButton_13.setText(QCoreApplication.translate("fluencyCAD", u"PushButton", None))
self.groupBox_3.setTitle(QCoreApplication.translate("fluencyCAD", u"Constrain", None))
self.pb_con_line.setText(QCoreApplication.translate("fluencyCAD", u"Pt_Line", None))
self.pb_con_ptpt.setText(QCoreApplication.translate("fluencyCAD", u"Pt_Pt", None))
self.pb_con_horiz.setText(QCoreApplication.translate("fluencyCAD", u"Horiz", None))
self.pb_con_vert.setText(QCoreApplication.translate("fluencyCAD", u"Vert", None))
self.groupBox_7.setTitle(QCoreApplication.translate("fluencyCAD", u"Executive", None))
self.pb_apply_code.setText(QCoreApplication.translate("fluencyCAD", u"Apply Code", None))
self.pushButton.setText(QCoreApplication.translate("fluencyCAD", u"Delete Code", None))
self.pushButton_5.setText(QCoreApplication.translate("fluencyCAD", u"Load Code", None))
self.pushButton_4.setText(QCoreApplication.translate("fluencyCAD", u"Save code", None))
self.pushButton_2.setText(QCoreApplication.translate("fluencyCAD", u"Export STL", None))
self.groupBox_3.setTitle(QCoreApplication.translate("fluencyCAD", u"Constrain", None))
self.pb_con_line.setText(QCoreApplication.translate("fluencyCAD", u"Pt_Line", None))
self.pb_con_ptpt.setText(QCoreApplication.translate("fluencyCAD", u"Pt_Pt", None))
self.pb_con_horiz.setText(QCoreApplication.translate("fluencyCAD", u"Horiz", None))
self.pb_con_vert.setText(QCoreApplication.translate("fluencyCAD", u"Vert", None))
self.groupBox_5.setTitle(QCoreApplication.translate("fluencyCAD", u"Components", None))
self.InputTab.setTabText(self.InputTab.indexOf(self.sketch_tab), QCoreApplication.translate("fluencyCAD", u"Sketch", None))
self.InputTab.setTabText(self.InputTab.indexOf(self.code_tab), QCoreApplication.translate("fluencyCAD", u"Code", None))
self.groupBox_5.setTitle(QCoreApplication.translate("fluencyCAD", u"Components", None))
self.gl_box.setTitle(QCoreApplication.translate("fluencyCAD", u"Model Viewer", None))
# retranslateUi