- Added new componnt controls

This commit is contained in:
bklronin 2024-12-31 00:33:30 +01:00
parent d75d59f311
commit 6ef88925b1
4 changed files with 775 additions and 579 deletions

589
Gui.py
View File

@ -25,7 +25,7 @@ class Ui_fluencyCAD(object):
def setupUi(self, fluencyCAD): def setupUi(self, fluencyCAD):
if not fluencyCAD.objectName(): if not fluencyCAD.objectName():
fluencyCAD.setObjectName(u"fluencyCAD") fluencyCAD.setObjectName(u"fluencyCAD")
fluencyCAD.resize(2192, 957) fluencyCAD.resize(2192, 1073)
self.actionNew_Project = QAction(fluencyCAD) self.actionNew_Project = QAction(fluencyCAD)
self.actionNew_Project.setObjectName(u"actionNew_Project") self.actionNew_Project.setObjectName(u"actionNew_Project")
self.actionLoad_Project = QAction(fluencyCAD) self.actionLoad_Project = QAction(fluencyCAD)
@ -36,204 +36,39 @@ class Ui_fluencyCAD(object):
self.centralwidget.setObjectName(u"centralwidget") self.centralwidget.setObjectName(u"centralwidget")
self.gridLayout = QGridLayout(self.centralwidget) self.gridLayout = QGridLayout(self.centralwidget)
self.gridLayout.setObjectName(u"gridLayout") self.gridLayout.setObjectName(u"gridLayout")
self.gl_box = QGroupBox(self.centralwidget) self.compo_tool_box = QGroupBox(self.centralwidget)
self.gl_box.setObjectName(u"gl_box") self.compo_tool_box.setObjectName(u"compo_tool_box")
sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) self.compo_tool_box.setMinimumSize(QSize(0, 50))
self.gridLayout_9 = QGridLayout(self.compo_tool_box)
self.gridLayout_9.setObjectName(u"gridLayout_9")
self.new_compo = QPushButton(self.compo_tool_box)
self.new_compo.setObjectName(u"new_compo")
self.new_compo.setMinimumSize(QSize(50, 50))
self.new_compo.setMaximumSize(QSize(50, 50))
self.gridLayout_9.addWidget(self.new_compo, 0, 0, 1, 1)
self.del_compo = QPushButton(self.compo_tool_box)
self.del_compo.setObjectName(u"del_compo")
self.del_compo.setEnabled(True)
sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0) sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(4) sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.gl_box.sizePolicy().hasHeightForWidth()) sizePolicy.setHeightForWidth(self.del_compo.sizePolicy().hasHeightForWidth())
self.gl_box.setSizePolicy(sizePolicy) self.del_compo.setSizePolicy(sizePolicy)
font = QFont() self.del_compo.setMinimumSize(QSize(50, 50))
font.setPointSize(12) self.del_compo.setMaximumSize(QSize(50, 50))
self.gl_box.setFont(font) self.del_compo.setLayoutDirection(Qt.LeftToRight)
self.horizontalLayout_4 = QHBoxLayout(self.gl_box)
#ifndef Q_OS_MAC
self.horizontalLayout_4.setSpacing(-1)
#endif
self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
self.horizontalLayout_4.setContentsMargins(12, -1, -1, -1)
self.gridLayout.addWidget(self.gl_box, 0, 3, 7, 1) self.gridLayout_9.addWidget(self.del_compo, 0, 1, 1, 1)
self.groupBox_4 = QGroupBox(self.centralwidget)
self.groupBox_4.setObjectName(u"groupBox_4")
self.verticalLayout_2 = QVBoxLayout(self.groupBox_4)
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.pushButton_2 = QPushButton(self.groupBox_4)
self.pushButton_2.setObjectName(u"pushButton_2")
self.verticalLayout_2.addWidget(self.pushButton_2)
self.gridLayout.addWidget(self.groupBox_4, 12, 4, 1, 1) self.gridLayout.addWidget(self.compo_tool_box, 11, 1, 1, 1, Qt.AlignLeft)
self.InputTab = QTabWidget(self.centralwidget)
self.InputTab.setObjectName(u"InputTab")
sizePolicy1 = QSizePolicy(QSizePolicy.Expanding, 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)
self.verticalLayout_4.setObjectName(u"verticalLayout_4")
self.InputTab.addTab(self.sketch_tab, "")
self.code_tab = QWidget()
self.code_tab.setObjectName(u"code_tab")
self.verticalLayout = QVBoxLayout(self.code_tab)
self.verticalLayout.setObjectName(u"verticalLayout")
self.textEdit = QTextEdit(self.code_tab)
self.textEdit.setObjectName(u"textEdit")
self.verticalLayout.addWidget(self.textEdit)
self.groupBox_7 = QGroupBox(self.code_tab)
self.groupBox_7.setObjectName(u"groupBox_7")
self.gridLayout_5 = QGridLayout(self.groupBox_7)
self.gridLayout_5.setObjectName(u"gridLayout_5")
self.pushButton_5 = QPushButton(self.groupBox_7)
self.pushButton_5.setObjectName(u"pushButton_5")
self.gridLayout_5.addWidget(self.pushButton_5, 2, 0, 1, 1)
self.pushButton_4 = QPushButton(self.groupBox_7)
self.pushButton_4.setObjectName(u"pushButton_4")
self.gridLayout_5.addWidget(self.pushButton_4, 2, 1, 1, 1)
self.pb_apply_code = QPushButton(self.groupBox_7)
self.pb_apply_code.setObjectName(u"pb_apply_code")
self.gridLayout_5.addWidget(self.pb_apply_code, 1, 0, 1, 1)
self.pushButton = QPushButton(self.groupBox_7)
self.pushButton.setObjectName(u"pushButton")
self.gridLayout_5.addWidget(self.pushButton, 1, 1, 1, 1)
self.verticalLayout.addWidget(self.groupBox_7)
self.InputTab.addTab(self.code_tab, "")
self.gridLayout.addWidget(self.InputTab, 0, 2, 7, 1)
self.timeline_box = QGroupBox(self.centralwidget)
self.timeline_box.setObjectName(u"timeline_box")
self.gridLayout.addWidget(self.timeline_box, 12, 2, 1, 2)
self.groupBox = QGroupBox(self.centralwidget)
self.groupBox.setObjectName(u"groupBox")
self.gridLayout_3 = QGridLayout(self.groupBox)
self.gridLayout_3.setObjectName(u"gridLayout_3")
self.pb_revop = QPushButton(self.groupBox)
self.pb_revop.setObjectName(u"pb_revop")
self.gridLayout_3.addWidget(self.pb_revop, 2, 1, 1, 1)
self.pb_extrdop = QPushButton(self.groupBox)
self.pb_extrdop.setObjectName(u"pb_extrdop")
self.gridLayout_3.addWidget(self.pb_extrdop, 0, 0, 1, 1)
self.pb_arrayop = QPushButton(self.groupBox)
self.pb_arrayop.setObjectName(u"pb_arrayop")
self.gridLayout_3.addWidget(self.pb_arrayop, 2, 0, 1, 1)
self.pb_cutop = QPushButton(self.groupBox)
self.pb_cutop.setObjectName(u"pb_cutop")
self.gridLayout_3.addWidget(self.pb_cutop, 0, 1, 1, 1)
self.pb_combop = QPushButton(self.groupBox)
self.pb_combop.setObjectName(u"pb_combop")
self.gridLayout_3.addWidget(self.pb_combop, 1, 0, 1, 1)
self.pb_moveop = QPushButton(self.groupBox)
self.pb_moveop.setObjectName(u"pb_moveop")
self.gridLayout_3.addWidget(self.pb_moveop, 1, 1, 1, 1)
self.gridLayout.addWidget(self.groupBox, 0, 4, 1, 1, Qt.AlignTop)
self.groupBox_9 = QGroupBox(self.centralwidget)
self.groupBox_9.setObjectName(u"groupBox_9")
self.groupBox_9.setMaximumSize(QSize(200, 16777215))
self.gridLayout_7 = QGridLayout(self.groupBox_9)
self.gridLayout_7.setObjectName(u"gridLayout_7")
self.pb_origin_wp = QPushButton(self.groupBox_9)
self.pb_origin_wp.setObjectName(u"pb_origin_wp")
self.gridLayout_7.addWidget(self.pb_origin_wp, 0, 0, 1, 1)
self.pb_origin_face = QPushButton(self.groupBox_9)
self.pb_origin_face.setObjectName(u"pb_origin_face")
self.gridLayout_7.addWidget(self.pb_origin_face, 0, 1, 1, 1)
self.pb_flip_face = QPushButton(self.groupBox_9)
self.pb_flip_face.setObjectName(u"pb_flip_face")
self.gridLayout_7.addWidget(self.pb_flip_face, 1, 0, 1, 1)
self.pb_move_wp = QPushButton(self.groupBox_9)
self.pb_move_wp.setObjectName(u"pb_move_wp")
self.gridLayout_7.addWidget(self.pb_move_wp, 1, 1, 1, 1)
self.gridLayout.addWidget(self.groupBox_9, 0, 0, 1, 1, Qt.AlignTop)
self.groupBox_2 = QGroupBox(self.centralwidget)
self.groupBox_2.setObjectName(u"groupBox_2")
sizePolicy2 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
sizePolicy2.setHorizontalStretch(0)
sizePolicy2.setVerticalStretch(0)
sizePolicy2.setHeightForWidth(self.groupBox_2.sizePolicy().hasHeightForWidth())
self.groupBox_2.setSizePolicy(sizePolicy2)
self.groupBox_2.setMaximumSize(QSize(200, 16777215))
self.gridLayout_2 = QGridLayout(self.groupBox_2)
self.gridLayout_2.setObjectName(u"gridLayout_2")
self.pb_rectool = QPushButton(self.groupBox_2)
self.pb_rectool.setObjectName(u"pb_rectool")
self.pb_rectool.setCheckable(True)
self.pb_rectool.setAutoExclusive(False)
self.gridLayout_2.addWidget(self.pb_rectool, 1, 1, 1, 1, Qt.AlignTop)
self.pb_circtool = QPushButton(self.groupBox_2)
self.pb_circtool.setObjectName(u"pb_circtool")
self.pb_circtool.setCheckable(True)
self.pb_circtool.setAutoExclusive(False)
self.gridLayout_2.addWidget(self.pb_circtool, 2, 0, 1, 1, Qt.AlignTop)
self.pb_slotool = QPushButton(self.groupBox_2)
self.pb_slotool.setObjectName(u"pb_slotool")
self.pb_slotool.setCheckable(True)
self.pb_slotool.setAutoExclusive(False)
self.gridLayout_2.addWidget(self.pb_slotool, 2, 1, 1, 1, Qt.AlignTop)
self.pb_linetool = QPushButton(self.groupBox_2)
self.pb_linetool.setObjectName(u"pb_linetool")
self.pb_linetool.setCheckable(True)
self.pb_linetool.setAutoExclusive(False)
self.gridLayout_2.addWidget(self.pb_linetool, 1, 0, 1, 1)
self.gridLayout.addWidget(self.groupBox_2, 1, 0, 1, 1)
self.groupBox_3 = QGroupBox(self.centralwidget) self.groupBox_3 = QGroupBox(self.centralwidget)
self.groupBox_3.setObjectName(u"groupBox_3") self.groupBox_3.setObjectName(u"groupBox_3")
sizePolicy2.setHeightForWidth(self.groupBox_3.sizePolicy().hasHeightForWidth()) sizePolicy.setHeightForWidth(self.groupBox_3.sizePolicy().hasHeightForWidth())
self.groupBox_3.setSizePolicy(sizePolicy2) self.groupBox_3.setSizePolicy(sizePolicy)
self.groupBox_3.setMaximumSize(QSize(200, 16777213)) self.groupBox_3.setMaximumSize(QSize(200, 16777213))
self.gridLayout_4 = QGridLayout(self.groupBox_3) self.gridLayout_4 = QGridLayout(self.groupBox_3)
self.gridLayout_4.setObjectName(u"gridLayout_4") self.gridLayout_4.setObjectName(u"gridLayout_4")
@ -295,32 +130,84 @@ class Ui_fluencyCAD(object):
self.gridLayout.addWidget(self.groupBox_3, 2, 0, 1, 1) self.gridLayout.addWidget(self.groupBox_3, 2, 0, 1, 1)
self.InputTab = QTabWidget(self.centralwidget)
self.InputTab.setObjectName(u"InputTab")
sizePolicy1 = QSizePolicy(QSizePolicy.Expanding, 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)
self.verticalLayout_4.setObjectName(u"verticalLayout_4")
self.InputTab.addTab(self.sketch_tab, "")
self.code_tab = QWidget()
self.code_tab.setObjectName(u"code_tab")
self.verticalLayout = QVBoxLayout(self.code_tab)
self.verticalLayout.setObjectName(u"verticalLayout")
self.textEdit = QTextEdit(self.code_tab)
self.textEdit.setObjectName(u"textEdit")
self.verticalLayout.addWidget(self.textEdit)
self.groupBox_7 = QGroupBox(self.code_tab)
self.groupBox_7.setObjectName(u"groupBox_7")
self.gridLayout_5 = QGridLayout(self.groupBox_7)
self.gridLayout_5.setObjectName(u"gridLayout_5")
self.pushButton_5 = QPushButton(self.groupBox_7)
self.pushButton_5.setObjectName(u"pushButton_5")
self.gridLayout_5.addWidget(self.pushButton_5, 2, 0, 1, 1)
self.pushButton_4 = QPushButton(self.groupBox_7)
self.pushButton_4.setObjectName(u"pushButton_4")
self.gridLayout_5.addWidget(self.pushButton_4, 2, 1, 1, 1)
self.pb_apply_code = QPushButton(self.groupBox_7)
self.pb_apply_code.setObjectName(u"pb_apply_code")
self.gridLayout_5.addWidget(self.pb_apply_code, 1, 0, 1, 1)
self.pushButton = QPushButton(self.groupBox_7)
self.pushButton.setObjectName(u"pushButton")
self.gridLayout_5.addWidget(self.pushButton, 1, 1, 1, 1)
self.verticalLayout.addWidget(self.groupBox_7)
self.InputTab.addTab(self.code_tab, "")
self.gridLayout.addWidget(self.InputTab, 0, 1, 7, 1)
self.groupBox_11 = QGroupBox(self.centralwidget) self.groupBox_11 = QGroupBox(self.centralwidget)
self.groupBox_11.setObjectName(u"groupBox_11") self.groupBox_11.setObjectName(u"groupBox_11")
sizePolicy3 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Expanding) sizePolicy2 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Expanding)
sizePolicy3.setHorizontalStretch(0) sizePolicy2.setHorizontalStretch(0)
sizePolicy3.setVerticalStretch(0) sizePolicy2.setVerticalStretch(0)
sizePolicy3.setHeightForWidth(self.groupBox_11.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.groupBox_11.sizePolicy().hasHeightForWidth())
self.groupBox_11.setSizePolicy(sizePolicy3) self.groupBox_11.setSizePolicy(sizePolicy2)
self.groupBox_11.setMaximumSize(QSize(200, 16777215)) self.groupBox_11.setMaximumSize(QSize(200, 16777215))
self.verticalLayout_7 = QVBoxLayout(self.groupBox_11) self.verticalLayout_7 = QVBoxLayout(self.groupBox_11)
self.verticalLayout_7.setObjectName(u"verticalLayout_7") self.verticalLayout_7.setObjectName(u"verticalLayout_7")
self.verticalLayout_7.setContentsMargins(5, 5, 5, 5) self.verticalLayout_7.setContentsMargins(5, 5, 5, 5)
self.sketch_list = QListWidget(self.groupBox_11) self.sketch_list = QListWidget(self.groupBox_11)
self.sketch_list.setObjectName(u"sketch_list") self.sketch_list.setObjectName(u"sketch_list")
sizePolicy4 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) sizePolicy3 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
sizePolicy4.setHorizontalStretch(0) sizePolicy3.setHorizontalStretch(0)
sizePolicy4.setVerticalStretch(0) sizePolicy3.setVerticalStretch(0)
sizePolicy4.setHeightForWidth(self.sketch_list.sizePolicy().hasHeightForWidth()) sizePolicy3.setHeightForWidth(self.sketch_list.sizePolicy().hasHeightForWidth())
self.sketch_list.setSizePolicy(sizePolicy4) self.sketch_list.setSizePolicy(sizePolicy3)
self.sketch_list.setSelectionRectVisible(True) self.sketch_list.setSelectionRectVisible(True)
self.verticalLayout_7.addWidget(self.sketch_list) self.verticalLayout_7.addWidget(self.sketch_list)
self.groupBox_6 = QGroupBox(self.groupBox_11) self.groupBox_6 = QGroupBox(self.groupBox_11)
self.groupBox_6.setObjectName(u"groupBox_6") self.groupBox_6.setObjectName(u"groupBox_6")
sizePolicy2.setHeightForWidth(self.groupBox_6.sizePolicy().hasHeightForWidth()) sizePolicy.setHeightForWidth(self.groupBox_6.sizePolicy().hasHeightForWidth())
self.groupBox_6.setSizePolicy(sizePolicy2) self.groupBox_6.setSizePolicy(sizePolicy)
self.gridLayout_6 = QGridLayout(self.groupBox_6) self.gridLayout_6 = QGridLayout(self.groupBox_6)
self.gridLayout_6.setObjectName(u"gridLayout_6") self.gridLayout_6.setObjectName(u"gridLayout_6")
self.gridLayout_6.setContentsMargins(2, 2, 2, 2) self.gridLayout_6.setContentsMargins(2, 2, 2, 2)
@ -345,10 +232,72 @@ class Ui_fluencyCAD(object):
self.gridLayout.addWidget(self.groupBox_11, 5, 0, 2, 1) self.gridLayout.addWidget(self.groupBox_11, 5, 0, 2, 1)
self.groupBox = QGroupBox(self.centralwidget)
self.groupBox.setObjectName(u"groupBox")
self.gridLayout_3 = QGridLayout(self.groupBox)
self.gridLayout_3.setObjectName(u"gridLayout_3")
self.pb_revop = QPushButton(self.groupBox)
self.pb_revop.setObjectName(u"pb_revop")
self.gridLayout_3.addWidget(self.pb_revop, 2, 1, 1, 1)
self.pb_extrdop = QPushButton(self.groupBox)
self.pb_extrdop.setObjectName(u"pb_extrdop")
self.gridLayout_3.addWidget(self.pb_extrdop, 0, 0, 1, 1)
self.pb_arrayop = QPushButton(self.groupBox)
self.pb_arrayop.setObjectName(u"pb_arrayop")
self.gridLayout_3.addWidget(self.pb_arrayop, 2, 0, 1, 1)
self.pb_cutop = QPushButton(self.groupBox)
self.pb_cutop.setObjectName(u"pb_cutop")
self.gridLayout_3.addWidget(self.pb_cutop, 0, 1, 1, 1)
self.pb_combop = QPushButton(self.groupBox)
self.pb_combop.setObjectName(u"pb_combop")
self.gridLayout_3.addWidget(self.pb_combop, 1, 0, 1, 1)
self.pb_moveop = QPushButton(self.groupBox)
self.pb_moveop.setObjectName(u"pb_moveop")
self.gridLayout_3.addWidget(self.pb_moveop, 1, 1, 1, 1)
self.gridLayout.addWidget(self.groupBox, 0, 3, 1, 1, Qt.AlignTop)
self.compo_box = QGroupBox(self.centralwidget)
self.compo_box.setObjectName(u"compo_box")
self.compo_box.setMinimumSize(QSize(0, 50))
self.gridLayout.addWidget(self.compo_box, 7, 1, 1, 2)
self.gl_box = QGroupBox(self.centralwidget)
self.gl_box.setObjectName(u"gl_box")
sizePolicy4 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
sizePolicy4.setHorizontalStretch(0)
sizePolicy4.setVerticalStretch(4)
sizePolicy4.setHeightForWidth(self.gl_box.sizePolicy().hasHeightForWidth())
self.gl_box.setSizePolicy(sizePolicy4)
font = QFont()
font.setPointSize(12)
self.gl_box.setFont(font)
self.horizontalLayout_4 = QHBoxLayout(self.gl_box)
#ifndef Q_OS_MAC
self.horizontalLayout_4.setSpacing(-1)
#endif
self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
self.horizontalLayout_4.setContentsMargins(12, -1, -1, -1)
self.gridLayout.addWidget(self.gl_box, 0, 2, 7, 1)
self.groupBox_10 = QGroupBox(self.centralwidget) self.groupBox_10 = QGroupBox(self.centralwidget)
self.groupBox_10.setObjectName(u"groupBox_10") self.groupBox_10.setObjectName(u"groupBox_10")
sizePolicy3.setHeightForWidth(self.groupBox_10.sizePolicy().hasHeightForWidth()) sizePolicy2.setHeightForWidth(self.groupBox_10.sizePolicy().hasHeightForWidth())
self.groupBox_10.setSizePolicy(sizePolicy3) self.groupBox_10.setSizePolicy(sizePolicy2)
self.groupBox_10.setMaximumSize(QSize(200, 16777215)) self.groupBox_10.setMaximumSize(QSize(200, 16777215))
self.verticalLayout_6 = QVBoxLayout(self.groupBox_10) self.verticalLayout_6 = QVBoxLayout(self.groupBox_10)
self.verticalLayout_6.setObjectName(u"verticalLayout_6") self.verticalLayout_6.setObjectName(u"verticalLayout_6")
@ -361,8 +310,8 @@ class Ui_fluencyCAD(object):
self.groupBox_8 = QGroupBox(self.groupBox_10) self.groupBox_8 = QGroupBox(self.groupBox_10)
self.groupBox_8.setObjectName(u"groupBox_8") self.groupBox_8.setObjectName(u"groupBox_8")
sizePolicy2.setHeightForWidth(self.groupBox_8.sizePolicy().hasHeightForWidth()) sizePolicy.setHeightForWidth(self.groupBox_8.sizePolicy().hasHeightForWidth())
self.groupBox_8.setSizePolicy(sizePolicy2) self.groupBox_8.setSizePolicy(sizePolicy)
self.groupBox_8.setMaximumSize(QSize(200, 16777215)) self.groupBox_8.setMaximumSize(QSize(200, 16777215))
self.gridLayout_8 = QGridLayout(self.groupBox_8) self.gridLayout_8 = QGridLayout(self.groupBox_8)
self.gridLayout_8.setObjectName(u"gridLayout_8") self.gridLayout_8.setObjectName(u"gridLayout_8")
@ -386,7 +335,107 @@ class Ui_fluencyCAD(object):
self.verticalLayout_6.addWidget(self.groupBox_8) self.verticalLayout_6.addWidget(self.groupBox_8)
self.gridLayout.addWidget(self.groupBox_10, 5, 4, 2, 1) self.gridLayout.addWidget(self.groupBox_10, 5, 3, 2, 1)
self.groupBox_2 = QGroupBox(self.centralwidget)
self.groupBox_2.setObjectName(u"groupBox_2")
sizePolicy.setHeightForWidth(self.groupBox_2.sizePolicy().hasHeightForWidth())
self.groupBox_2.setSizePolicy(sizePolicy)
self.groupBox_2.setMaximumSize(QSize(200, 16777215))
self.gridLayout_2 = QGridLayout(self.groupBox_2)
self.gridLayout_2.setObjectName(u"gridLayout_2")
self.pb_rectool = QPushButton(self.groupBox_2)
self.pb_rectool.setObjectName(u"pb_rectool")
self.pb_rectool.setCheckable(True)
self.pb_rectool.setAutoExclusive(False)
self.gridLayout_2.addWidget(self.pb_rectool, 1, 1, 1, 1, Qt.AlignTop)
self.pb_circtool = QPushButton(self.groupBox_2)
self.pb_circtool.setObjectName(u"pb_circtool")
self.pb_circtool.setCheckable(True)
self.pb_circtool.setAutoExclusive(False)
self.gridLayout_2.addWidget(self.pb_circtool, 2, 0, 1, 1, Qt.AlignTop)
self.pb_slotool = QPushButton(self.groupBox_2)
self.pb_slotool.setObjectName(u"pb_slotool")
self.pb_slotool.setCheckable(True)
self.pb_slotool.setAutoExclusive(False)
self.gridLayout_2.addWidget(self.pb_slotool, 2, 1, 1, 1, Qt.AlignTop)
self.pb_linetool = QPushButton(self.groupBox_2)
self.pb_linetool.setObjectName(u"pb_linetool")
self.pb_linetool.setCheckable(True)
self.pb_linetool.setAutoExclusive(False)
self.gridLayout_2.addWidget(self.pb_linetool, 1, 0, 1, 1)
self.gridLayout.addWidget(self.groupBox_2, 1, 0, 1, 1)
self.groupBox_9 = QGroupBox(self.centralwidget)
self.groupBox_9.setObjectName(u"groupBox_9")
self.groupBox_9.setMaximumSize(QSize(200, 16777215))
self.gridLayout_7 = QGridLayout(self.groupBox_9)
self.gridLayout_7.setObjectName(u"gridLayout_7")
self.pb_origin_wp = QPushButton(self.groupBox_9)
self.pb_origin_wp.setObjectName(u"pb_origin_wp")
self.gridLayout_7.addWidget(self.pb_origin_wp, 0, 0, 1, 1)
self.pb_origin_face = QPushButton(self.groupBox_9)
self.pb_origin_face.setObjectName(u"pb_origin_face")
self.gridLayout_7.addWidget(self.pb_origin_face, 0, 1, 1, 1)
self.pb_flip_face = QPushButton(self.groupBox_9)
self.pb_flip_face.setObjectName(u"pb_flip_face")
self.gridLayout_7.addWidget(self.pb_flip_face, 1, 0, 1, 1)
self.pb_move_wp = QPushButton(self.groupBox_9)
self.pb_move_wp.setObjectName(u"pb_move_wp")
self.gridLayout_7.addWidget(self.pb_move_wp, 1, 1, 1, 1)
self.gridLayout.addWidget(self.groupBox_9, 0, 0, 1, 1, Qt.AlignTop)
self.groupBox_4 = QGroupBox(self.centralwidget)
self.groupBox_4.setObjectName(u"groupBox_4")
self.verticalLayout_2 = QVBoxLayout(self.groupBox_4)
self.verticalLayout_2.setObjectName(u"verticalLayout_2")
self.pushButton_2 = QPushButton(self.groupBox_4)
self.pushButton_2.setObjectName(u"pushButton_2")
self.verticalLayout_2.addWidget(self.pushButton_2)
self.gridLayout.addWidget(self.groupBox_4, 7, 3, 1, 1)
self.assmbly_box = QGroupBox(self.centralwidget)
self.assmbly_box.setObjectName(u"assmbly_box")
self.assmbly_box.setMinimumSize(QSize(0, 50))
self.gridLayout_10 = QGridLayout(self.assmbly_box)
self.gridLayout_10.setObjectName(u"gridLayout_10")
self.pushButton_3 = QPushButton(self.assmbly_box)
self.pushButton_3.setObjectName(u"pushButton_3")
self.pushButton_3.setMinimumSize(QSize(50, 50))
self.pushButton_3.setMaximumSize(QSize(50, 50))
self.gridLayout_10.addWidget(self.pushButton_3, 0, 0, 1, 1)
self.pushButton_6 = QPushButton(self.assmbly_box)
self.pushButton_6.setObjectName(u"pushButton_6")
self.pushButton_6.setMinimumSize(QSize(50, 50))
self.pushButton_6.setMaximumSize(QSize(50, 50))
self.gridLayout_10.addWidget(self.pushButton_6, 0, 1, 1, 1)
self.gridLayout.addWidget(self.assmbly_box, 11, 2, 1, 1, Qt.AlignLeft)
fluencyCAD.setCentralWidget(self.centralwidget) fluencyCAD.setCentralWidget(self.centralwidget)
self.menubar = QMenuBar(fluencyCAD) self.menubar = QMenuBar(fluencyCAD)
@ -421,64 +470,9 @@ class Ui_fluencyCAD(object):
self.actionNew_Project.setText(QCoreApplication.translate("fluencyCAD", u"New", None)) self.actionNew_Project.setText(QCoreApplication.translate("fluencyCAD", u"New", None))
self.actionLoad_Project.setText(QCoreApplication.translate("fluencyCAD", u"Load", None)) self.actionLoad_Project.setText(QCoreApplication.translate("fluencyCAD", u"Load", None))
self.actionRecent.setText(QCoreApplication.translate("fluencyCAD", u"Recent", None)) self.actionRecent.setText(QCoreApplication.translate("fluencyCAD", u"Recent", None))
self.gl_box.setTitle(QCoreApplication.translate("fluencyCAD", u"Model Viewer", None)) self.compo_tool_box.setTitle(QCoreApplication.translate("fluencyCAD", u"Component Tools", None))
self.groupBox_4.setTitle(QCoreApplication.translate("fluencyCAD", u"Export", None)) self.new_compo.setText(QCoreApplication.translate("fluencyCAD", u"New", None))
self.pushButton_2.setText(QCoreApplication.translate("fluencyCAD", u"STL", None)) self.del_compo.setText(QCoreApplication.translate("fluencyCAD", u"Del", None))
self.InputTab.setTabText(self.InputTab.indexOf(self.sketch_tab), QCoreApplication.translate("fluencyCAD", u"Sketch", None))
self.groupBox_7.setTitle(QCoreApplication.translate("fluencyCAD", u"Executive", None))
self.pushButton_5.setText(QCoreApplication.translate("fluencyCAD", u"Load Code", None))
self.pushButton_4.setText(QCoreApplication.translate("fluencyCAD", u"Save code", None))
self.pb_apply_code.setText(QCoreApplication.translate("fluencyCAD", u"Apply Code", None))
self.pushButton.setText(QCoreApplication.translate("fluencyCAD", u"Delete Code", None))
self.InputTab.setTabText(self.InputTab.indexOf(self.code_tab), QCoreApplication.translate("fluencyCAD", u"Code", None))
self.timeline_box.setTitle(QCoreApplication.translate("fluencyCAD", u"Timeline", None))
self.groupBox.setTitle(QCoreApplication.translate("fluencyCAD", u"Modify", None))
self.pb_revop.setText(QCoreApplication.translate("fluencyCAD", u"Rev", None))
self.pb_extrdop.setText(QCoreApplication.translate("fluencyCAD", u"Extrd", None))
self.pb_arrayop.setText(QCoreApplication.translate("fluencyCAD", u"Arry", None))
self.pb_cutop.setText(QCoreApplication.translate("fluencyCAD", u"Cut", None))
self.pb_combop.setText(QCoreApplication.translate("fluencyCAD", u"Comb", None))
self.pb_moveop.setText(QCoreApplication.translate("fluencyCAD", u"Mve", None))
self.groupBox_9.setTitle(QCoreApplication.translate("fluencyCAD", u"Workplanes", None))
#if QT_CONFIG(tooltip)
self.pb_origin_wp.setToolTip(QCoreApplication.translate("fluencyCAD", u"<W>orking Plane at 0, 0, 0", None))
#endif // QT_CONFIG(tooltip)
self.pb_origin_wp.setText(QCoreApplication.translate("fluencyCAD", u"WP Origin", None))
#if QT_CONFIG(shortcut)
self.pb_origin_wp.setShortcut(QCoreApplication.translate("fluencyCAD", u"W", None))
#endif // QT_CONFIG(shortcut)
#if QT_CONFIG(tooltip)
self.pb_origin_face.setToolTip(QCoreApplication.translate("fluencyCAD", u"Working Plane >P<rojection at selected edges face", None))
#endif // QT_CONFIG(tooltip)
self.pb_origin_face.setText(QCoreApplication.translate("fluencyCAD", u" WP Face", None))
#if QT_CONFIG(shortcut)
self.pb_origin_face.setShortcut(QCoreApplication.translate("fluencyCAD", u"P", None))
#endif // QT_CONFIG(shortcut)
#if QT_CONFIG(tooltip)
self.pb_flip_face.setToolTip(QCoreApplication.translate("fluencyCAD", u"Flip >N<ormal of projected mesh.", None))
#endif // QT_CONFIG(tooltip)
self.pb_flip_face.setText(QCoreApplication.translate("fluencyCAD", u"WP Flip", None))
#if QT_CONFIG(shortcut)
self.pb_flip_face.setShortcut(QCoreApplication.translate("fluencyCAD", u"N", None))
#endif // QT_CONFIG(shortcut)
#if QT_CONFIG(tooltip)
self.pb_move_wp.setToolTip(QCoreApplication.translate("fluencyCAD", u">M<ove projected mesh workplane", None))
#endif // QT_CONFIG(tooltip)
self.pb_move_wp.setText(QCoreApplication.translate("fluencyCAD", u"WP Mve", None))
#if QT_CONFIG(shortcut)
self.pb_move_wp.setShortcut(QCoreApplication.translate("fluencyCAD", u"M", None))
#endif // QT_CONFIG(shortcut)
self.groupBox_2.setTitle(QCoreApplication.translate("fluencyCAD", u"Drawing", None))
self.pb_rectool.setText(QCoreApplication.translate("fluencyCAD", u"Rctgl", None))
self.pb_circtool.setText(QCoreApplication.translate("fluencyCAD", u"Circle", None))
self.pb_slotool.setText(QCoreApplication.translate("fluencyCAD", u"Slot", None))
#if QT_CONFIG(statustip)
self.pb_linetool.setStatusTip(QCoreApplication.translate("fluencyCAD", u"Line >S<egment", None))
#endif // QT_CONFIG(statustip)
self.pb_linetool.setText(QCoreApplication.translate("fluencyCAD", u"Line", None))
#if QT_CONFIG(shortcut)
self.pb_linetool.setShortcut(QCoreApplication.translate("fluencyCAD", u"S", None))
#endif // QT_CONFIG(shortcut)
self.groupBox_3.setTitle(QCoreApplication.translate("fluencyCAD", u"Constrain", None)) self.groupBox_3.setTitle(QCoreApplication.translate("fluencyCAD", u"Constrain", None))
#if QT_CONFIG(tooltip) #if QT_CONFIG(tooltip)
self.pb_con_line.setToolTip(QCoreApplication.translate("fluencyCAD", u"Point to Line Constrain", None)) self.pb_con_line.setToolTip(QCoreApplication.translate("fluencyCAD", u"Point to Line Constrain", None))
@ -509,16 +503,77 @@ class Ui_fluencyCAD(object):
self.pb_con_perp.setToolTip(QCoreApplication.translate("fluencyCAD", u"Constrain Line perpendicular to another line.", None)) self.pb_con_perp.setToolTip(QCoreApplication.translate("fluencyCAD", u"Constrain Line perpendicular to another line.", None))
#endif // QT_CONFIG(tooltip) #endif // QT_CONFIG(tooltip)
self.pb_con_perp.setText(QCoreApplication.translate("fluencyCAD", u"Perp_Lne", None)) self.pb_con_perp.setText(QCoreApplication.translate("fluencyCAD", u"Perp_Lne", None))
self.InputTab.setTabText(self.InputTab.indexOf(self.sketch_tab), QCoreApplication.translate("fluencyCAD", u"Sketch", None))
self.groupBox_7.setTitle(QCoreApplication.translate("fluencyCAD", u"Executive", None))
self.pushButton_5.setText(QCoreApplication.translate("fluencyCAD", u"Load Code", None))
self.pushButton_4.setText(QCoreApplication.translate("fluencyCAD", u"Save code", None))
self.pb_apply_code.setText(QCoreApplication.translate("fluencyCAD", u"Apply Code", None))
self.pushButton.setText(QCoreApplication.translate("fluencyCAD", u"Delete Code", None))
self.InputTab.setTabText(self.InputTab.indexOf(self.code_tab), QCoreApplication.translate("fluencyCAD", u"Code", None))
self.groupBox_11.setTitle(QCoreApplication.translate("fluencyCAD", u"Sketch", None)) self.groupBox_11.setTitle(QCoreApplication.translate("fluencyCAD", u"Sketch", None))
self.groupBox_6.setTitle(QCoreApplication.translate("fluencyCAD", u"Tools", None)) self.groupBox_6.setTitle(QCoreApplication.translate("fluencyCAD", u"Tools", None))
self.pb_edt_sktch.setText(QCoreApplication.translate("fluencyCAD", u"Edt", None)) self.pb_edt_sktch.setText(QCoreApplication.translate("fluencyCAD", u"Edt", None))
self.pb_nw_sktch.setText(QCoreApplication.translate("fluencyCAD", u"Add", None)) self.pb_nw_sktch.setText(QCoreApplication.translate("fluencyCAD", u"Add", None))
self.pb_del_sketch.setText(QCoreApplication.translate("fluencyCAD", u"Del", None)) self.pb_del_sketch.setText(QCoreApplication.translate("fluencyCAD", u"Del", None))
self.groupBox.setTitle(QCoreApplication.translate("fluencyCAD", u"Modify", None))
self.pb_revop.setText(QCoreApplication.translate("fluencyCAD", u"Rev", None))
self.pb_extrdop.setText(QCoreApplication.translate("fluencyCAD", u"Extrd", None))
self.pb_arrayop.setText(QCoreApplication.translate("fluencyCAD", u"Arry", None))
self.pb_cutop.setText(QCoreApplication.translate("fluencyCAD", u"Cut", None))
self.pb_combop.setText(QCoreApplication.translate("fluencyCAD", u"Comb", None))
self.pb_moveop.setText(QCoreApplication.translate("fluencyCAD", u"Mve", None))
self.compo_box.setTitle(QCoreApplication.translate("fluencyCAD", u"Components", None))
self.gl_box.setTitle(QCoreApplication.translate("fluencyCAD", u"Model Viewer", None))
self.groupBox_10.setTitle(QCoreApplication.translate("fluencyCAD", u"Bodys / Operations", None)) self.groupBox_10.setTitle(QCoreApplication.translate("fluencyCAD", u"Bodys / Operations", None))
self.groupBox_8.setTitle(QCoreApplication.translate("fluencyCAD", u"Tools", None)) self.groupBox_8.setTitle(QCoreApplication.translate("fluencyCAD", u"Tools", None))
self.pb_del_body.setText(QCoreApplication.translate("fluencyCAD", u"Del", None)) self.pb_del_body.setText(QCoreApplication.translate("fluencyCAD", u"Del", None))
self.pb_update_body.setText(QCoreApplication.translate("fluencyCAD", u"Upd", None)) self.pb_update_body.setText(QCoreApplication.translate("fluencyCAD", u"Upd", None))
self.pb_edt_sktch_3.setText(QCoreApplication.translate("fluencyCAD", u"Nothing", None)) self.pb_edt_sktch_3.setText(QCoreApplication.translate("fluencyCAD", u"Nothing", None))
self.groupBox_2.setTitle(QCoreApplication.translate("fluencyCAD", u"Drawing", None))
self.pb_rectool.setText(QCoreApplication.translate("fluencyCAD", u"Rctgl", None))
self.pb_circtool.setText(QCoreApplication.translate("fluencyCAD", u"Circle", None))
self.pb_slotool.setText(QCoreApplication.translate("fluencyCAD", u"Slot", None))
#if QT_CONFIG(statustip)
self.pb_linetool.setStatusTip(QCoreApplication.translate("fluencyCAD", u"Line >S<egment", None))
#endif // QT_CONFIG(statustip)
self.pb_linetool.setText(QCoreApplication.translate("fluencyCAD", u"Line", None))
#if QT_CONFIG(shortcut)
self.pb_linetool.setShortcut(QCoreApplication.translate("fluencyCAD", u"S", None))
#endif // QT_CONFIG(shortcut)
self.groupBox_9.setTitle(QCoreApplication.translate("fluencyCAD", u"Workplanes", None))
#if QT_CONFIG(tooltip)
self.pb_origin_wp.setToolTip(QCoreApplication.translate("fluencyCAD", u"<W>orking Plane at 0, 0, 0", None))
#endif // QT_CONFIG(tooltip)
self.pb_origin_wp.setText(QCoreApplication.translate("fluencyCAD", u"WP Origin", None))
#if QT_CONFIG(shortcut)
self.pb_origin_wp.setShortcut(QCoreApplication.translate("fluencyCAD", u"W", None))
#endif // QT_CONFIG(shortcut)
#if QT_CONFIG(tooltip)
self.pb_origin_face.setToolTip(QCoreApplication.translate("fluencyCAD", u"Working Plane >P<rojection at selected edges face", None))
#endif // QT_CONFIG(tooltip)
self.pb_origin_face.setText(QCoreApplication.translate("fluencyCAD", u" WP Face", None))
#if QT_CONFIG(shortcut)
self.pb_origin_face.setShortcut(QCoreApplication.translate("fluencyCAD", u"P", None))
#endif // QT_CONFIG(shortcut)
#if QT_CONFIG(tooltip)
self.pb_flip_face.setToolTip(QCoreApplication.translate("fluencyCAD", u"Flip >N<ormal of projected mesh.", None))
#endif // QT_CONFIG(tooltip)
self.pb_flip_face.setText(QCoreApplication.translate("fluencyCAD", u"WP Flip", None))
#if QT_CONFIG(shortcut)
self.pb_flip_face.setShortcut(QCoreApplication.translate("fluencyCAD", u"N", None))
#endif // QT_CONFIG(shortcut)
#if QT_CONFIG(tooltip)
self.pb_move_wp.setToolTip(QCoreApplication.translate("fluencyCAD", u">M<ove projected mesh workplane", None))
#endif // QT_CONFIG(tooltip)
self.pb_move_wp.setText(QCoreApplication.translate("fluencyCAD", u"WP Mve", None))
#if QT_CONFIG(shortcut)
self.pb_move_wp.setShortcut(QCoreApplication.translate("fluencyCAD", u"M", None))
#endif // QT_CONFIG(shortcut)
self.groupBox_4.setTitle(QCoreApplication.translate("fluencyCAD", u"Export", None))
self.pushButton_2.setText(QCoreApplication.translate("fluencyCAD", u"STL", None))
self.assmbly_box.setTitle(QCoreApplication.translate("fluencyCAD", u"Assembly Tools", None))
self.pushButton_3.setText(QCoreApplication.translate("fluencyCAD", u"+ Cnct", None))
self.pushButton_6.setText(QCoreApplication.translate("fluencyCAD", u"- Cnct", None))
self.menuFile.setTitle(QCoreApplication.translate("fluencyCAD", u"File", None)) self.menuFile.setTitle(QCoreApplication.translate("fluencyCAD", u"File", None))
self.menuSettings.setTitle(QCoreApplication.translate("fluencyCAD", u"Settings", None)) self.menuSettings.setTitle(QCoreApplication.translate("fluencyCAD", u"Settings", None))
# retranslateUi # retranslateUi

1
doc/commands.md Normal file
View File

@ -0,0 +1 @@
pyside6-uic gui.ui > Gui.py -g python

706
gui.ui
View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>2192</width> <width>2192</width>
<height>957</height> <height>1073</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -15,312 +15,65 @@
</property> </property>
<widget class="QWidget" name="centralwidget"> <widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="3" rowspan="7"> <item row="11" column="1" alignment="Qt::AlignLeft">
<widget class="QGroupBox" name="gl_box"> <widget class="QGroupBox" name="compo_tool_box">
<property name="sizePolicy"> <property name="minimumSize">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <size>
<horstretch>0</horstretch> <width>0</width>
<verstretch>4</verstretch> <height>50</height>
</sizepolicy> </size>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property> </property>
<property name="title"> <property name="title">
<string>Model Viewer</string> <string>Component Tools</string>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QGridLayout" name="gridLayout_9">
<property name="spacing">
<number>-1</number>
</property>
<property name="leftMargin">
<number>12</number>
</property>
</layout>
</widget>
</item>
<item row="12" column="4">
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Export</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QPushButton" name="pushButton_2">
<property name="text">
<string>STL</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="2" rowspan="7">
<widget class="QTabWidget" name="InputTab">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="sketch_tab">
<attribute name="title">
<string>Sketch</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4"/>
</widget>
<widget class="QWidget" name="code_tab">
<attribute name="title">
<string>Code</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTextEdit" name="textEdit"/>
</item>
<item>
<widget class="QGroupBox" name="groupBox_7">
<property name="title">
<string>Executive</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="2" column="0">
<widget class="QPushButton" name="pushButton_5">
<property name="text">
<string>Load Code</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="pushButton_4">
<property name="text">
<string>Save code</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pb_apply_code">
<property name="text">
<string>Apply Code</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>Delete Code</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item row="12" column="2" colspan="2">
<widget class="QGroupBox" name="timeline_box">
<property name="title">
<string>Timeline</string>
</property>
</widget>
</item>
<item row="0" column="4" alignment="Qt::AlignTop">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Modify</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="2" column="1">
<widget class="QPushButton" name="pb_revop">
<property name="text">
<string>Rev</string>
</property>
</widget>
</item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QPushButton" name="pb_extrdop"> <widget class="QPushButton" name="new_compo">
<property name="text"> <property name="minimumSize">
<string>Extrd</string> <size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property> </property>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="pb_arrayop">
<property name="text"> <property name="text">
<string>Arry</string> <string>New</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QPushButton" name="pb_cutop"> <widget class="QPushButton" name="del_compo">
<property name="text"> <property name="enabled">
<string extracomment="1. Bigger obj 2. smaller object">Cut</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pb_combop">
<property name="text">
<string>Comb</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pb_moveop">
<property name="text">
<string>Mve</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="0" alignment="Qt::AlignTop">
<widget class="QGroupBox" name="groupBox_9">
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="title">
<string>Workplanes</string>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0">
<widget class="QPushButton" name="pb_origin_wp">
<property name="toolTip">
<string>&lt;W&gt;orking Plane at 0, 0, 0</string>
</property>
<property name="text">
<string>WP Origin</string>
</property>
<property name="shortcut">
<string>W</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="pb_origin_face">
<property name="toolTip">
<string>Working Plane &gt;P&lt;rojection at selected edges face</string>
</property>
<property name="text">
<string> WP Face</string>
</property>
<property name="shortcut">
<string>P</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pb_flip_face">
<property name="toolTip">
<string>Flip &gt;N&lt;ormal of projected mesh.</string>
</property>
<property name="text">
<string>WP Flip</string>
</property>
<property name="shortcut">
<string>N</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pb_move_wp">
<property name="toolTip">
<string>&gt;M&lt;ove projected mesh workplane</string>
</property>
<property name="text">
<string>WP Mve</string>
</property>
<property name="shortcut">
<string>M</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="title">
<string>Drawing</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="1" alignment="Qt::AlignTop">
<widget class="QPushButton" name="pb_rectool">
<property name="text">
<string>Rctgl</string>
</property>
<property name="checkable">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="autoExclusive"> <property name="sizePolicy">
<bool>false</bool> <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
</widget> <property name="minimumSize">
</item> <size>
<item row="2" column="0" alignment="Qt::AlignTop"> <width>50</width>
<widget class="QPushButton" name="pb_circtool"> <height>50</height>
<property name="text"> </size>
<string>Circle</string>
</property> </property>
<property name="checkable"> <property name="maximumSize">
<bool>true</bool> <size>
<width>50</width>
<height>50</height>
</size>
</property> </property>
<property name="autoExclusive"> <property name="layoutDirection">
<bool>false</bool> <enum>Qt::LeftToRight</enum>
</property>
</widget>
</item>
<item row="2" column="1" alignment="Qt::AlignTop">
<widget class="QPushButton" name="pb_slotool">
<property name="text">
<string>Slot</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoExclusive">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pb_linetool">
<property name="statusTip">
<string>Line &gt;S&lt;egment</string>
</property> </property>
<property name="text"> <property name="text">
<string extracomment="Line &gt;S&lt;egment">Line</string> <string>Del</string>
</property>
<property name="shortcut">
<string>S</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoExclusive">
<bool>false</bool>
</property> </property>
</widget> </widget>
</item> </item>
@ -470,6 +223,72 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="0" column="1" rowspan="7">
<widget class="QTabWidget" name="InputTab">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="sketch_tab">
<attribute name="title">
<string>Sketch</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4"/>
</widget>
<widget class="QWidget" name="code_tab">
<attribute name="title">
<string>Code</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTextEdit" name="textEdit"/>
</item>
<item>
<widget class="QGroupBox" name="groupBox_7">
<property name="title">
<string>Executive</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="2" column="0">
<widget class="QPushButton" name="pushButton_5">
<property name="text">
<string>Load Code</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="pushButton_4">
<property name="text">
<string>Save code</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pb_apply_code">
<property name="text">
<string>Apply Code</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>Delete Code</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item row="5" column="0" rowspan="2"> <item row="5" column="0" rowspan="2">
<widget class="QGroupBox" name="groupBox_11"> <widget class="QGroupBox" name="groupBox_11">
<property name="sizePolicy"> <property name="sizePolicy">
@ -564,7 +383,97 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="5" column="4" rowspan="2"> <item row="0" column="3" alignment="Qt::AlignTop">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Modify</string>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="2" column="1">
<widget class="QPushButton" name="pb_revop">
<property name="text">
<string>Rev</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QPushButton" name="pb_extrdop">
<property name="text">
<string>Extrd</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="pb_arrayop">
<property name="text">
<string>Arry</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="pb_cutop">
<property name="text">
<string extracomment="1. Bigger obj 2. smaller object">Cut</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pb_combop">
<property name="text">
<string>Comb</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pb_moveop">
<property name="text">
<string>Mve</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="7" column="1" colspan="2">
<widget class="QGroupBox" name="compo_box">
<property name="minimumSize">
<size>
<width>0</width>
<height>50</height>
</size>
</property>
<property name="title">
<string>Components</string>
</property>
</widget>
</item>
<item row="0" column="2" rowspan="7">
<widget class="QGroupBox" name="gl_box">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>4</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="title">
<string>Model Viewer</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="spacing">
<number>-1</number>
</property>
<property name="leftMargin">
<number>12</number>
</property>
</layout>
</widget>
</item>
<item row="5" column="3" rowspan="2">
<widget class="QGroupBox" name="groupBox_10"> <widget class="QGroupBox" name="groupBox_10">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding"> <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
@ -658,6 +567,221 @@
</layout> </layout>
</widget> </widget>
</item> </item>
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="title">
<string>Drawing</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="1" alignment="Qt::AlignTop">
<widget class="QPushButton" name="pb_rectool">
<property name="text">
<string>Rctgl</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoExclusive">
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="0" alignment="Qt::AlignTop">
<widget class="QPushButton" name="pb_circtool">
<property name="text">
<string>Circle</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoExclusive">
<bool>false</bool>
</property>
</widget>
</item>
<item row="2" column="1" alignment="Qt::AlignTop">
<widget class="QPushButton" name="pb_slotool">
<property name="text">
<string>Slot</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoExclusive">
<bool>false</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pb_linetool">
<property name="statusTip">
<string>Line &gt;S&lt;egment</string>
</property>
<property name="text">
<string extracomment="Line &gt;S&lt;egment">Line</string>
</property>
<property name="shortcut">
<string>S</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoExclusive">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="0" alignment="Qt::AlignTop">
<widget class="QGroupBox" name="groupBox_9">
<property name="maximumSize">
<size>
<width>200</width>
<height>16777215</height>
</size>
</property>
<property name="title">
<string>Workplanes</string>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<item row="0" column="0">
<widget class="QPushButton" name="pb_origin_wp">
<property name="toolTip">
<string>&lt;W&gt;orking Plane at 0, 0, 0</string>
</property>
<property name="text">
<string>WP Origin</string>
</property>
<property name="shortcut">
<string>W</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="pb_origin_face">
<property name="toolTip">
<string>Working Plane &gt;P&lt;rojection at selected edges face</string>
</property>
<property name="text">
<string> WP Face</string>
</property>
<property name="shortcut">
<string>P</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPushButton" name="pb_flip_face">
<property name="toolTip">
<string>Flip &gt;N&lt;ormal of projected mesh.</string>
</property>
<property name="text">
<string>WP Flip</string>
</property>
<property name="shortcut">
<string>N</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pb_move_wp">
<property name="toolTip">
<string>&gt;M&lt;ove projected mesh workplane</string>
</property>
<property name="text">
<string>WP Mve</string>
</property>
<property name="shortcut">
<string>M</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="7" column="3">
<widget class="QGroupBox" name="groupBox_4">
<property name="title">
<string>Export</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QPushButton" name="pushButton_2">
<property name="text">
<string>STL</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="11" column="2" alignment="Qt::AlignLeft">
<widget class="QGroupBox" name="assmbly_box">
<property name="minimumSize">
<size>
<width>0</width>
<height>50</height>
</size>
</property>
<property name="title">
<string>Assembly Tools</string>
</property>
<layout class="QGridLayout" name="gridLayout_10">
<item row="0" column="0">
<widget class="QPushButton" name="pushButton_3">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>+ Cnct</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QPushButton" name="pushButton_6">
<property name="minimumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>50</width>
<height>50</height>
</size>
</property>
<property name="text">
<string>- Cnct</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout> </layout>
</widget> </widget>
<widget class="QMenuBar" name="menubar"> <widget class="QMenuBar" name="menubar">

58
main.py
View File

@ -99,11 +99,11 @@ class MainWindow(QMainWindow):
size_policy = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.MinimumExpanding) size_policy = QSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.MinimumExpanding)
self.sketchWidget.setSizePolicy(size_policy) self.sketchWidget.setSizePolicy(size_policy)
### Main Model ### Main Model -OLD ?
self.model = { """self.model = {
'sketches': {}, 'sketches': {},
'operation': {}, 'operation': {},
} }"""
self.list_selected = [] self.list_selected = []
#self.ui.pb_apply_code.pressed.connect(self.check_current_tab) #self.ui.pb_apply_code.pressed.connect(self.check_current_tab)
@ -144,7 +144,13 @@ class MainWindow(QMainWindow):
self.project = Project() self.project = Project()
self.new_project() self.new_project()
"""Project -> Timeline -> Component -> Sketch -> Body / Interactor -> Connector -> Assembly -> PB Render""" ### COMPOS
### COMPOS
self.ui.new_compo.pressed.connect(self.new_component)
"""Project -> (Timeline) -> Component -> Sketch -> Body / Interactor -> Connector -> Assembly -> PB Render"""
def on_flip_face(self): def on_flip_face(self):
self.send_command.emit("flip") self.send_command.emit("flip")
@ -229,33 +235,41 @@ class MainWindow(QMainWindow):
self.new_component() self.new_component()
def new_component(self): def new_component(self):
print("Compo") print("Creating a new component...")
# Lazily initialize self.compo_layout if it doesn't exist
if not hasattr(self, 'compo_layout'):
print("Initializing compo_layout...")
self.compo_layout = QHBoxLayout()
# Ensure the QGroupBox has a layout
if not self.ui.compo_box.layout():
self.ui.compo_box.setLayout(QVBoxLayout()) # Set a default layout for QGroupBox
# Add the horizontal layout to the QGroupBox's layout
self.ui.compo_box.layout().addLayout(self.compo_layout)
# Align the layout to the left
self.compo_layout.setAlignment(Qt.AlignLeft)
# Create and initialize a new Component
compo = Component() compo = Component()
compo.id = "New Compo" compo.id = f"Component {len(self.project.timeline) + 1}"
compo.descript = "Initial Component" compo.descript = "Initial Component"
compo.sketches = {} compo.sketches = {}
compo.body = {} compo.body = {}
self.project.timeline.append(compo) self.project.timeline.append(compo)
# Create a horizontal layout # Create a button for the new component
horizontal_layout = QHBoxLayout()
# Set the layout for the timeline_box QFrame
self.ui.timeline_box.setLayout(horizontal_layout)
# Create the button
button = QPushButton() button = QPushButton()
button.setToolTip(compo.id) button.setToolTip(compo.id)
button.setText(str(len(self.project.timeline))) button.setText(str(len(self.project.timeline)))
button.setFixedSize(QSize(40, 40)) # Set button size
# Set the button's fixed size # Add the button to the layout
button.setFixedSize(QSize(40, 40)) self.compo_layout.addWidget(button)
# Add the button to the horizontal layout print(f"Added component {compo.id} to the layout.")
horizontal_layout.addWidget(button)
# Set the alignment of the layout to left
horizontal_layout.setAlignment(Qt.AlignLeft)
def add_new_sketch_origin(self): def add_new_sketch_origin(self):
name = f"sketches-{str(names.get_first_name())}" name = f"sketches-{str(names.get_first_name())}"
@ -281,8 +295,10 @@ class MainWindow(QMainWindow):
self.sketchWidget.reset_buffers() self.sketchWidget.reset_buffers()
self.sketchWidget.create_sketch(sketch) self.sketchWidget.create_sketch(sketch)
self.sketchWidget.create_workplane_projected() self.sketchWidget.create_workplane_projected()
if not sketch.proj_lines: if not sketch.proj_lines:
self.sketchWidget.convert_proj_points(sketch.proj_points) self.sketchWidget.convert_proj_points(sketch.proj_points)
self.sketchWidget.convert_proj_lines(sketch.proj_lines) self.sketchWidget.convert_proj_lines(sketch.proj_lines)
self.sketchWidget.update() self.sketchWidget.update()
@ -792,7 +808,7 @@ class Project:
assembly: Assembly = None assembly: Assembly = None
if __name__ == "__main__": if __name__ == "__main__":
app = QApplication([]) app = QApplication()
window = MainWindow() window = MainWindow()
window.show() window.show()
app.exec() app.exec()