diff --git a/WorkFeature/Icons/WF_2Sketch.svg b/WorkFeature/Icons/WF_2Sketch.svg
new file mode 100644
index 0000000..086f777
--- /dev/null
+++ b/WorkFeature/Icons/WF_2Sketch.svg
@@ -0,0 +1,162 @@
+
+
+
+
diff --git a/WorkFeature/Icons/WF_cutAxis.svg b/WorkFeature/Icons/WF_cutAxis.svg
new file mode 100644
index 0000000..ebf6bd9
--- /dev/null
+++ b/WorkFeature/Icons/WF_cutAxis.svg
@@ -0,0 +1,313 @@
+
+
+
+
diff --git a/WorkFeature/Icons/WF_isCoplanar.svg b/WorkFeature/Icons/WF_isCoplanar.svg
new file mode 100644
index 0000000..84f453f
--- /dev/null
+++ b/WorkFeature/Icons/WF_isCoplanar.svg
@@ -0,0 +1,494 @@
+
+
+
+
diff --git a/WorkFeature/Icons/WF_isParallel.svg b/WorkFeature/Icons/WF_isParallel.svg
new file mode 100644
index 0000000..d25f888
--- /dev/null
+++ b/WorkFeature/Icons/WF_isParallel.svg
@@ -0,0 +1,500 @@
+
+
+
+
diff --git a/WorkFeature/Icons/WF_isPerpendicular.svg b/WorkFeature/Icons/WF_isPerpendicular.svg
new file mode 100644
index 0000000..ee98e55
--- /dev/null
+++ b/WorkFeature/Icons/WF_isPerpendicular.svg
@@ -0,0 +1,478 @@
+
+
+
+
diff --git a/WorkFeature/WFGui_2015.py b/WorkFeature/WFGui_2015.py
index 0e6e907..dd38c36 100644
--- a/WorkFeature/WFGui_2015.py
+++ b/WorkFeature/WFGui_2015.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
-# Form implementation generated from reading ui file 'WFGui_2015_02_17.ui'
+# Form implementation generated from reading ui file 'WFGui_2015_02_25.ui'
#
-# Created: Tue Feb 17 11:56:24 2015
+# Created: Wed Feb 25 10:08:21 2015
# by: PySide UI code generator 4.9.1
#
# WARNING! All changes made in this file will be lost!
@@ -17,17 +17,28 @@ except AttributeError:
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName(_fromUtf8("Form"))
- Form.resize(376, 742)
+ Form.resize(386, 767)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_Axes.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
Form.setWindowIcon(icon)
- self.gridLayout_15 = QtGui.QGridLayout(Form)
- self.gridLayout_15.setObjectName(_fromUtf8("gridLayout_15"))
+ self.gridLayout_32 = QtGui.QGridLayout(Form)
+ self.gridLayout_32.setObjectName(_fromUtf8("gridLayout_32"))
+ self.horizontalLayout_9 = QtGui.QHBoxLayout()
+ self.horizontalLayout_9.setObjectName(_fromUtf8("horizontalLayout_9"))
+ self.button_WF_quit = QtGui.QPushButton(Form)
+ self.button_WF_quit.setObjectName(_fromUtf8("button_WF_quit"))
+ self.horizontalLayout_9.addWidget(self.button_WF_quit)
+ spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+ self.horizontalLayout_9.addItem(spacerItem)
+ self.label_release = QtGui.QLabel(Form)
+ self.label_release.setObjectName(_fromUtf8("label_release"))
+ self.horizontalLayout_9.addWidget(self.label_release)
+ self.gridLayout_32.addLayout(self.horizontalLayout_9, 1, 0, 1, 1)
self.scrollArea = QtGui.QScrollArea(Form)
self.scrollArea.setWidgetResizable(True)
self.scrollArea.setObjectName(_fromUtf8("scrollArea"))
self.scrollAreaWidgetContents_2 = QtGui.QWidget()
- self.scrollAreaWidgetContents_2.setGeometry(QtCore.QRect(0, -35, 340, 722))
+ self.scrollAreaWidgetContents_2.setGeometry(QtCore.QRect(0, 0, 350, 765))
self.scrollAreaWidgetContents_2.setObjectName(_fromUtf8("scrollAreaWidgetContents_2"))
self.gridLayout_4 = QtGui.QGridLayout(self.scrollAreaWidgetContents_2)
self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4"))
@@ -43,18 +54,30 @@ class Ui_Form(object):
self.tabWidget.setObjectName(_fromUtf8("tabWidget"))
self.Origin_Tab = QtGui.QWidget()
self.Origin_Tab.setObjectName(_fromUtf8("Origin_Tab"))
- self.gridLayout_7 = QtGui.QGridLayout(self.Origin_Tab)
- self.gridLayout_7.setObjectName(_fromUtf8("gridLayout_7"))
- self.verticalLayout_3 = QtGui.QVBoxLayout()
- self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
+ self.gridLayout_31 = QtGui.QGridLayout(self.Origin_Tab)
+ self.gridLayout_31.setObjectName(_fromUtf8("gridLayout_31"))
self.button_origin = QtGui.QPushButton(self.Origin_Tab)
self.button_origin.setIcon(icon)
self.button_origin.setIconSize(QtCore.QSize(32, 32))
self.button_origin.setObjectName(_fromUtf8("button_origin"))
- self.verticalLayout_3.addWidget(self.button_origin)
- spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.verticalLayout_3.addItem(spacerItem)
- self.gridLayout_7.addLayout(self.verticalLayout_3, 0, 0, 1, 1)
+ self.gridLayout_31.addWidget(self.button_origin, 0, 0, 1, 1)
+ self.frame_3 = QtGui.QFrame(self.Origin_Tab)
+ self.frame_3.setFrameShape(QtGui.QFrame.StyledPanel)
+ self.frame_3.setFrameShadow(QtGui.QFrame.Raised)
+ self.frame_3.setObjectName(_fromUtf8("frame_3"))
+ self.gridLayout_14 = QtGui.QGridLayout(self.frame_3)
+ self.gridLayout_14.setObjectName(_fromUtf8("gridLayout_14"))
+ self.groupBox_5 = QtGui.QGroupBox(self.frame_3)
+ self.groupBox_5.setObjectName(_fromUtf8("groupBox_5"))
+ self.gridLayout_7 = QtGui.QGridLayout(self.groupBox_5)
+ self.gridLayout_7.setObjectName(_fromUtf8("gridLayout_7"))
+ self.radioButton_verbose = QtGui.QRadioButton(self.groupBox_5)
+ self.radioButton_verbose.setObjectName(_fromUtf8("radioButton_verbose"))
+ self.gridLayout_7.addWidget(self.radioButton_verbose, 0, 0, 1, 1)
+ self.gridLayout_14.addWidget(self.groupBox_5, 0, 0, 1, 1)
+ self.gridLayout_31.addWidget(self.frame_3, 1, 0, 1, 1)
+ spacerItem1 = QtGui.QSpacerItem(20, 539, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ self.gridLayout_31.addItem(spacerItem1, 2, 0, 1, 1)
self.tabWidget.addTab(self.Origin_Tab, icon, _fromUtf8(""))
self.Point_Tab = QtGui.QWidget()
self.Point_Tab.setObjectName(_fromUtf8("Point_Tab"))
@@ -173,12 +196,12 @@ class Ui_Form(object):
self.button_twolines_point.setIconSize(QtCore.QSize(32, 32))
self.button_twolines_point.setObjectName(_fromUtf8("button_twolines_point"))
self.gridLayout_3.addWidget(self.button_twolines_point, 10, 0, 1, 1)
- self.button_click_for_point = QtGui.QPushButton(self.Point_Tab)
+ self.button_click_for_point = QtGui.QRadioButton(self.Point_Tab)
icon12 = QtGui.QIcon()
icon12.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_clickPoint.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.button_click_for_point.setIcon(icon12)
self.button_click_for_point.setIconSize(QtCore.QSize(32, 32))
- self.button_click_for_point.setCheckable(False)
+ self.button_click_for_point.setCheckable(True)
self.button_click_for_point.setObjectName(_fromUtf8("button_click_for_point"))
self.gridLayout_3.addWidget(self.button_click_for_point, 11, 0, 1, 1)
self.button_object_base_point = QtGui.QPushButton(self.Point_Tab)
@@ -188,15 +211,27 @@ class Ui_Form(object):
self.button_object_base_point.setIconSize(QtCore.QSize(32, 32))
self.button_object_base_point.setObjectName(_fromUtf8("button_object_base_point"))
self.gridLayout_3.addWidget(self.button_object_base_point, 12, 0, 1, 1)
- spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.gridLayout_3.addItem(spacerItem1, 13, 0, 1, 1)
+ self.button_point_to_sketch = QtGui.QPushButton(self.Point_Tab)
icon14 = QtGui.QIcon()
- icon14.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_point.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.tabWidget.addTab(self.Point_Tab, icon14, _fromUtf8(""))
+ icon14.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_2Sketch.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_point_to_sketch.setIcon(icon14)
+ self.button_point_to_sketch.setIconSize(QtCore.QSize(32, 32))
+ self.button_point_to_sketch.setObjectName(_fromUtf8("button_point_to_sketch"))
+ self.gridLayout_3.addWidget(self.button_point_to_sketch, 13, 0, 1, 1)
+ icon15 = QtGui.QIcon()
+ icon15.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_point.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.tabWidget.addTab(self.Point_Tab, icon15, _fromUtf8(""))
self.Axis_Tab = QtGui.QWidget()
self.Axis_Tab.setObjectName(_fromUtf8("Axis_Tab"))
- self.gridLayout = QtGui.QGridLayout(self.Axis_Tab)
- self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
+ self.gridLayout_30 = QtGui.QGridLayout(self.Axis_Tab)
+ self.gridLayout_30.setObjectName(_fromUtf8("gridLayout_30"))
+ self.button_object_axis = QtGui.QPushButton(self.Axis_Tab)
+ icon16 = QtGui.QIcon()
+ icon16.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_centerObjectsAxes.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_object_axis.setIcon(icon16)
+ self.button_object_axis.setIconSize(QtCore.QSize(32, 32))
+ self.button_object_axis.setObjectName(_fromUtf8("button_object_axis"))
+ self.gridLayout_30.addWidget(self.button_object_axis, 0, 0, 1, 1)
self.horizontalLayout_2 = QtGui.QHBoxLayout()
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
self.button_twopoints_axis = QtGui.QPushButton(self.Axis_Tab)
@@ -205,38 +240,82 @@ class Ui_Form(object):
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.button_twopoints_axis.sizePolicy().hasHeightForWidth())
self.button_twopoints_axis.setSizePolicy(sizePolicy)
- icon15 = QtGui.QIcon()
- icon15.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_2pointsLine.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_twopoints_axis.setIcon(icon15)
+ icon17 = QtGui.QIcon()
+ icon17.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_2pointsLine.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_twopoints_axis.setIcon(icon17)
self.button_twopoints_axis.setIconSize(QtCore.QSize(32, 32))
self.button_twopoints_axis.setObjectName(_fromUtf8("button_twopoints_axis"))
self.horizontalLayout_2.addWidget(self.button_twopoints_axis)
self.extension_twopoints_axis = QtGui.QLineEdit(self.Axis_Tab)
- self.extension_twopoints_axis.setMaximumSize(QtCore.QSize(60, 16777215))
+ self.extension_twopoints_axis.setMaximumSize(QtCore.QSize(40, 16777215))
self.extension_twopoints_axis.setObjectName(_fromUtf8("extension_twopoints_axis"))
self.horizontalLayout_2.addWidget(self.extension_twopoints_axis)
- self.gridLayout.addLayout(self.horizontalLayout_2, 1, 0, 1, 1)
+ self.gridLayout_30.addLayout(self.horizontalLayout_2, 1, 0, 1, 1)
+ self.horizontalLayout_5 = QtGui.QHBoxLayout()
+ self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5"))
+ self.verticalLayout = QtGui.QVBoxLayout()
+ self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.button_cylinder_axis = QtGui.QPushButton(self.Axis_Tab)
- icon16 = QtGui.QIcon()
- icon16.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_cylinderAxis.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_cylinder_axis.setIcon(icon16)
+ icon18 = QtGui.QIcon()
+ icon18.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_cylinderAxis.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_cylinder_axis.setIcon(icon18)
self.button_cylinder_axis.setIconSize(QtCore.QSize(32, 32))
self.button_cylinder_axis.setObjectName(_fromUtf8("button_cylinder_axis"))
- self.gridLayout.addWidget(self.button_cylinder_axis, 2, 0, 1, 1)
- self.button_object_base_axes = QtGui.QPushButton(self.Axis_Tab)
- icon17 = QtGui.QIcon()
- icon17.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_baseObjectsAxes.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_object_base_axes.setIcon(icon17)
- self.button_object_base_axes.setIconSize(QtCore.QSize(32, 32))
- self.button_object_base_axes.setObjectName(_fromUtf8("button_object_base_axes"))
- self.gridLayout.addWidget(self.button_object_base_axes, 11, 0, 1, 1)
+ self.verticalLayout.addWidget(self.button_cylinder_axis)
+ self.button_plane_axis = QtGui.QPushButton(self.Axis_Tab)
+ self.button_plane_axis.setMaximumSize(QtCore.QSize(16777215, 16777215))
+ icon19 = QtGui.QIcon()
+ icon19.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_FaceAxis.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_plane_axis.setIcon(icon19)
+ self.button_plane_axis.setIconSize(QtCore.QSize(32, 32))
+ self.button_plane_axis.setObjectName(_fromUtf8("button_plane_axis"))
+ self.verticalLayout.addWidget(self.button_plane_axis)
+ self.button_face_normal = QtGui.QPushButton(self.Axis_Tab)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.button_face_normal.sizePolicy().hasHeightForWidth())
+ self.button_face_normal.setSizePolicy(sizePolicy)
+ self.button_face_normal.setMaximumSize(QtCore.QSize(16777215, 16777215))
+ icon20 = QtGui.QIcon()
+ icon20.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_FaceNormal.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_face_normal.setIcon(icon20)
+ self.button_face_normal.setIconSize(QtCore.QSize(32, 32))
+ self.button_face_normal.setObjectName(_fromUtf8("button_face_normal"))
+ self.verticalLayout.addWidget(self.button_face_normal)
+ self.horizontalLayout_5.addLayout(self.verticalLayout)
+ self.frame_4 = QtGui.QFrame(self.Axis_Tab)
+ self.frame_4.setFrameShape(QtGui.QFrame.StyledPanel)
+ self.frame_4.setFrameShadow(QtGui.QFrame.Raised)
+ self.frame_4.setObjectName(_fromUtf8("frame_4"))
+ self.gridLayout = QtGui.QGridLayout(self.frame_4)
+ self.gridLayout.setContentsMargins(0, -1, 1, -1)
+ self.gridLayout.setHorizontalSpacing(0)
+ self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
+ self.extension_face_normal = QtGui.QLineEdit(self.frame_4)
+ self.extension_face_normal.setMinimumSize(QtCore.QSize(40, 0))
+ self.extension_face_normal.setMaximumSize(QtCore.QSize(40, 16777215))
+ self.extension_face_normal.setObjectName(_fromUtf8("extension_face_normal"))
+ self.gridLayout.addWidget(self.extension_face_normal, 0, 0, 1, 1)
+ self.horizontalLayout_5.addWidget(self.frame_4)
+ self.gridLayout_30.addLayout(self.horizontalLayout_5, 2, 0, 1, 1)
+ self.horizontalLayout_20 = QtGui.QHBoxLayout()
+ self.horizontalLayout_20.setObjectName(_fromUtf8("horizontalLayout_20"))
self.button_point_line_axis = QtGui.QPushButton(self.Axis_Tab)
- icon18 = QtGui.QIcon()
- icon18.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_pointLineAxis.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_point_line_axis.setIcon(icon18)
+ icon21 = QtGui.QIcon()
+ icon21.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_pointLineAxis.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_point_line_axis.setIcon(icon21)
self.button_point_line_axis.setIconSize(QtCore.QSize(32, 32))
self.button_point_line_axis.setObjectName(_fromUtf8("button_point_line_axis"))
- self.gridLayout.addWidget(self.button_point_line_axis, 6, 0, 1, 1)
+ self.horizontalLayout_20.addWidget(self.button_point_line_axis)
+ self.point_loc_comboBox = QtGui.QComboBox(self.Axis_Tab)
+ self.point_loc_comboBox.setMaximumSize(QtCore.QSize(60, 16777215))
+ self.point_loc_comboBox.setObjectName(_fromUtf8("point_loc_comboBox"))
+ self.point_loc_comboBox.addItem(_fromUtf8(""))
+ self.point_loc_comboBox.addItem(_fromUtf8(""))
+ self.point_loc_comboBox.addItem(_fromUtf8(""))
+ self.horizontalLayout_20.addWidget(self.point_loc_comboBox)
+ self.gridLayout_30.addLayout(self.horizontalLayout_20, 3, 0, 1, 1)
self.horizontalLayout_7 = QtGui.QHBoxLayout()
self.horizontalLayout_7.setObjectName(_fromUtf8("horizontalLayout_7"))
self.button_line_point_axis = QtGui.QPushButton(self.Axis_Tab)
@@ -245,109 +324,109 @@ class Ui_Form(object):
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.button_line_point_axis.sizePolicy().hasHeightForWidth())
self.button_line_point_axis.setSizePolicy(sizePolicy)
- icon19 = QtGui.QIcon()
- icon19.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_linePointAxis.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_line_point_axis.setIcon(icon19)
+ icon22 = QtGui.QIcon()
+ icon22.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_linePointAxis.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_line_point_axis.setIcon(icon22)
self.button_line_point_axis.setIconSize(QtCore.QSize(32, 32))
self.button_line_point_axis.setObjectName(_fromUtf8("button_line_point_axis"))
self.horizontalLayout_7.addWidget(self.button_line_point_axis)
self.extension_line_point_axis = QtGui.QLineEdit(self.Axis_Tab)
- self.extension_line_point_axis.setMaximumSize(QtCore.QSize(60, 16777215))
+ self.extension_line_point_axis.setMaximumSize(QtCore.QSize(40, 16777215))
self.extension_line_point_axis.setObjectName(_fromUtf8("extension_line_point_axis"))
self.horizontalLayout_7.addWidget(self.extension_line_point_axis)
- self.gridLayout.addLayout(self.horizontalLayout_7, 7, 0, 1, 1)
- self.horizontalLayout_5 = QtGui.QHBoxLayout()
- self.horizontalLayout_5.setSpacing(5)
- self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5"))
- self.button_face_normal = QtGui.QPushButton(self.Axis_Tab)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.button_face_normal.sizePolicy().hasHeightForWidth())
- self.button_face_normal.setSizePolicy(sizePolicy)
- icon20 = QtGui.QIcon()
- icon20.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_FaceNormal.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_face_normal.setIcon(icon20)
- self.button_face_normal.setIconSize(QtCore.QSize(32, 32))
- self.button_face_normal.setObjectName(_fromUtf8("button_face_normal"))
- self.horizontalLayout_5.addWidget(self.button_face_normal)
- self.extension_face_normal = QtGui.QLineEdit(self.Axis_Tab)
- self.extension_face_normal.setMinimumSize(QtCore.QSize(40, 0))
- self.extension_face_normal.setMaximumSize(QtCore.QSize(60, 16777215))
- self.extension_face_normal.setObjectName(_fromUtf8("extension_face_normal"))
- self.horizontalLayout_5.addWidget(self.extension_face_normal)
- self.gridLayout.addLayout(self.horizontalLayout_5, 5, 0, 1, 1)
+ self.gridLayout_30.addLayout(self.horizontalLayout_7, 4, 0, 1, 1)
self.button_twolines_axis = QtGui.QPushButton(self.Axis_Tab)
- icon21 = QtGui.QIcon()
- icon21.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_twoLinesAxis.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_twolines_axis.setIcon(icon21)
+ icon23 = QtGui.QIcon()
+ icon23.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_twoLinesAxis.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_twolines_axis.setIcon(icon23)
self.button_twolines_axis.setIconSize(QtCore.QSize(32, 32))
self.button_twolines_axis.setObjectName(_fromUtf8("button_twolines_axis"))
- self.gridLayout.addWidget(self.button_twolines_axis, 3, 0, 1, 1)
- self.button_object_axis = QtGui.QPushButton(self.Axis_Tab)
- icon22 = QtGui.QIcon()
- icon22.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_centerObjectsAxes.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_object_axis.setIcon(icon22)
- self.button_object_axis.setIconSize(QtCore.QSize(32, 32))
- self.button_object_axis.setObjectName(_fromUtf8("button_object_axis"))
- self.gridLayout.addWidget(self.button_object_axis, 0, 0, 1, 1)
- self.button_twoplanes_axis = QtGui.QPushButton(self.Axis_Tab)
- icon23 = QtGui.QIcon()
- icon23.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_2PlanesAxis.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_twoplanes_axis.setIcon(icon23)
- self.button_twoplanes_axis.setIconSize(QtCore.QSize(32, 32))
- self.button_twoplanes_axis.setObjectName(_fromUtf8("button_twoplanes_axis"))
- self.gridLayout.addWidget(self.button_twoplanes_axis, 9, 0, 1, 1)
- self.button_plane_axis = QtGui.QPushButton(self.Axis_Tab)
+ self.gridLayout_30.addWidget(self.button_twolines_axis, 5, 0, 1, 1)
+ self.horizontalLayout_21 = QtGui.QHBoxLayout()
+ self.horizontalLayout_21.setObjectName(_fromUtf8("horizontalLayout_21"))
+ self.button_cut_axis = QtGui.QPushButton(self.Axis_Tab)
icon24 = QtGui.QIcon()
- icon24.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_FaceAxis.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_plane_axis.setIcon(icon24)
- self.button_plane_axis.setIconSize(QtCore.QSize(32, 32))
- self.button_plane_axis.setObjectName(_fromUtf8("button_plane_axis"))
- self.gridLayout.addWidget(self.button_plane_axis, 4, 0, 1, 1)
+ icon24.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_cutAxis.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_cut_axis.setIcon(icon24)
+ self.button_cut_axis.setIconSize(QtCore.QSize(32, 32))
+ self.button_cut_axis.setObjectName(_fromUtf8("button_cut_axis"))
+ self.horizontalLayout_21.addWidget(self.button_cut_axis)
+ self.spin_axis_cut = QtGui.QSpinBox(self.Axis_Tab)
+ self.spin_axis_cut.setMinimumSize(QtCore.QSize(40, 0))
+ self.spin_axis_cut.setMaximumSize(QtCore.QSize(50, 16777215))
+ self.spin_axis_cut.setMinimum(2)
+ self.spin_axis_cut.setMaximum(10)
+ self.spin_axis_cut.setSingleStep(1)
+ self.spin_axis_cut.setObjectName(_fromUtf8("spin_axis_cut"))
+ self.horizontalLayout_21.addWidget(self.spin_axis_cut)
+ self.gridLayout_30.addLayout(self.horizontalLayout_21, 6, 0, 1, 1)
self.button_line_plane_axis = QtGui.QPushButton(self.Axis_Tab)
icon25 = QtGui.QIcon()
icon25.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_linePlaneAxis.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.button_line_plane_axis.setIcon(icon25)
self.button_line_plane_axis.setIconSize(QtCore.QSize(32, 32))
self.button_line_plane_axis.setObjectName(_fromUtf8("button_line_plane_axis"))
- self.gridLayout.addWidget(self.button_line_plane_axis, 8, 0, 1, 1)
- spacerItem2 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.gridLayout.addItem(spacerItem2, 10, 0, 1, 1)
+ self.gridLayout_30.addWidget(self.button_line_plane_axis, 7, 0, 1, 1)
+ self.button_twoplanes_axis = QtGui.QPushButton(self.Axis_Tab)
icon26 = QtGui.QIcon()
- icon26.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_axis.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.tabWidget.addTab(self.Axis_Tab, icon26, _fromUtf8(""))
+ icon26.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_2PlanesAxis.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_twoplanes_axis.setIcon(icon26)
+ self.button_twoplanes_axis.setIconSize(QtCore.QSize(32, 32))
+ self.button_twoplanes_axis.setObjectName(_fromUtf8("button_twoplanes_axis"))
+ self.gridLayout_30.addWidget(self.button_twoplanes_axis, 8, 0, 1, 1)
+ self.button_click_for_axis = QtGui.QRadioButton(self.Axis_Tab)
+ icon27 = QtGui.QIcon()
+ icon27.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_clickLine.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_click_for_axis.setIcon(icon27)
+ self.button_click_for_axis.setIconSize(QtCore.QSize(32, 32))
+ self.button_click_for_axis.setObjectName(_fromUtf8("button_click_for_axis"))
+ self.gridLayout_30.addWidget(self.button_click_for_axis, 9, 0, 1, 1)
+ self.button_object_base_axes = QtGui.QPushButton(self.Axis_Tab)
+ icon28 = QtGui.QIcon()
+ icon28.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_baseObjectsAxes.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_object_base_axes.setIcon(icon28)
+ self.button_object_base_axes.setIconSize(QtCore.QSize(32, 32))
+ self.button_object_base_axes.setObjectName(_fromUtf8("button_object_base_axes"))
+ self.gridLayout_30.addWidget(self.button_object_base_axes, 10, 0, 1, 1)
+ self.button_line_to_sketch = QtGui.QPushButton(self.Axis_Tab)
+ self.button_line_to_sketch.setIcon(icon14)
+ self.button_line_to_sketch.setIconSize(QtCore.QSize(32, 32))
+ self.button_line_to_sketch.setObjectName(_fromUtf8("button_line_to_sketch"))
+ self.gridLayout_30.addWidget(self.button_line_to_sketch, 11, 0, 1, 1)
+ icon29 = QtGui.QIcon()
+ icon29.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_axis.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.tabWidget.addTab(self.Axis_Tab, icon29, _fromUtf8(""))
self.tab_4 = QtGui.QWidget()
self.tab_4.setObjectName(_fromUtf8("tab_4"))
self.gridLayout_5 = QtGui.QGridLayout(self.tab_4)
self.gridLayout_5.setObjectName(_fromUtf8("gridLayout_5"))
self.button_3points_circle = QtGui.QPushButton(self.tab_4)
- icon27 = QtGui.QIcon()
- icon27.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_3pointsCircle.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_3points_circle.setIcon(icon27)
+ icon30 = QtGui.QIcon()
+ icon30.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_3pointsCircle.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_3points_circle.setIcon(icon30)
self.button_3points_circle.setIconSize(QtCore.QSize(32, 32))
self.button_3points_circle.setObjectName(_fromUtf8("button_3points_circle"))
self.gridLayout_5.addWidget(self.button_3points_circle, 2, 0, 1, 1)
self.button_3points_ellipse = QtGui.QPushButton(self.tab_4)
- icon28 = QtGui.QIcon()
- icon28.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_3pointsEllipse.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_3points_ellipse.setIcon(icon28)
+ icon31 = QtGui.QIcon()
+ icon31.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_3pointsEllipse.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_3points_ellipse.setIcon(icon31)
self.button_3points_ellipse.setIconSize(QtCore.QSize(32, 32))
self.button_3points_ellipse.setObjectName(_fromUtf8("button_3points_ellipse"))
self.gridLayout_5.addWidget(self.button_3points_ellipse, 3, 0, 1, 1)
self.button_linepoint_circle = QtGui.QPushButton(self.tab_4)
- icon29 = QtGui.QIcon()
- icon29.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_linePointCircle.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_linepoint_circle.setIcon(icon29)
+ icon32 = QtGui.QIcon()
+ icon32.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_linePointCircle.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_linepoint_circle.setIcon(icon32)
self.button_linepoint_circle.setIconSize(QtCore.QSize(32, 32))
self.button_linepoint_circle.setObjectName(_fromUtf8("button_linepoint_circle"))
self.gridLayout_5.addWidget(self.button_linepoint_circle, 1, 0, 1, 1)
self.horizontalLayout_11 = QtGui.QHBoxLayout()
self.horizontalLayout_11.setObjectName(_fromUtf8("horizontalLayout_11"))
self.button_linecenter_circle = QtGui.QPushButton(self.tab_4)
- icon30 = QtGui.QIcon()
- icon30.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_lineCenterCircle.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_linecenter_circle.setIcon(icon30)
+ icon33 = QtGui.QIcon()
+ icon33.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_lineCenterCircle.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_linecenter_circle.setIcon(icon33)
self.button_linecenter_circle.setIconSize(QtCore.QSize(32, 32))
self.button_linecenter_circle.setObjectName(_fromUtf8("button_linecenter_circle"))
self.horizontalLayout_11.addWidget(self.button_linecenter_circle)
@@ -357,21 +436,49 @@ class Ui_Form(object):
self.radius_circle.setObjectName(_fromUtf8("radius_circle"))
self.horizontalLayout_11.addWidget(self.radius_circle)
self.gridLayout_5.addLayout(self.horizontalLayout_11, 0, 0, 1, 1)
- spacerItem3 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.gridLayout_5.addItem(spacerItem3, 4, 0, 1, 1)
- icon31 = QtGui.QIcon()
- icon31.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_circle.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.tabWidget.addTab(self.tab_4, icon31, _fromUtf8(""))
+ spacerItem2 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ self.gridLayout_5.addItem(spacerItem2, 4, 0, 1, 1)
+ icon34 = QtGui.QIcon()
+ icon34.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_circle.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.tabWidget.addTab(self.tab_4, icon34, _fromUtf8(""))
self.Plane_Tab = QtGui.QWidget()
self.Plane_Tab.setObjectName(_fromUtf8("Plane_Tab"))
self.gridLayout_9 = QtGui.QGridLayout(self.Plane_Tab)
self.gridLayout_9.setObjectName(_fromUtf8("gridLayout_9"))
+ self.button_axis_point_plane = QtGui.QPushButton(self.Plane_Tab)
+ icon35 = QtGui.QIcon()
+ icon35.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_linePointPlane2.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_axis_point_plane.setIcon(icon35)
+ self.button_axis_point_plane.setIconSize(QtCore.QSize(32, 32))
+ self.button_axis_point_plane.setObjectName(_fromUtf8("button_axis_point_plane"))
+ self.gridLayout_9.addWidget(self.button_axis_point_plane, 2, 0, 1, 1)
+ self.button_axisandpoint_plane = QtGui.QPushButton(self.Plane_Tab)
+ icon36 = QtGui.QIcon()
+ icon36.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_linePointPlane.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_axisandpoint_plane.setIcon(icon36)
+ self.button_axisandpoint_plane.setIconSize(QtCore.QSize(32, 32))
+ self.button_axisandpoint_plane.setObjectName(_fromUtf8("button_axisandpoint_plane"))
+ self.gridLayout_9.addWidget(self.button_axisandpoint_plane, 1, 0, 1, 1)
+ self.button_object_center_planes = QtGui.QPushButton(self.Plane_Tab)
+ icon37 = QtGui.QIcon()
+ icon37.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_centerObjectsPlanes.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_object_center_planes.setIcon(icon37)
+ self.button_object_center_planes.setIconSize(QtCore.QSize(32, 32))
+ self.button_object_center_planes.setObjectName(_fromUtf8("button_object_center_planes"))
+ self.gridLayout_9.addWidget(self.button_object_center_planes, 9, 0, 1, 1)
+ self.button_threepoints_plane = QtGui.QPushButton(self.Plane_Tab)
+ icon38 = QtGui.QIcon()
+ icon38.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_threePointsPlane.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_threepoints_plane.setIcon(icon38)
+ self.button_threepoints_plane.setIconSize(QtCore.QSize(32, 32))
+ self.button_threepoints_plane.setObjectName(_fromUtf8("button_threepoints_plane"))
+ self.gridLayout_9.addWidget(self.button_threepoints_plane, 0, 0, 1, 1)
self.gridLayout_16 = QtGui.QGridLayout()
self.gridLayout_16.setObjectName(_fromUtf8("gridLayout_16"))
self.button_planeandpoint_plane = QtGui.QPushButton(self.Plane_Tab)
- icon32 = QtGui.QIcon()
- icon32.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_pointPlanePoint.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_planeandpoint_plane.setIcon(icon32)
+ icon39 = QtGui.QIcon()
+ icon39.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_pointPlanePoint.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_planeandpoint_plane.setIcon(icon39)
self.button_planeandpoint_plane.setIconSize(QtCore.QSize(32, 32))
self.button_planeandpoint_plane.setObjectName(_fromUtf8("button_planeandpoint_plane"))
self.gridLayout_16.addWidget(self.button_planeandpoint_plane, 0, 0, 1, 1)
@@ -381,89 +488,6 @@ class Ui_Form(object):
self.extension_planePointPlane.setObjectName(_fromUtf8("extension_planePointPlane"))
self.gridLayout_16.addWidget(self.extension_planePointPlane, 0, 1, 1, 1)
self.gridLayout_9.addLayout(self.gridLayout_16, 3, 0, 1, 1)
- spacerItem4 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.gridLayout_9.addItem(spacerItem4, 6, 0, 1, 1)
- self.button_axis_point_plane = QtGui.QPushButton(self.Plane_Tab)
- icon33 = QtGui.QIcon()
- icon33.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_linePointPlane2.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_axis_point_plane.setIcon(icon33)
- self.button_axis_point_plane.setIconSize(QtCore.QSize(32, 32))
- self.button_axis_point_plane.setObjectName(_fromUtf8("button_axis_point_plane"))
- self.gridLayout_9.addWidget(self.button_axis_point_plane, 2, 0, 1, 1)
- self.button_object_center_planes = QtGui.QPushButton(self.Plane_Tab)
- icon34 = QtGui.QIcon()
- icon34.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_centerObjectsPlanes.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_object_center_planes.setIcon(icon34)
- self.button_object_center_planes.setIconSize(QtCore.QSize(32, 32))
- self.button_object_center_planes.setObjectName(_fromUtf8("button_object_center_planes"))
- self.gridLayout_9.addWidget(self.button_object_center_planes, 9, 0, 1, 1)
- self.gridLayout_8 = QtGui.QGridLayout()
- self.gridLayout_8.setObjectName(_fromUtf8("gridLayout_8"))
- self.button_planeandaxis_plane = QtGui.QPushButton(self.Plane_Tab)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.button_planeandaxis_plane.sizePolicy().hasHeightForWidth())
- self.button_planeandaxis_plane.setSizePolicy(sizePolicy)
- icon35 = QtGui.QIcon()
- icon35.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_planeLinePlane.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_planeandaxis_plane.setIcon(icon35)
- self.button_planeandaxis_plane.setIconSize(QtCore.QSize(32, 32))
- self.button_planeandaxis_plane.setObjectName(_fromUtf8("button_planeandaxis_plane"))
- self.gridLayout_8.addWidget(self.button_planeandaxis_plane, 0, 0, 1, 1)
- self.angle_planeandaxis_plane = QtGui.QLineEdit(self.Plane_Tab)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.angle_planeandaxis_plane.sizePolicy().hasHeightForWidth())
- self.angle_planeandaxis_plane.setSizePolicy(sizePolicy)
- self.angle_planeandaxis_plane.setMinimumSize(QtCore.QSize(40, 0))
- self.angle_planeandaxis_plane.setMaximumSize(QtCore.QSize(60, 16777215))
- self.angle_planeandaxis_plane.setObjectName(_fromUtf8("angle_planeandaxis_plane"))
- self.gridLayout_8.addWidget(self.angle_planeandaxis_plane, 0, 1, 1, 1)
- self.gridLayout_9.addLayout(self.gridLayout_8, 4, 0, 1, 1)
- self.button_axisandpoint_plane = QtGui.QPushButton(self.Plane_Tab)
- icon36 = QtGui.QIcon()
- icon36.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_linePointPlane.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_axisandpoint_plane.setIcon(icon36)
- self.button_axisandpoint_plane.setIconSize(QtCore.QSize(32, 32))
- self.button_axisandpoint_plane.setObjectName(_fromUtf8("button_axisandpoint_plane"))
- self.gridLayout_9.addWidget(self.button_axisandpoint_plane, 1, 0, 1, 1)
- self.horizontalLayout_3 = QtGui.QHBoxLayout()
- self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
- self.button_click_for_plane = QtGui.QPushButton(self.Plane_Tab)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.button_click_for_plane.sizePolicy().hasHeightForWidth())
- self.button_click_for_plane.setSizePolicy(sizePolicy)
- icon37 = QtGui.QIcon()
- icon37.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_clickPlane.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_click_for_plane.setIcon(icon37)
- self.button_click_for_plane.setIconSize(QtCore.QSize(32, 32))
- self.button_click_for_plane.setObjectName(_fromUtf8("button_click_for_plane"))
- self.horizontalLayout_3.addWidget(self.button_click_for_plane)
- self.length_plane = QtGui.QLineEdit(self.Plane_Tab)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.length_plane.sizePolicy().hasHeightForWidth())
- self.length_plane.setSizePolicy(sizePolicy)
- self.length_plane.setMinimumSize(QtCore.QSize(40, 0))
- self.length_plane.setMaximumSize(QtCore.QSize(60, 16777215))
- self.length_plane.setObjectName(_fromUtf8("length_plane"))
- self.horizontalLayout_3.addWidget(self.length_plane)
- self.width_plane = QtGui.QLineEdit(self.Plane_Tab)
- sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
- sizePolicy.setHorizontalStretch(0)
- sizePolicy.setVerticalStretch(0)
- sizePolicy.setHeightForWidth(self.width_plane.sizePolicy().hasHeightForWidth())
- self.width_plane.setSizePolicy(sizePolicy)
- self.width_plane.setMinimumSize(QtCore.QSize(40, 0))
- self.width_plane.setMaximumSize(QtCore.QSize(60, 16777215))
- self.width_plane.setObjectName(_fromUtf8("width_plane"))
- self.horizontalLayout_3.addWidget(self.width_plane)
- self.gridLayout_9.addLayout(self.horizontalLayout_3, 7, 0, 1, 1)
self.horizontalLayout_12 = QtGui.QHBoxLayout()
self.horizontalLayout_12.setObjectName(_fromUtf8("horizontalLayout_12"))
self.button_face_tangent = QtGui.QPushButton(self.Plane_Tab)
@@ -472,9 +496,9 @@ class Ui_Form(object):
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.button_face_tangent.sizePolicy().hasHeightForWidth())
self.button_face_tangent.setSizePolicy(sizePolicy)
- icon38 = QtGui.QIcon()
- icon38.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_FaceTangent.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_face_tangent.setIcon(icon38)
+ icon40 = QtGui.QIcon()
+ icon40.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_FaceTangent.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_face_tangent.setIcon(icon40)
self.button_face_tangent.setIconSize(QtCore.QSize(32, 32))
self.button_face_tangent.setObjectName(_fromUtf8("button_face_tangent"))
self.horizontalLayout_12.addWidget(self.button_face_tangent)
@@ -499,18 +523,73 @@ class Ui_Form(object):
self.width_plane_2.setObjectName(_fromUtf8("width_plane_2"))
self.horizontalLayout_12.addWidget(self.width_plane_2)
self.gridLayout_9.addLayout(self.horizontalLayout_12, 5, 0, 1, 1)
- self.button_threepoints_plane = QtGui.QPushButton(self.Plane_Tab)
- icon39 = QtGui.QIcon()
- icon39.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_threePointsPlane.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_threepoints_plane.setIcon(icon39)
- self.button_threepoints_plane.setIconSize(QtCore.QSize(32, 32))
- self.button_threepoints_plane.setObjectName(_fromUtf8("button_threepoints_plane"))
- self.gridLayout_9.addWidget(self.button_threepoints_plane, 0, 0, 1, 1)
- spacerItem5 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.gridLayout_9.addItem(spacerItem5, 8, 0, 1, 1)
- icon40 = QtGui.QIcon()
- icon40.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_plane.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.tabWidget.addTab(self.Plane_Tab, icon40, _fromUtf8(""))
+ self.gridLayout_8 = QtGui.QGridLayout()
+ self.gridLayout_8.setObjectName(_fromUtf8("gridLayout_8"))
+ self.button_planeandaxis_plane = QtGui.QPushButton(self.Plane_Tab)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.button_planeandaxis_plane.sizePolicy().hasHeightForWidth())
+ self.button_planeandaxis_plane.setSizePolicy(sizePolicy)
+ icon41 = QtGui.QIcon()
+ icon41.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_planeLinePlane.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_planeandaxis_plane.setIcon(icon41)
+ self.button_planeandaxis_plane.setIconSize(QtCore.QSize(32, 32))
+ self.button_planeandaxis_plane.setObjectName(_fromUtf8("button_planeandaxis_plane"))
+ self.gridLayout_8.addWidget(self.button_planeandaxis_plane, 0, 0, 1, 1)
+ self.angle_planeandaxis_plane = QtGui.QLineEdit(self.Plane_Tab)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.angle_planeandaxis_plane.sizePolicy().hasHeightForWidth())
+ self.angle_planeandaxis_plane.setSizePolicy(sizePolicy)
+ self.angle_planeandaxis_plane.setMinimumSize(QtCore.QSize(40, 0))
+ self.angle_planeandaxis_plane.setMaximumSize(QtCore.QSize(60, 16777215))
+ self.angle_planeandaxis_plane.setObjectName(_fromUtf8("angle_planeandaxis_plane"))
+ self.gridLayout_8.addWidget(self.angle_planeandaxis_plane, 0, 1, 1, 1)
+ self.gridLayout_9.addLayout(self.gridLayout_8, 4, 0, 1, 1)
+ spacerItem3 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ self.gridLayout_9.addItem(spacerItem3, 8, 0, 1, 1)
+ self.horizontalLayout_3 = QtGui.QHBoxLayout()
+ self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
+ self.button_click_for_plane = QtGui.QPushButton(self.Plane_Tab)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.button_click_for_plane.sizePolicy().hasHeightForWidth())
+ self.button_click_for_plane.setSizePolicy(sizePolicy)
+ icon42 = QtGui.QIcon()
+ icon42.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_clickPlane.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_click_for_plane.setIcon(icon42)
+ self.button_click_for_plane.setIconSize(QtCore.QSize(32, 32))
+ self.button_click_for_plane.setObjectName(_fromUtf8("button_click_for_plane"))
+ self.horizontalLayout_3.addWidget(self.button_click_for_plane)
+ self.length_plane = QtGui.QLineEdit(self.Plane_Tab)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.length_plane.sizePolicy().hasHeightForWidth())
+ self.length_plane.setSizePolicy(sizePolicy)
+ self.length_plane.setMinimumSize(QtCore.QSize(40, 0))
+ self.length_plane.setMaximumSize(QtCore.QSize(60, 16777215))
+ self.length_plane.setObjectName(_fromUtf8("length_plane"))
+ self.horizontalLayout_3.addWidget(self.length_plane)
+ self.width_plane = QtGui.QLineEdit(self.Plane_Tab)
+ sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed)
+ sizePolicy.setHorizontalStretch(0)
+ sizePolicy.setVerticalStretch(0)
+ sizePolicy.setHeightForWidth(self.width_plane.sizePolicy().hasHeightForWidth())
+ self.width_plane.setSizePolicy(sizePolicy)
+ self.width_plane.setMinimumSize(QtCore.QSize(40, 0))
+ self.width_plane.setMaximumSize(QtCore.QSize(60, 16777215))
+ self.width_plane.setObjectName(_fromUtf8("width_plane"))
+ self.horizontalLayout_3.addWidget(self.width_plane)
+ self.gridLayout_9.addLayout(self.horizontalLayout_3, 7, 0, 1, 1)
+ spacerItem4 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ self.gridLayout_9.addItem(spacerItem4, 6, 0, 1, 1)
+ icon43 = QtGui.QIcon()
+ icon43.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_plane.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.tabWidget.addTab(self.Plane_Tab, icon43, _fromUtf8(""))
self.Objects_Tab2 = QtGui.QWidget()
self.Objects_Tab2.setEnabled(True)
self.Objects_Tab2.setMinimumSize(QtCore.QSize(0, 0))
@@ -520,9 +599,9 @@ class Ui_Form(object):
self.gridLayout_6 = QtGui.QGridLayout()
self.gridLayout_6.setObjectName(_fromUtf8("gridLayout_6"))
self.button_cylinder_create = QtGui.QPushButton(self.Objects_Tab2)
- icon41 = QtGui.QIcon()
- icon41.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_cylinder.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_cylinder_create.setIcon(icon41)
+ icon44 = QtGui.QIcon()
+ icon44.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_cylinder.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_cylinder_create.setIcon(icon44)
self.button_cylinder_create.setIconSize(QtCore.QSize(32, 32))
self.button_cylinder_create.setObjectName(_fromUtf8("button_cylinder_create"))
self.gridLayout_6.addWidget(self.button_cylinder_create, 0, 0, 1, 1)
@@ -550,9 +629,9 @@ class Ui_Form(object):
self.horizontalLayout_4 = QtGui.QHBoxLayout()
self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4"))
self.button_cube_create = QtGui.QPushButton(self.Objects_Tab2)
- icon42 = QtGui.QIcon()
- icon42.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_cube.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_cube_create.setIcon(icon42)
+ icon45 = QtGui.QIcon()
+ icon45.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_cube.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_cube_create.setIcon(icon45)
self.button_cube_create.setIconSize(QtCore.QSize(32, 32))
self.button_cube_create.setObjectName(_fromUtf8("button_cube_create"))
self.horizontalLayout_4.addWidget(self.button_cube_create)
@@ -578,18 +657,18 @@ class Ui_Form(object):
self.horizontalLayout_4.addWidget(self.height_cube)
self.gridLayout_12.addLayout(self.horizontalLayout_4, 4, 0, 1, 1)
self.button_boundingboxes = QtGui.QPushButton(self.Objects_Tab2)
- icon43 = QtGui.QIcon()
- icon43.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_boundingBoxes.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_boundingboxes.setIcon(icon43)
+ icon46 = QtGui.QIcon()
+ icon46.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_boundingBoxes.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_boundingboxes.setIcon(icon46)
self.button_boundingboxes.setIconSize(QtCore.QSize(32, 32))
self.button_boundingboxes.setObjectName(_fromUtf8("button_boundingboxes"))
self.gridLayout_12.addWidget(self.button_boundingboxes, 0, 0, 1, 1)
- spacerItem6 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.gridLayout_12.addItem(spacerItem6, 5, 0, 1, 1)
+ spacerItem5 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ self.gridLayout_12.addItem(spacerItem5, 5, 0, 1, 1)
self.button_boundingbox = QtGui.QPushButton(self.Objects_Tab2)
- icon44 = QtGui.QIcon()
- icon44.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_boundingBox.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_boundingbox.setIcon(icon44)
+ icon47 = QtGui.QIcon()
+ icon47.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_boundingBox.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_boundingbox.setIcon(icon47)
self.button_boundingbox.setIconSize(QtCore.QSize(32, 32))
self.button_boundingbox.setObjectName(_fromUtf8("button_boundingbox"))
self.gridLayout_12.addWidget(self.button_boundingbox, 1, 0, 1, 1)
@@ -601,9 +680,9 @@ class Ui_Form(object):
self.line.setFrameShadow(QtGui.QFrame.Sunken)
self.line.setObjectName(_fromUtf8("line"))
self.gridLayout_12.addWidget(self.line, 2, 0, 1, 1)
- icon45 = QtGui.QIcon()
- icon45.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_box.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.tabWidget.addTab(self.Objects_Tab2, icon45, _fromUtf8(""))
+ icon48 = QtGui.QIcon()
+ icon48.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_box.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.tabWidget.addTab(self.Objects_Tab2, icon48, _fromUtf8(""))
self.View_Tab = QtGui.QWidget()
self.View_Tab.setObjectName(_fromUtf8("View_Tab"))
self.gridLayout_13 = QtGui.QGridLayout(self.View_Tab)
@@ -614,36 +693,36 @@ class Ui_Form(object):
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.button_alignview.sizePolicy().hasHeightForWidth())
self.button_alignview.setSizePolicy(sizePolicy)
- icon46 = QtGui.QIcon()
- icon46.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_viewAlign.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.button_alignview.setIcon(icon46)
+ icon49 = QtGui.QIcon()
+ icon49.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_viewAlign.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_alignview.setIcon(icon49)
self.button_alignview.setIconSize(QtCore.QSize(32, 32))
self.button_alignview.setObjectName(_fromUtf8("button_alignview"))
self.gridLayout_13.addWidget(self.button_alignview, 0, 0, 1, 1)
- spacerItem7 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.gridLayout_13.addItem(spacerItem7, 1, 0, 1, 1)
- icon47 = QtGui.QIcon()
- icon47.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_view.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
- self.tabWidget.addTab(self.View_Tab, icon47, _fromUtf8(""))
+ spacerItem6 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ self.gridLayout_13.addItem(spacerItem6, 1, 0, 1, 1)
+ icon50 = QtGui.QIcon()
+ icon50.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_view.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.tabWidget.addTab(self.View_Tab, icon50, _fromUtf8(""))
self.Modif_Tab = QtGui.QWidget()
self.Modif_Tab.setObjectName(_fromUtf8("Modif_Tab"))
self.gridLayout_11 = QtGui.QGridLayout(self.Modif_Tab)
self.gridLayout_11.setObjectName(_fromUtf8("gridLayout_11"))
self.tabWidget_2 = QtGui.QTabWidget(self.Modif_Tab)
self.tabWidget_2.setObjectName(_fromUtf8("tabWidget_2"))
- self.tab_5 = QtGui.QWidget()
- self.tab_5.setObjectName(_fromUtf8("tab_5"))
- self.gridLayout_2 = QtGui.QGridLayout(self.tab_5)
+ self.cutting_tab = QtGui.QWidget()
+ self.cutting_tab.setObjectName(_fromUtf8("cutting_tab"))
+ self.gridLayout_2 = QtGui.QGridLayout(self.cutting_tab)
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
self.gridLayout_17 = QtGui.QGridLayout()
self.gridLayout_17.setObjectName(_fromUtf8("gridLayout_17"))
self.gridLayout_19 = QtGui.QGridLayout()
self.gridLayout_19.setObjectName(_fromUtf8("gridLayout_19"))
- self.label_angle = QtGui.QLabel(self.tab_5)
+ self.label_angle = QtGui.QLabel(self.cutting_tab)
self.label_angle.setMaximumSize(QtCore.QSize(70, 16777215))
self.label_angle.setObjectName(_fromUtf8("label_angle"))
self.gridLayout_19.addWidget(self.label_angle, 0, 0, 1, 1)
- self.angle_cut_object = QtGui.QLineEdit(self.tab_5)
+ self.angle_cut_object = QtGui.QLineEdit(self.cutting_tab)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
@@ -656,11 +735,11 @@ class Ui_Form(object):
self.gridLayout_17.addLayout(self.gridLayout_19, 0, 0, 1, 1)
self.gridLayout_20 = QtGui.QGridLayout()
self.gridLayout_20.setObjectName(_fromUtf8("gridLayout_20"))
- self.label_thickness = QtGui.QLabel(self.tab_5)
+ self.label_thickness = QtGui.QLabel(self.cutting_tab)
self.label_thickness.setMaximumSize(QtCore.QSize(70, 16777215))
self.label_thickness.setObjectName(_fromUtf8("label_thickness"))
self.gridLayout_20.addWidget(self.label_thickness, 0, 0, 1, 1)
- self.thickness_cut_object = QtGui.QLineEdit(self.tab_5)
+ self.thickness_cut_object = QtGui.QLineEdit(self.cutting_tab)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
@@ -672,14 +751,14 @@ class Ui_Form(object):
self.gridLayout_17.addLayout(self.gridLayout_20, 1, 0, 1, 1)
self.horizontalLayout_8 = QtGui.QHBoxLayout()
self.horizontalLayout_8.setObjectName(_fromUtf8("horizontalLayout_8"))
- self.button_cut_reset = QtGui.QPushButton(self.tab_5)
+ self.button_cut_reset = QtGui.QPushButton(self.cutting_tab)
self.button_cut_reset.setMinimumSize(QtCore.QSize(40, 0))
self.button_cut_reset.setMaximumSize(QtCore.QSize(60, 16777215))
self.button_cut_reset.setObjectName(_fromUtf8("button_cut_reset"))
self.horizontalLayout_8.addWidget(self.button_cut_reset)
- spacerItem8 = QtGui.QSpacerItem(18, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
- self.horizontalLayout_8.addItem(spacerItem8)
- self.button_cut_apply = QtGui.QPushButton(self.tab_5)
+ spacerItem7 = QtGui.QSpacerItem(18, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+ self.horizontalLayout_8.addItem(spacerItem7)
+ self.button_cut_apply = QtGui.QPushButton(self.cutting_tab)
self.button_cut_apply.setEnabled(False)
self.button_cut_apply.setMaximumSize(QtCore.QSize(50, 16777215))
self.button_cut_apply.setIconSize(QtCore.QSize(32, 32))
@@ -689,12 +768,12 @@ class Ui_Form(object):
self.gridLayout_2.addLayout(self.gridLayout_17, 1, 0, 1, 1)
self.gridLayout_18 = QtGui.QGridLayout()
self.gridLayout_18.setObjectName(_fromUtf8("gridLayout_18"))
- self.button_cut_select_object = QtGui.QPushButton(self.tab_5)
+ self.button_cut_select_object = QtGui.QPushButton(self.cutting_tab)
self.button_cut_select_object.setMinimumSize(QtCore.QSize(130, 31))
self.button_cut_select_object.setMaximumSize(QtCore.QSize(250, 40))
self.button_cut_select_object.setObjectName(_fromUtf8("button_cut_select_object"))
self.gridLayout_18.addWidget(self.button_cut_select_object, 0, 0, 1, 1)
- self.info_cut_select_object = QtGui.QLineEdit(self.tab_5)
+ self.info_cut_select_object = QtGui.QLineEdit(self.cutting_tab)
self.info_cut_select_object.setEnabled(False)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
@@ -704,13 +783,13 @@ class Ui_Form(object):
self.info_cut_select_object.setReadOnly(True)
self.info_cut_select_object.setObjectName(_fromUtf8("info_cut_select_object"))
self.gridLayout_18.addWidget(self.info_cut_select_object, 1, 0, 1, 1)
- self.button_cut_select_line = QtGui.QPushButton(self.tab_5)
+ self.button_cut_select_line = QtGui.QPushButton(self.cutting_tab)
self.button_cut_select_line.setEnabled(False)
self.button_cut_select_line.setMinimumSize(QtCore.QSize(130, 31))
self.button_cut_select_line.setMaximumSize(QtCore.QSize(250, 40))
self.button_cut_select_line.setObjectName(_fromUtf8("button_cut_select_line"))
self.gridLayout_18.addWidget(self.button_cut_select_line, 2, 0, 1, 1)
- self.info_cut_select_axis = QtGui.QLineEdit(self.tab_5)
+ self.info_cut_select_axis = QtGui.QLineEdit(self.cutting_tab)
self.info_cut_select_axis.setEnabled(False)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
@@ -720,13 +799,13 @@ class Ui_Form(object):
self.info_cut_select_axis.setReadOnly(True)
self.info_cut_select_axis.setObjectName(_fromUtf8("info_cut_select_axis"))
self.gridLayout_18.addWidget(self.info_cut_select_axis, 3, 0, 1, 1)
- self.button_cut_select_plane = QtGui.QPushButton(self.tab_5)
+ self.button_cut_select_plane = QtGui.QPushButton(self.cutting_tab)
self.button_cut_select_plane.setEnabled(False)
self.button_cut_select_plane.setMinimumSize(QtCore.QSize(130, 31))
self.button_cut_select_plane.setMaximumSize(QtCore.QSize(250, 40))
self.button_cut_select_plane.setObjectName(_fromUtf8("button_cut_select_plane"))
self.gridLayout_18.addWidget(self.button_cut_select_plane, 4, 0, 1, 1)
- self.info_cut_select_plane = QtGui.QLineEdit(self.tab_5)
+ self.info_cut_select_plane = QtGui.QLineEdit(self.cutting_tab)
self.info_cut_select_plane.setEnabled(False)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
sizePolicy.setHorizontalStretch(0)
@@ -737,49 +816,62 @@ class Ui_Form(object):
self.info_cut_select_plane.setObjectName(_fromUtf8("info_cut_select_plane"))
self.gridLayout_18.addWidget(self.info_cut_select_plane, 5, 0, 1, 1)
self.gridLayout_2.addLayout(self.gridLayout_18, 0, 0, 1, 1)
- spacerItem9 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.gridLayout_2.addItem(spacerItem9, 2, 0, 1, 1)
- self.tabWidget_2.addTab(self.tab_5, _fromUtf8(""))
+ spacerItem8 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ self.gridLayout_2.addItem(spacerItem8, 2, 0, 1, 1)
+ self.tabWidget_2.addTab(self.cutting_tab, _fromUtf8(""))
self.gridLayout_11.addWidget(self.tabWidget_2, 0, 0, 1, 1)
self.tabWidget.addTab(self.Modif_Tab, _fromUtf8(""))
- self.gridLayout_22.addWidget(self.tabWidget, 0, 0, 1, 1)
- self.tabWidget_0.addTab(self.tab_2, _fromUtf8(""))
self.tab_3 = QtGui.QWidget()
self.tab_3.setObjectName(_fromUtf8("tab_3"))
- self.gridLayout_14 = QtGui.QGridLayout(self.tab_3)
- self.gridLayout_14.setObjectName(_fromUtf8("gridLayout_14"))
- self.radioButton_verbose = QtGui.QRadioButton(self.tab_3)
- self.radioButton_verbose.setObjectName(_fromUtf8("radioButton_verbose"))
- self.gridLayout_14.addWidget(self.radioButton_verbose, 0, 0, 1, 1)
- spacerItem10 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
- self.gridLayout_14.addItem(spacerItem10, 1, 0, 1, 1)
- self.tabWidget_0.addTab(self.tab_3, _fromUtf8(""))
+ self.gridLayout_35 = QtGui.QGridLayout(self.tab_3)
+ self.gridLayout_35.setObjectName(_fromUtf8("gridLayout_35"))
+ self.button_isPerpendicular = QtGui.QPushButton(self.tab_3)
+ icon51 = QtGui.QIcon()
+ icon51.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_isPerpendicular.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_isPerpendicular.setIcon(icon51)
+ self.button_isPerpendicular.setIconSize(QtCore.QSize(32, 32))
+ self.button_isPerpendicular.setObjectName(_fromUtf8("button_isPerpendicular"))
+ self.gridLayout_35.addWidget(self.button_isPerpendicular, 1, 0, 1, 1)
+ self.button_isParallel = QtGui.QPushButton(self.tab_3)
+ icon52 = QtGui.QIcon()
+ icon52.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_isParallel.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_isParallel.setIcon(icon52)
+ self.button_isParallel.setIconSize(QtCore.QSize(32, 32))
+ self.button_isParallel.setObjectName(_fromUtf8("button_isParallel"))
+ self.gridLayout_35.addWidget(self.button_isParallel, 0, 0, 1, 1)
+ self.button_isCoplanar = QtGui.QPushButton(self.tab_3)
+ icon53 = QtGui.QIcon()
+ icon53.addPixmap(QtGui.QPixmap(_fromUtf8("icons:WF_isCoplanar.svg")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.button_isCoplanar.setIcon(icon53)
+ self.button_isCoplanar.setIconSize(QtCore.QSize(32, 32))
+ self.button_isCoplanar.setObjectName(_fromUtf8("button_isCoplanar"))
+ self.gridLayout_35.addWidget(self.button_isCoplanar, 2, 0, 1, 1)
+ spacerItem9 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ self.gridLayout_35.addItem(spacerItem9, 3, 0, 1, 1)
+ self.tabWidget.addTab(self.tab_3, _fromUtf8(""))
+ self.gridLayout_22.addWidget(self.tabWidget, 0, 1, 1, 1)
+ self.tabWidget_0.addTab(self.tab_2, _fromUtf8(""))
self.gridLayout_4.addWidget(self.tabWidget_0, 0, 0, 1, 1)
self.scrollArea.setWidget(self.scrollAreaWidgetContents_2)
- self.gridLayout_15.addWidget(self.scrollArea, 0, 0, 1, 1)
- self.horizontalLayout_9 = QtGui.QHBoxLayout()
- self.horizontalLayout_9.setObjectName(_fromUtf8("horizontalLayout_9"))
- self.button_WF_quit = QtGui.QPushButton(Form)
- self.button_WF_quit.setObjectName(_fromUtf8("button_WF_quit"))
- self.horizontalLayout_9.addWidget(self.button_WF_quit)
- spacerItem11 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
- self.horizontalLayout_9.addItem(spacerItem11)
- self.label_release = QtGui.QLabel(Form)
- self.label_release.setObjectName(_fromUtf8("label_release"))
- self.horizontalLayout_9.addWidget(self.label_release)
- self.gridLayout_15.addLayout(self.horizontalLayout_9, 1, 0, 1, 1)
+ self.gridLayout_32.addWidget(self.scrollArea, 0, 0, 1, 1)
self.retranslateUi(Form)
self.tabWidget_0.setCurrentIndex(0)
- self.tabWidget.setCurrentIndex(1)
+ self.tabWidget.setCurrentIndex(8)
+ self.point_loc_comboBox.setCurrentIndex(1)
self.tabWidget_2.setCurrentIndex(0)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
Form.setWindowTitle(QtGui.QApplication.translate("Form", "WorkFeature", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_WF_quit.setText(QtGui.QApplication.translate("Form", "Close", None, QtGui.QApplication.UnicodeUTF8))
+ self.label_release.setText(QtGui.QApplication.translate("Form", "2015", None, QtGui.QApplication.UnicodeUTF8))
self.button_origin.setToolTip(QtGui.QApplication.translate("Form", "Create at origin: a point and X,Y and Z axis and XZ,XY and YZ planes", None, QtGui.QApplication.UnicodeUTF8))
self.button_origin.setText(QtGui.QApplication.translate("Form", "Origin", None, QtGui.QApplication.UnicodeUTF8))
- self.tabWidget.setTabText(self.tabWidget.indexOf(self.Origin_Tab), QtGui.QApplication.translate("Form", "Origin", None, QtGui.QApplication.UnicodeUTF8))
+ self.groupBox_5.setTitle(QtGui.QApplication.translate("Form", "Preferences :", None, QtGui.QApplication.UnicodeUTF8))
+ self.radioButton_verbose.setToolTip(QtGui.QApplication.translate("Form", "Toggle here if you want a lot of information printed into report View.", None, QtGui.QApplication.UnicodeUTF8))
+ self.radioButton_verbose.setText(QtGui.QApplication.translate("Form", "Verbose", None, QtGui.QApplication.UnicodeUTF8))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.Origin_Tab), QtGui.QApplication.translate("Form", "Ori. Pref.", None, QtGui.QApplication.UnicodeUTF8))
self.button_object_center.setToolTip(QtGui.QApplication.translate("Form", "Create a Point at center location of all selected Object(s).\n"
" if BBox is not toggled\n"
" This point is the MEAN location of all center of Mass (if exist) of all objects.\n"
@@ -793,10 +885,10 @@ class Ui_Form(object):
self.button_Npoints_center.setToolTip(QtGui.QApplication.translate("Form", "Create a Point at mean location of all selected points.", None, QtGui.QApplication.UnicodeUTF8))
self.button_Npoints_center.setText(QtGui.QApplication.translate("Form", "Points Center", None, QtGui.QApplication.UnicodeUTF8))
self.button_line_center.setToolTip(QtGui.QApplication.translate("Form", "Create Point(s):\n"
-"Cut each selected Lines(s) in 2 (n) parts and create a (n-1) Point(s) at ends of edge(s).\n"
-"The number indicates how many parts to consider.", None, QtGui.QApplication.UnicodeUTF8))
+"Cut each selected Line(s) in 2 (n) parts and create a (n-1) Point(s) at ends of edge(s).\n"
+"The number indicates how many parts to consider.", None, QtGui.QApplication.UnicodeUTF8))
self.button_line_center.setText(QtGui.QApplication.translate("Form", "Line(s) Center", None, QtGui.QApplication.UnicodeUTF8))
- self.spin_line_center.setToolTip(QtGui.QApplication.translate("Form", "The number indicates in how many parts each selected Lines(s) will be cut.", None, QtGui.QApplication.UnicodeUTF8))
+ self.spin_line_center.setToolTip(QtGui.QApplication.translate("Form", "The number indicates in how many parts each selected Lines(s) will be cut.", None, QtGui.QApplication.UnicodeUTF8))
self.button_line_extrema.setToolTip(QtGui.QApplication.translate("Form", "Create Points at start and end location of each selected Line(s).", None, QtGui.QApplication.UnicodeUTF8))
self.button_line_extrema.setText(QtGui.QApplication.translate("Form", "Line(s) Extrema", None, QtGui.QApplication.UnicodeUTF8))
self.button_circle_center.setToolTip(QtGui.QApplication.translate("Form", "Create a Point at center location of each selected Circle(s) or Arc(s).", None, QtGui.QApplication.UnicodeUTF8))
@@ -817,45 +909,73 @@ class Ui_Form(object):
self.button_twolines_point.setToolTip(QtGui.QApplication.translate("Form", "Plot one or two Point(s) at minimum distance of two Lines\n"
"Create a Point at intersection of 2 crossing Lines.", None, QtGui.QApplication.UnicodeUTF8))
self.button_twolines_point.setText(QtGui.QApplication.translate("Form", "Point=(Line,Line) ", None, QtGui.QApplication.UnicodeUTF8))
- self.button_click_for_point.setToolTip(QtGui.QApplication.translate("Form", "Create a Point on a Plane perpendicular to the view at location of one mouse click.\n"
-"Click first on the Button then click once on the View (with no object in background).\n"
-"Click first on the Button then click once on the View (with an object in background) will attach the point to the surface of the object.\n"
+ self.button_click_for_point.setToolTip(QtGui.QApplication.translate("Form", "Create a set of Points on a Plane perpendicular to the view at location of mouse clicks.\n"
+"- Click first on the Button then click on the View (with no object in background).\n"
+"- Click first on the Button then click on the View (with an object in background), it will attach the points to the surface of the object.\n"
"", None, QtGui.QApplication.UnicodeUTF8))
self.button_click_for_point.setText(QtGui.QApplication.translate("Form", "Click", None, QtGui.QApplication.UnicodeUTF8))
self.button_object_base_point.setToolTip(QtGui.QApplication.translate("Form", "Create Base Point of all selected Object(s).", None, QtGui.QApplication.UnicodeUTF8))
self.button_object_base_point.setText(QtGui.QApplication.translate("Form", "Object(s) Base Point", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_point_to_sketch.setToolTip(QtGui.QApplication.translate("Form", "Transform Point(s) in Sketch\'s Point(s) by projection onto the Sketch\'s Plane:\n"
+"- First select an existing Skecth;\n"
+"- Select as much as Points needed;\n"
+"Then click on this button.", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_point_to_sketch.setText(QtGui.QApplication.translate("Form", "Point(s) to Sketch", None, QtGui.QApplication.UnicodeUTF8))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.Point_Tab), QtGui.QApplication.translate("Form", "Point", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_object_axis.setToolTip(QtGui.QApplication.translate("Form", "Create 3 Axes at center location of all selected Object(s).", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_object_axis.setText(QtGui.QApplication.translate("Form", "Object(s) X, Y, Z Axes", None, QtGui.QApplication.UnicodeUTF8))
self.button_twopoints_axis.setToolTip(QtGui.QApplication.translate("Form", "Create an Axis crossing 2 Points.", None, QtGui.QApplication.UnicodeUTF8))
self.button_twopoints_axis.setText(QtGui.QApplication.translate("Form", "Two Points Axis", None, QtGui.QApplication.UnicodeUTF8))
self.extension_twopoints_axis.setToolTip(QtGui.QApplication.translate("Form", "Distance for the extensions on extrema", None, QtGui.QApplication.UnicodeUTF8))
self.extension_twopoints_axis.setText(QtGui.QApplication.translate("Form", "0.0", None, QtGui.QApplication.UnicodeUTF8))
self.button_cylinder_axis.setToolTip(QtGui.QApplication.translate("Form", "Create the Axis of a Cylinder.", None, QtGui.QApplication.UnicodeUTF8))
self.button_cylinder_axis.setText(QtGui.QApplication.translate("Form", "Cylinder(s) Axis", None, QtGui.QApplication.UnicodeUTF8))
- self.button_object_base_axes.setToolTip(QtGui.QApplication.translate("Form", "Create 3 Axes at Base location of all selected Object(s).", None, QtGui.QApplication.UnicodeUTF8))
- self.button_object_base_axes.setText(QtGui.QApplication.translate("Form", "Object(s) Base Axes", None, QtGui.QApplication.UnicodeUTF8))
- self.button_point_line_axis.setToolTip(QtGui.QApplication.translate("Form", "Create an Axis parallel to an Axis and crossing a Point.", None, QtGui.QApplication.UnicodeUTF8))
- self.button_point_line_axis.setText(QtGui.QApplication.translate("Form", "Axis=(Point,Axis)", None, QtGui.QApplication.UnicodeUTF8))
- self.button_line_point_axis.setToolTip(QtGui.QApplication.translate("Form", "Create an Axis perpendicular to an Axis and crossing a Point.", None, QtGui.QApplication.UnicodeUTF8))
- self.button_line_point_axis.setText(QtGui.QApplication.translate("Form", "Axis=(Axis,Point)", None, QtGui.QApplication.UnicodeUTF8))
- self.extension_line_point_axis.setToolTip(QtGui.QApplication.translate("Form", "Distance for the extensions on extrema.", None, QtGui.QApplication.UnicodeUTF8))
- self.extension_line_point_axis.setText(QtGui.QApplication.translate("Form", "0.0", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_plane_axis.setToolTip(QtGui.QApplication.translate("Form", "Create 2 Perpendicular Axes at center location of a Plane.", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_plane_axis.setText(QtGui.QApplication.translate("Form", "Plane(s) Axes", None, QtGui.QApplication.UnicodeUTF8))
self.button_face_normal.setToolTip(QtGui.QApplication.translate("Form", "Create a normal Axis at click location of a Face.\n"
"Click first in the view to select and object,\n"
"then push the button, \n"
"then click on a location on the selected object.", None, QtGui.QApplication.UnicodeUTF8))
self.button_face_normal.setText(QtGui.QApplication.translate("Form", "Face Normal", None, QtGui.QApplication.UnicodeUTF8))
- self.extension_face_normal.setToolTip(QtGui.QApplication.translate("Form", "Length of Normal Axis.", None, QtGui.QApplication.UnicodeUTF8))
- self.extension_face_normal.setText(QtGui.QApplication.translate("Form", "10.0", None, QtGui.QApplication.UnicodeUTF8))
+ self.extension_face_normal.setToolTip(QtGui.QApplication.translate("Form", "Length of external part of the (Normal) Axis.\n"
+" If zero In case of cylinder axis the extension will be a percentage of the object length.\n"
+" If zero and plane of face Normal, the extension will be 10 units.", None, QtGui.QApplication.UnicodeUTF8))
+ self.extension_face_normal.setText(QtGui.QApplication.translate("Form", "0.0", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_point_line_axis.setToolTip(QtGui.QApplication.translate("Form", "Create an Axis parallel to an Axis and crossing a Point.", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_point_line_axis.setText(QtGui.QApplication.translate("Form", "Axis=(Point,Axis)", None, QtGui.QApplication.UnicodeUTF8))
+ self.point_loc_comboBox.setToolTip(QtGui.QApplication.translate("Form", "The Point will be at :\n"
+"Start of the line;\n"
+"Mid of the line;\n"
+"End of the line.", None, QtGui.QApplication.UnicodeUTF8))
+ self.point_loc_comboBox.setItemText(0, QtGui.QApplication.translate("Form", "Start", None, QtGui.QApplication.UnicodeUTF8))
+ self.point_loc_comboBox.setItemText(1, QtGui.QApplication.translate("Form", "Mid", None, QtGui.QApplication.UnicodeUTF8))
+ self.point_loc_comboBox.setItemText(2, QtGui.QApplication.translate("Form", "End", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_line_point_axis.setToolTip(QtGui.QApplication.translate("Form", "Create an Axis perpendicular to an Axis and crossing a Point.", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_line_point_axis.setText(QtGui.QApplication.translate("Form", "Axis=(Axis,Point)", None, QtGui.QApplication.UnicodeUTF8))
+ self.extension_line_point_axis.setToolTip(QtGui.QApplication.translate("Form", "Distance for the extensions on extrema.", None, QtGui.QApplication.UnicodeUTF8))
+ self.extension_line_point_axis.setText(QtGui.QApplication.translate("Form", "0.0", None, QtGui.QApplication.UnicodeUTF8))
self.button_twolines_axis.setToolTip(QtGui.QApplication.translate("Form", "Create an Axis between 2 Axes.", None, QtGui.QApplication.UnicodeUTF8))
self.button_twolines_axis.setText(QtGui.QApplication.translate("Form", "Axis=(Line,Line)", None, QtGui.QApplication.UnicodeUTF8))
- self.button_object_axis.setToolTip(QtGui.QApplication.translate("Form", "Create 3 Axes at center location of all selected Object(s).", None, QtGui.QApplication.UnicodeUTF8))
- self.button_object_axis.setText(QtGui.QApplication.translate("Form", "Object(s) X, Y, Z Axes", None, QtGui.QApplication.UnicodeUTF8))
- self.button_twoplanes_axis.setToolTip(QtGui.QApplication.translate("Form", "Create an Axis by intersect of 2 Planes.", None, QtGui.QApplication.UnicodeUTF8))
- self.button_twoplanes_axis.setText(QtGui.QApplication.translate("Form", "Axis=(Plane,Plane)", None, QtGui.QApplication.UnicodeUTF8))
- self.button_plane_axis.setToolTip(QtGui.QApplication.translate("Form", "Create 2 Perpendicular Axes at center location of a Plane.", None, QtGui.QApplication.UnicodeUTF8))
- self.button_plane_axis.setText(QtGui.QApplication.translate("Form", "Plane(s) Axes", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_cut_axis.setToolTip(QtGui.QApplication.translate("Form", "Create Axes:\n"
+"Cut the selected Line in 2(n) parts and create 2(n) Axes.\n"
+"The number indicates in how many parts to cut.", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_cut_axis.setText(QtGui.QApplication.translate("Form", "Axes=Cut(Axis)", None, QtGui.QApplication.UnicodeUTF8))
+ self.spin_axis_cut.setToolTip(QtGui.QApplication.translate("Form", "The number indicates in how many parts the selected Line will be cut.", None, QtGui.QApplication.UnicodeUTF8))
self.button_line_plane_axis.setToolTip(QtGui.QApplication.translate("Form", "Create an Axis on a Plane by projection from anoher Axis.", None, QtGui.QApplication.UnicodeUTF8))
self.button_line_plane_axis.setText(QtGui.QApplication.translate("Form", "Axis=(Plane,Axis)", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_twoplanes_axis.setToolTip(QtGui.QApplication.translate("Form", "Create an Axis by intersect of 2 Planes.", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_twoplanes_axis.setText(QtGui.QApplication.translate("Form", "Axis=(Plane,Plane)", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_click_for_axis.setToolTip(QtGui.QApplication.translate("Form", "Create a set of Lines on a Plane perpendicular to the view at location of 2 mouse clicks.\n"
+"- Click first on the Button then at least twice click on the View (with no object in background).\n"
+"- Click first on the Button then at least twice click on the View (with an object in background), it will attach the lines to the surface of the object.", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_click_for_axis.setText(QtGui.QApplication.translate("Form", "Click", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_object_base_axes.setToolTip(QtGui.QApplication.translate("Form", "Create 3 Axes at Base location of all selected Object(s).", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_object_base_axes.setText(QtGui.QApplication.translate("Form", "Object(s) Base Axes", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_line_to_sketch.setToolTip(QtGui.QApplication.translate("Form", "Transform Line(s) in Sketch\'s Line(s) by projection onto the Sketch\'s Plane:\n"
+"- First select an existing Skecth;\n"
+"- Select as much as Lines needed;\n"
+"Then click on this button.", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_line_to_sketch.setText(QtGui.QApplication.translate("Form", "Axis(es) to Sketch", None, QtGui.QApplication.UnicodeUTF8))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.Axis_Tab), QtGui.QApplication.translate("Form", "Axis", None, QtGui.QApplication.UnicodeUTF8))
self.button_3points_circle.setToolTip(QtGui.QApplication.translate("Form", "Select 3 Points to create a Circle.", None, QtGui.QApplication.UnicodeUTF8))
self.button_3points_circle.setText(QtGui.QApplication.translate("Form", "Circle=(3 points)", None, QtGui.QApplication.UnicodeUTF8))
@@ -871,30 +991,18 @@ class Ui_Form(object):
self.radius_circle.setToolTip(QtGui.QApplication.translate("Form", "Radius of the Circle.", None, QtGui.QApplication.UnicodeUTF8))
self.radius_circle.setText(QtGui.QApplication.translate("Form", "10.0", None, QtGui.QApplication.UnicodeUTF8))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_4), QtGui.QApplication.translate("Form", "Circle", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_axis_point_plane.setToolTip(QtGui.QApplication.translate("Form", "Create a plane perpendicular to a Line and crossing a Point.", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_axis_point_plane.setText(QtGui.QApplication.translate("Form", "Plane=(Point, _|Axis)", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_axisandpoint_plane.setToolTip(QtGui.QApplication.translate("Form", "Create a plane crossing a Line and a Point.", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_axisandpoint_plane.setText(QtGui.QApplication.translate("Form", "Plane=(Point, Axis)", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_object_center_planes.setToolTip(QtGui.QApplication.translate("Form", "Create 3 Planes (XY, XZ and YZ) at center location of all selected Object(s).", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_object_center_planes.setText(QtGui.QApplication.translate("Form", "Object(s) Center Planes", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_threepoints_plane.setToolTip(QtGui.QApplication.translate("Form", "Create a Plane crossing 3 Points.", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_threepoints_plane.setText(QtGui.QApplication.translate("Form", "Three Points Plane", None, QtGui.QApplication.UnicodeUTF8))
self.button_planeandpoint_plane.setToolTip(QtGui.QApplication.translate("Form", "Create a plane crossing a Point and parallel to a Plane.", None, QtGui.QApplication.UnicodeUTF8))
self.button_planeandpoint_plane.setText(QtGui.QApplication.translate("Form", "Plane=(Point, Plane)", None, QtGui.QApplication.UnicodeUTF8))
self.extension_planePointPlane.setToolTip(QtGui.QApplication.translate("Form", "Distance for the extensions of the new Plane compared to initial one.", None, QtGui.QApplication.UnicodeUTF8))
self.extension_planePointPlane.setText(QtGui.QApplication.translate("Form", "0.0", None, QtGui.QApplication.UnicodeUTF8))
- self.button_axis_point_plane.setToolTip(QtGui.QApplication.translate("Form", "Create a plane perpendicular to a Line and crossing a Point.", None, QtGui.QApplication.UnicodeUTF8))
- self.button_axis_point_plane.setText(QtGui.QApplication.translate("Form", "Plane=(Point, _|Axis)", None, QtGui.QApplication.UnicodeUTF8))
- self.button_object_center_planes.setToolTip(QtGui.QApplication.translate("Form", "Create 3 Planes (XY, XZ and YZ) at center location of all selected Object(s).", None, QtGui.QApplication.UnicodeUTF8))
- self.button_object_center_planes.setText(QtGui.QApplication.translate("Form", "Object(s) Center Planes", None, QtGui.QApplication.UnicodeUTF8))
- self.button_planeandaxis_plane.setToolTip(QtGui.QApplication.translate("Form", "Create a Plane crossing a Line and perpendicular to a Plane.", None, QtGui.QApplication.UnicodeUTF8))
- self.button_planeandaxis_plane.setText(QtGui.QApplication.translate("Form", "Plane=(Plane, Axis)", None, QtGui.QApplication.UnicodeUTF8))
- self.angle_planeandaxis_plane.setToolTip(QtGui.QApplication.translate("Form", "Angle relative to the Plane (in degrees).", None, QtGui.QApplication.UnicodeUTF8))
- self.angle_planeandaxis_plane.setText(QtGui.QApplication.translate("Form", "0.0", None, QtGui.QApplication.UnicodeUTF8))
- self.button_axisandpoint_plane.setToolTip(QtGui.QApplication.translate("Form", "Create a plane crossing a Line and a Point.", None, QtGui.QApplication.UnicodeUTF8))
- self.button_axisandpoint_plane.setText(QtGui.QApplication.translate("Form", "Plane=(Point, Axis)", None, QtGui.QApplication.UnicodeUTF8))
- self.button_click_for_plane.setToolTip(QtGui.QApplication.translate("Form", "Create a Plane perpendicular to the view at location of one mouse click.\n"
-"Click first on the Button then click once on the View.\n"
-"Click first on the Button then click once on one object of the View\n"
-" to attach the plane at the object.\n"
-"But you can also select an already existing point first and click the button to attach the plane.", None, QtGui.QApplication.UnicodeUTF8))
- self.button_click_for_plane.setText(QtGui.QApplication.translate("Form", "Click", None, QtGui.QApplication.UnicodeUTF8))
- self.length_plane.setToolTip(QtGui.QApplication.translate("Form", "Length of the Plane.", None, QtGui.QApplication.UnicodeUTF8))
- self.length_plane.setText(QtGui.QApplication.translate("Form", "10.0", None, QtGui.QApplication.UnicodeUTF8))
- self.width_plane.setToolTip(QtGui.QApplication.translate("Form", "Width of the Plane.", None, QtGui.QApplication.UnicodeUTF8))
- self.width_plane.setText(QtGui.QApplication.translate("Form", "10.0", None, QtGui.QApplication.UnicodeUTF8))
self.button_face_tangent.setToolTip(QtGui.QApplication.translate("Form", "Create a tanget Plane at click location of a Face.\n"
"Click first in the view to select and object,\n"
"then push the button, \n"
@@ -904,40 +1012,58 @@ class Ui_Form(object):
self.length_plane_2.setText(QtGui.QApplication.translate("Form", "10.0", None, QtGui.QApplication.UnicodeUTF8))
self.width_plane_2.setToolTip(QtGui.QApplication.translate("Form", "Width of the Plane.", None, QtGui.QApplication.UnicodeUTF8))
self.width_plane_2.setText(QtGui.QApplication.translate("Form", "10.0", None, QtGui.QApplication.UnicodeUTF8))
- self.button_threepoints_plane.setToolTip(QtGui.QApplication.translate("Form", "Create a Plane crossing 3 Points.", None, QtGui.QApplication.UnicodeUTF8))
- self.button_threepoints_plane.setText(QtGui.QApplication.translate("Form", "Three Points Plane", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_planeandaxis_plane.setToolTip(QtGui.QApplication.translate("Form", "Create a Plane crossing a Line and perpendicular to a Plane.", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_planeandaxis_plane.setText(QtGui.QApplication.translate("Form", "Plane=(Plane, Axis)", None, QtGui.QApplication.UnicodeUTF8))
+ self.angle_planeandaxis_plane.setToolTip(QtGui.QApplication.translate("Form", "Angle relative to the Plane (in degrees).", None, QtGui.QApplication.UnicodeUTF8))
+ self.angle_planeandaxis_plane.setText(QtGui.QApplication.translate("Form", "0.0", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_click_for_plane.setToolTip(QtGui.QApplication.translate("Form", "Create a rectangular Plane perpendicular to the view at location of one mouse click.\n"
+"Define the width and the length of the Plane if needed.\n"
+"- Click first on the Button then click once on the View.\n"
+"- Click first on the Button then click once on top of one object of the View\n"
+" to attach the plane at the object.\n"
+"- You can also select an already existing point first and click the button to attach the plane.\n"
+"", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_click_for_plane.setText(QtGui.QApplication.translate("Form", "Click", None, QtGui.QApplication.UnicodeUTF8))
+ self.length_plane.setToolTip(QtGui.QApplication.translate("Form", "Length of the Plane.", None, QtGui.QApplication.UnicodeUTF8))
+ self.length_plane.setText(QtGui.QApplication.translate("Form", "10.0", None, QtGui.QApplication.UnicodeUTF8))
+ self.width_plane.setToolTip(QtGui.QApplication.translate("Form", "Width of the Plane.", None, QtGui.QApplication.UnicodeUTF8))
+ self.width_plane.setText(QtGui.QApplication.translate("Form", "10.0", None, QtGui.QApplication.UnicodeUTF8))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.Plane_Tab), QtGui.QApplication.translate("Form", "Plane", None, QtGui.QApplication.UnicodeUTF8))
- self.button_cylinder_create.setToolTip(QtGui.QApplication.translate("Form", "First select an Axis and a Point. \n"
-"Define Diameter and Length if needed.\n"
+ self.button_cylinder_create.setToolTip(QtGui.QApplication.translate("Form", "Create a Cylinder:\n"
+"- First select an Axis and a Ref. Point. \n"
+"- Define Diameter and Length if needed.\n"
"Then Click the button...\n"
"It will create a Cylinder aligned on the selected axis \n"
-"with one of the extremities at point selected.", None, QtGui.QApplication.UnicodeUTF8))
+"with one of the extremities at the Ref. point.", None, QtGui.QApplication.UnicodeUTF8))
self.button_cylinder_create.setText(QtGui.QApplication.translate("Form", "Cylinder", None, QtGui.QApplication.UnicodeUTF8))
self.diameter_cylinder.setToolTip(QtGui.QApplication.translate("Form", "Diameter of the Cylinder.", None, QtGui.QApplication.UnicodeUTF8))
self.diameter_cylinder.setText(QtGui.QApplication.translate("Form", "2.0", None, QtGui.QApplication.UnicodeUTF8))
- self.length_cylinder.setToolTip(QtGui.QApplication.translate("Form", "Length of the Cylinder.", None, QtGui.QApplication.UnicodeUTF8))
+ self.length_cylinder.setToolTip(QtGui.QApplication.translate("Form", "Length of the Cylinder.\n"
+"Negative value will reverse the direction from Ref. Point", None, QtGui.QApplication.UnicodeUTF8))
self.length_cylinder.setText(QtGui.QApplication.translate("Form", "20.0", None, QtGui.QApplication.UnicodeUTF8))
- self.button_cube_create.setToolTip(QtGui.QApplication.translate("Form", "First select an Axis and a Point. \n"
-"Define Dimensions if needed.\n"
+ self.button_cube_create.setToolTip(QtGui.QApplication.translate("Form", "Create a Cuboid:\n"
+"- First select an Axis and a Ref. Point. \n"
+"- Define Dimensions if needed.\n"
"Then Click the button...\n"
"It will create a Cube aligned on the selected axis \n"
-"with one of the extremities at point selected.", None, QtGui.QApplication.UnicodeUTF8))
+"with one of the extremities at Ref. point.", None, QtGui.QApplication.UnicodeUTF8))
self.button_cube_create.setText(QtGui.QApplication.translate("Form", "Cube", None, QtGui.QApplication.UnicodeUTF8))
self.section_cube.setToolTip(QtGui.QApplication.translate("Form", "Section (Length, Width) of the Cube.", None, QtGui.QApplication.UnicodeUTF8))
self.section_cube.setText(QtGui.QApplication.translate("Form", "2.0,2.0", None, QtGui.QApplication.UnicodeUTF8))
- self.height_cube.setToolTip(QtGui.QApplication.translate("Form", "Heigth of the Cube.", None, QtGui.QApplication.UnicodeUTF8))
+ self.height_cube.setToolTip(QtGui.QApplication.translate("Form", "Heigth of the Cube.\n"
+"Negative value will reverse the direction from Ref. Point", None, QtGui.QApplication.UnicodeUTF8))
self.height_cube.setText(QtGui.QApplication.translate("Form", "20.0", None, QtGui.QApplication.UnicodeUTF8))
self.button_boundingboxes.setToolTip(QtGui.QApplication.translate("Form", "Create bounding boxes around each of selected object(s).", None, QtGui.QApplication.UnicodeUTF8))
self.button_boundingboxes.setText(QtGui.QApplication.translate("Form", "Bounding Box(es)", None, QtGui.QApplication.UnicodeUTF8))
self.button_boundingbox.setToolTip(QtGui.QApplication.translate("Form", "Create one bounding box around all of selected object(s).", None, QtGui.QApplication.UnicodeUTF8))
self.button_boundingbox.setText(QtGui.QApplication.translate("Form", "Bounding Box", None, QtGui.QApplication.UnicodeUTF8))
- self.tabWidget.setTabText(self.tabWidget.indexOf(self.Objects_Tab2), QtGui.QApplication.translate("Form", "Objects", None, QtGui.QApplication.UnicodeUTF8))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.Objects_Tab2), QtGui.QApplication.translate("Form", "Object", None, QtGui.QApplication.UnicodeUTF8))
self.button_alignview.setToolTip(QtGui.QApplication.translate("Form", "Set the current view perpendicular to the selected Face, \n"
"or aligned to the selected Axis, \n"
"or aligned on 2 Points.\n"
"ReClick with same selection, will reverse the direction.", None, QtGui.QApplication.UnicodeUTF8))
- self.button_alignview.setText(QtGui.QApplication.translate("Form", "Align to ...", None, QtGui.QApplication.UnicodeUTF8))
- self.tabWidget.setTabText(self.tabWidget.indexOf(self.View_Tab), QtGui.QApplication.translate("Form", "Views", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_alignview.setText(QtGui.QApplication.translate("Form", "Align View to ...", None, QtGui.QApplication.UnicodeUTF8))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.View_Tab), QtGui.QApplication.translate("Form", "View", None, QtGui.QApplication.UnicodeUTF8))
self.label_angle.setText(QtGui.QApplication.translate("Form", "Angle", None, QtGui.QApplication.UnicodeUTF8))
self.angle_cut_object.setToolTip(QtGui.QApplication.translate("Form", "Angle of cutting relative to the Reference Plane (in degrees).", None, QtGui.QApplication.UnicodeUTF8))
self.angle_cut_object.setText(QtGui.QApplication.translate("Form", "0.0", None, QtGui.QApplication.UnicodeUTF8))
@@ -960,12 +1086,20 @@ class Ui_Form(object):
"and push this button to accept...\n"
"(Note that the Angle is calculated from this Plane)", None, QtGui.QApplication.UnicodeUTF8))
self.button_cut_select_plane.setText(QtGui.QApplication.translate("Form", "Select Ref. Plane", None, QtGui.QApplication.UnicodeUTF8))
- self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.tab_5), QtGui.QApplication.translate("Form", "Cutting", None, QtGui.QApplication.UnicodeUTF8))
+ self.tabWidget_2.setTabText(self.tabWidget_2.indexOf(self.cutting_tab), QtGui.QApplication.translate("Form", "Cutting", None, QtGui.QApplication.UnicodeUTF8))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.Modif_Tab), QtGui.QApplication.translate("Form", "Modif.", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_isPerpendicular.setToolTip(QtGui.QApplication.translate("Form", "Check if two faces are Perpendicular:\n"
+"- Select the 2 faces/planes and\n"
+"Click this button", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_isPerpendicular.setText(QtGui.QApplication.translate("Form", "Faces Perpendicular", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_isParallel.setToolTip(QtGui.QApplication.translate("Form", "Check if two faces are Parallel:\n"
+"- Select the 2 faces/planes and\n"
+"Click this button", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_isParallel.setText(QtGui.QApplication.translate("Form", "Faces Parallel", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_isCoplanar.setToolTip(QtGui.QApplication.translate("Form", "Check if two faces are Coplanar:\n"
+"- Select the 2 faces/planes and\n"
+"Click this button", None, QtGui.QApplication.UnicodeUTF8))
+ self.button_isCoplanar.setText(QtGui.QApplication.translate("Form", "Faces Coplanar", None, QtGui.QApplication.UnicodeUTF8))
+ self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), QtGui.QApplication.translate("Form", "Check", None, QtGui.QApplication.UnicodeUTF8))
self.tabWidget_0.setTabText(self.tabWidget_0.indexOf(self.tab_2), QtGui.QApplication.translate("Form", "W. F.", None, QtGui.QApplication.UnicodeUTF8))
- self.radioButton_verbose.setToolTip(QtGui.QApplication.translate("Form", "Toggle here if you want a lot of information printed into report View.", None, QtGui.QApplication.UnicodeUTF8))
- self.radioButton_verbose.setText(QtGui.QApplication.translate("Form", "Verbose", None, QtGui.QApplication.UnicodeUTF8))
- self.tabWidget_0.setTabText(self.tabWidget_0.indexOf(self.tab_3), QtGui.QApplication.translate("Form", "Pref.", None, QtGui.QApplication.UnicodeUTF8))
- self.button_WF_quit.setText(QtGui.QApplication.translate("Form", "Close", None, QtGui.QApplication.UnicodeUTF8))
- self.label_release.setText(QtGui.QApplication.translate("Form", "2015", None, QtGui.QApplication.UnicodeUTF8))
diff --git a/WorkFeature/WFGui_2015.ui b/WorkFeature/WFGui_2015.ui
index f398812..1436d16 100644
--- a/WorkFeature/WFGui_2015.ui
+++ b/WorkFeature/WFGui_2015.ui
@@ -6,8 +6,8 @@
0
0
- 376
- 742
+ 386
+ 767
@@ -17,7 +17,38 @@
Icons/WF_Axes.svgIcons/WF_Axes.svg
-
+
+ -
+
+
-
+
+
+ Close
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+ -
+
+
+ 2015
+
+
+
+
+
-
@@ -27,9 +58,9 @@
0
- -35
- 340
- 722
+ 0
+ 350
+ 765
@@ -46,13 +77,13 @@
W. F.
-
-
+
-
QTabWidget::West
- 1
+ 8
@@ -60,45 +91,72 @@
Icons/WF_Axes.svgIcons/WF_Axes.svg
- Origin
+ Ori. Pref.
-
+
-
-
-
-
-
-
- Create at origin: a point and X,Y and Z axis and XZ,XY and YZ planes
-
-
- Origin
-
-
-
- Icons/WF_Axes.svgIcons/WF_Axes.svg
-
-
-
- 32
- 32
-
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
+
+
+ Create at origin: a point and X,Y and Z axis and XZ,XY and YZ planes
+
+
+ Origin
+
+
+
+ Icons/WF_Axes.svgIcons/WF_Axes.svg
+
+
+
+ 32
+ 32
+
+
+
+
+ -
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Raised
+
+
+
-
+
+
+ Preferences :
+
+
+
-
+
+
+ Toggle here if you want a lot of information printed into report View.
+
+
+ Verbose
+
+
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 539
+
+
+
@@ -175,8 +233,8 @@
Create Point(s):
-Cut each selected Lines(s) in 2 (n) parts and create a (n-1) Point(s) at ends of edge(s).
-The number indicates how many parts to consider.
+Cut each selected Line(s) in 2 (n) parts and create a (n-1) Point(s) at ends of edge(s).
+The number indicates how many parts to consider.
Line(s) Center
@@ -208,7 +266,7 @@ The number indicates how many parts to consider.
- The number indicates in how many parts each selected Lines(s) will be cut.
+ The number indicates in how many parts each selected Lines(s) will be cut.
2
@@ -427,11 +485,11 @@ Create a Point at intersection of 2 crossing Lines.
-
-
+
- Create a Point on a Plane perpendicular to the view at location of one mouse click.
-Click first on the Button then click once on the View (with no object in background).
-Click first on the Button then click once on the View (with an object in background) will attach the point to the surface of the object.
+ Create a set of Points on a Plane perpendicular to the view at location of mouse clicks.
+- Click first on the Button then click on the View (with no object in background).
+- Click first on the Button then click on the View (with an object in background), it will attach the points to the surface of the object.
@@ -448,7 +506,7 @@ Click first on the Button then click once on the View (with an object in backgro
- false
+ true
@@ -473,20 +531,29 @@ Click first on the Button then click once on the View (with an object in backgro
-
-
-
- Qt::Vertical
+
+
+ Transform Point(s) in Sketch's Point(s) by projection onto the Sketch's Plane:
+- First select an existing Skecth;
+- Select as much as Points needed;
+Then click on this button.
-
+
+ Point(s) to Sketch
+
+
+
+ ../Icons/WF_2Sketch.svg../Icons/WF_2Sketch.svg
+
+
- 20
- 40
+ 32
+ 32
-
+
- button_object_center
button_line_extrema
button_circle_center
button_face_center
@@ -497,8 +564,7 @@ Click first on the Button then click once on the View (with an object in backgro
button_click_for_point
button_object_base_point
button_Npoints_center
- verticalSpacer_2
- checkBox_object_center
+ button_point_to_sketch
@@ -508,7 +574,27 @@ Click first on the Button then click once on the View (with an object in backgro
Axis
-
+
+ -
+
+
+ Create 3 Axes at center location of all selected Object(s).
+
+
+ Object(s) X, Y, Z Axes
+
+
+
+ Icons/WF_centerObjectsAxes.svgIcons/WF_centerObjectsAxes.svg
+
+
+
+ 32
+ 32
+
+
+
+
-
-
@@ -541,7 +627,7 @@ Click first on the Button then click once on the View (with an object in backgro
- 60
+ 40
16777215
@@ -556,66 +642,198 @@ Click first on the Button then click once on the View (with an object in backgro
-
-
-
- Create the Axis of a Cylinder.
-
-
- Cylinder(s) Axis
-
-
-
- Icons/WF_cylinderAxis.svgIcons/WF_cylinderAxis.svg
-
-
-
- 32
- 32
-
-
-
+
+
-
+
+
-
+
+
+ Create the Axis of a Cylinder.
+
+
+ Cylinder(s) Axis
+
+
+
+ Icons/WF_cylinderAxis.svgIcons/WF_cylinderAxis.svg
+
+
+
+ 32
+ 32
+
+
+
+
+ -
+
+
+
+ 16777215
+ 16777215
+
+
+
+ Create 2 Perpendicular Axes at center location of a Plane.
+
+
+ Plane(s) Axes
+
+
+
+ Icons/WF_FaceAxis.svgIcons/WF_FaceAxis.svg
+
+
+
+ 32
+ 32
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 16777215
+ 16777215
+
+
+
+ Create a normal Axis at click location of a Face.
+Click first in the view to select and object,
+then push the button,
+then click on a location on the selected object.
+
+
+ Face Normal
+
+
+
+ Icons/WF_FaceNormal.svgIcons/WF_FaceNormal.svg
+
+
+
+ 32
+ 32
+
+
+
+
+
+
+ -
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Raised
+
+
+
+ 0
+
+
+ 1
+
+
+ 0
+
+
-
+
+
+
+ 40
+ 0
+
+
+
+
+ 40
+ 16777215
+
+
+
+ Length of external part of the (Normal) Axis.
+ If zero In case of cylinder axis the extension will be a percentage of the object length.
+ If zero and plane of face Normal, the extension will be 10 units.
+
+
+ 0.0
+
+
+
+
+
+
+
- -
-
-
- Create 3 Axes at Base location of all selected Object(s).
-
-
- Object(s) Base Axes
-
-
-
- Icons/WF_baseObjectsAxes.svgIcons/WF_baseObjectsAxes.svg
-
-
-
- 32
- 32
-
-
-
+
-
+
+
-
+
+
+ Create an Axis parallel to an Axis and crossing a Point.
+
+
+ Axis=(Point,Axis)
+
+
+
+ Icons/WF_pointLineAxis.svgIcons/WF_pointLineAxis.svg
+
+
+
+ 32
+ 32
+
+
+
+
+ -
+
+
+
+ 60
+ 16777215
+
+
+
+ The Point will be at :
+Start of the line;
+Mid of the line;
+End of the line.
+
+
+ 1
+
+
-
+
+ Start
+
+
+ -
+
+ Mid
+
+
+ -
+
+ End
+
+
+
+
+
- -
-
-
- Create an Axis parallel to an Axis and crossing a Point.
-
-
- Axis=(Point,Axis)
-
-
-
- Icons/WF_pointLineAxis.svgIcons/WF_pointLineAxis.svg
-
-
-
- 32
- 32
-
-
-
-
- -
+
-
-
@@ -647,7 +865,7 @@ Click first on the Button then click once on the View (with an object in backgro
- 60
+ 40
16777215
@@ -662,64 +880,6 @@ Click first on the Button then click once on the View (with an object in backgro
-
-
-
- 5
-
-
-
-
-
-
- 0
- 0
-
-
-
- Create a normal Axis at click location of a Face.
-Click first in the view to select and object,
-then push the button,
-then click on a location on the selected object.
-
-
- Face Normal
-
-
-
- Icons/WF_FaceNormal.svgIcons/WF_FaceNormal.svg
-
-
-
- 32
- 32
-
-
-
-
- -
-
-
-
- 40
- 0
-
-
-
-
- 60
- 16777215
-
-
-
- Length of Normal Axis.
-
-
- 10.0
-
-
-
-
-
- -
Create an Axis between 2 Axes.
@@ -739,67 +899,61 @@ then click on a location on the selected object.
- -
-
-
- Create 3 Axes at center location of all selected Object(s).
-
-
- Object(s) X, Y, Z Axes
-
-
-
- Icons/WF_centerObjectsAxes.svgIcons/WF_centerObjectsAxes.svg
-
-
-
- 32
- 32
-
-
-
+
-
+
+
-
+
+
+ Create Axes:
+Cut the selected Line in 2(n) parts and create 2(n) Axes.
+The number indicates in how many parts to cut.
+
+
+ Axes=Cut(Axis)
+
+
+
+ ../Icons/WF_cutAxis.svg../Icons/WF_cutAxis.svg
+
+
+
+ 32
+ 32
+
+
+
+
+ -
+
+
+
+ 40
+ 0
+
+
+
+
+ 50
+ 16777215
+
+
+
+ The number indicates in how many parts the selected Line will be cut.
+
+
+ 2
+
+
+ 10
+
+
+ 1
+
+
+
+
- -
-
-
- Create an Axis by intersect of 2 Planes.
-
-
- Axis=(Plane,Plane)
-
-
-
- Icons/WF_2PlanesAxis.svgIcons/WF_2PlanesAxis.svg
-
-
-
- 32
- 32
-
-
-
-
- -
-
-
- Create 2 Perpendicular Axes at center location of a Plane.
-
-
- Plane(s) Axes
-
-
-
- Icons/WF_FaceAxis.svgIcons/WF_FaceAxis.svg
-
-
-
- 32
- 32
-
-
-
-
- -
+
-
Create an Axis on a Plane by projection from anoher Axis.
@@ -819,18 +973,90 @@ then click on a location on the selected object.
- -
-
-
- Qt::Vertical
+
-
+
+
+ Create an Axis by intersect of 2 Planes.
-
+
+ Axis=(Plane,Plane)
+
+
+
+ Icons/WF_2PlanesAxis.svgIcons/WF_2PlanesAxis.svg
+
+
- 20
- 40
+ 32
+ 32
-
+
+
+ -
+
+
+ Create a set of Lines on a Plane perpendicular to the view at location of 2 mouse clicks.
+- Click first on the Button then at least twice click on the View (with no object in background).
+- Click first on the Button then at least twice click on the View (with an object in background), it will attach the lines to the surface of the object.
+
+
+ Click
+
+
+
+ ../Icons/WF_clickLine.svg../Icons/WF_clickLine.svg
+
+
+
+ 32
+ 32
+
+
+
+
+ -
+
+
+ Create 3 Axes at Base location of all selected Object(s).
+
+
+ Object(s) Base Axes
+
+
+
+ Icons/WF_baseObjectsAxes.svgIcons/WF_baseObjectsAxes.svg
+
+
+
+ 32
+ 32
+
+
+
+
+ -
+
+
+ Transform Line(s) in Sketch's Line(s) by projection onto the Sketch's Plane:
+- First select an existing Skecth;
+- Select as much as Lines needed;
+Then click on this button.
+
+
+ Axis(es) to Sketch
+
+
+
+ ../Icons/WF_2Sketch.svg../Icons/WF_2Sketch.svg
+
+
+
+ 32
+ 32
+
+
+
@@ -976,6 +1202,86 @@ with the given radius.
Plane
+ -
+
+
+ Create a plane perpendicular to a Line and crossing a Point.
+
+
+ Plane=(Point, _|Axis)
+
+
+
+ Icons/WF_linePointPlane2.svgIcons/WF_linePointPlane2.svg
+
+
+
+ 32
+ 32
+
+
+
+
+ -
+
+
+ Create a plane crossing a Line and a Point.
+
+
+ Plane=(Point, Axis)
+
+
+
+ Icons/WF_linePointPlane.svgIcons/WF_linePointPlane.svg
+
+
+
+ 32
+ 32
+
+
+
+
+ -
+
+
+ Create 3 Planes (XY, XZ and YZ) at center location of all selected Object(s).
+
+
+ Object(s) Center Planes
+
+
+
+ Icons/WF_centerObjectsPlanes.svgIcons/WF_centerObjectsPlanes.svg
+
+
+
+ 32
+ 32
+
+
+
+
+ -
+
+
+ Create a Plane crossing 3 Points.
+
+
+ Three Points Plane
+
+
+
+ Icons/WF_threePointsPlane.svgIcons/WF_threePointsPlane.svg
+
+
+
+ 32
+ 32
+
+
+
+
-
-
@@ -1022,227 +1328,6 @@ with the given radius.
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
- -
-
-
- Create a plane perpendicular to a Line and crossing a Point.
-
-
- Plane=(Point, _|Axis)
-
-
-
- Icons/WF_linePointPlane2.svgIcons/WF_linePointPlane2.svg
-
-
-
- 32
- 32
-
-
-
-
- -
-
-
- Create 3 Planes (XY, XZ and YZ) at center location of all selected Object(s).
-
-
- Object(s) Center Planes
-
-
-
- Icons/WF_centerObjectsPlanes.svgIcons/WF_centerObjectsPlanes.svg
-
-
-
- 32
- 32
-
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
- Create a Plane crossing a Line and perpendicular to a Plane.
-
-
- Plane=(Plane, Axis)
-
-
-
- Icons/WF_planeLinePlane.svgIcons/WF_planeLinePlane.svg
-
-
-
- 32
- 32
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 40
- 0
-
-
-
-
- 60
- 16777215
-
-
-
- Angle relative to the Plane (in degrees).
-
-
- 0.0
-
-
-
-
-
- -
-
-
- Create a plane crossing a Line and a Point.
-
-
- Plane=(Point, Axis)
-
-
-
- Icons/WF_linePointPlane.svgIcons/WF_linePointPlane.svg
-
-
-
- 32
- 32
-
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
- Create a Plane perpendicular to the view at location of one mouse click.
-Click first on the Button then click once on the View.
-Click first on the Button then click once on one object of the View
- to attach the plane at the object.
-But you can also select an already existing point first and click the button to attach the plane.
-
-
- Click
-
-
-
- ../Icons/WF_clickPlane.svg../Icons/WF_clickPlane.svg
-
-
-
- 32
- 32
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 40
- 0
-
-
-
-
- 60
- 16777215
-
-
-
- Length of the Plane.
-
-
- 10.0
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 40
- 0
-
-
-
-
- 60
- 16777215
-
-
-
- Width of the Plane.
-
-
- 10.0
-
-
-
-
-
-
-
@@ -1332,25 +1417,63 @@ then click on a location on the selected object.
- -
-
-
- Create a Plane crossing 3 Points.
-
-
- Three Points Plane
-
-
-
- Icons/WF_threePointsPlane.svgIcons/WF_threePointsPlane.svg
-
-
-
- 32
- 32
-
-
-
+
-
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Create a Plane crossing a Line and perpendicular to a Plane.
+
+
+ Plane=(Plane, Axis)
+
+
+
+ Icons/WF_planeLinePlane.svgIcons/WF_planeLinePlane.svg
+
+
+
+ 32
+ 32
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 40
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+ Angle relative to the Plane (in degrees).
+
+
+ 0.0
+
+
+
+
-
@@ -1365,6 +1488,111 @@ then click on a location on the selected object.
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Create a rectangular Plane perpendicular to the view at location of one mouse click.
+Define the width and the length of the Plane if needed.
+- Click first on the Button then click once on the View.
+- Click first on the Button then click once on top of one object of the View
+ to attach the plane at the object.
+- You can also select an already existing point first and click the button to attach the plane.
+
+
+
+ Click
+
+
+
+ ../Icons/WF_clickPlane.svg../Icons/WF_clickPlane.svg
+
+
+
+ 32
+ 32
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 40
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+ Length of the Plane.
+
+
+ 10.0
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 40
+ 0
+
+
+
+
+ 60
+ 16777215
+
+
+
+ Width of the Plane.
+
+
+ 10.0
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
@@ -1382,7 +1610,7 @@ then click on a location on the selected object.
Icons/WF_box.svgIcons/WF_box.svg
- Objects
+ Object
-
@@ -1390,11 +1618,12 @@ then click on a location on the selected object.
-
- First select an Axis and a Point.
-Define Diameter and Length if needed.
+ Create a Cylinder:
+- First select an Axis and a Ref. Point.
+- Define Diameter and Length if needed.
Then Click the button...
It will create a Cylinder aligned on the selected axis
-with one of the extremities at point selected.
+with one of the extremities at the Ref. point.
Cylinder
@@ -1460,7 +1689,8 @@ with one of the extremities at point selected.
- Length of the Cylinder.
+ Length of the Cylinder.
+Negative value will reverse the direction from Ref. Point
20.0
@@ -1474,11 +1704,12 @@ with one of the extremities at point selected.
-
- First select an Axis and a Point.
-Define Dimensions if needed.
+ Create a Cuboid:
+- First select an Axis and a Ref. Point.
+- Define Dimensions if needed.
Then Click the button...
It will create a Cube aligned on the selected axis
-with one of the extremities at point selected.
+with one of the extremities at Ref. point.
Cube
@@ -1544,7 +1775,8 @@ with one of the extremities at point selected.
- Heigth of the Cube.
+ Heigth of the Cube.
+Negative value will reverse the direction from Ref. Point
20.0
@@ -1630,7 +1862,7 @@ with one of the extremities at point selected.
Icons/WF_view.svgIcons/WF_view.svg
- Views
+ View
-
@@ -1648,7 +1880,7 @@ or aligned on 2 Points.
ReClick with same selection, will reverse the direction.
- Align to ...
+ Align View to ...
@@ -1687,7 +1919,7 @@ ReClick with same selection, will reverse the direction.
0
-
+
Cutting
@@ -1991,77 +2223,102 @@ and push this button to accept...
+
+
+ Check
+
+
+ -
+
+
+ Check if two faces are Perpendicular:
+- Select the 2 faces/planes and
+Click this button
+
+
+ Faces Perpendicular
+
+
+
+ ../Icons/WF_isPerpendicular.svg../Icons/WF_isPerpendicular.svg
+
+
+
+ 32
+ 32
+
+
+
+
+ -
+
+
+ Check if two faces are Parallel:
+- Select the 2 faces/planes and
+Click this button
+
+
+ Faces Parallel
+
+
+
+ ../Icons/WF_isParallel.svg../Icons/WF_isParallel.svg
+
+
+
+ 32
+ 32
+
+
+
+
+ -
+
+
+ Check if two faces are Coplanar:
+- Select the 2 faces/planes and
+Click this button
+
+
+ Faces Coplanar
+
+
+
+ ../Icons/WF_isCoplanar.svg../Icons/WF_isCoplanar.svg
+
+
+
+ 32
+ 32
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
-
-
- Pref.
-
-
- -
-
-
- Toggle here if you want a lot of information printed into report View.
-
-
- Verbose
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
- -
-
-
-
-
-
- Close
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
- 2015
-
-
-
-
-
diff --git a/WorkFeature/__init__.py b/WorkFeature/__init__.py
index c205f52..c6bbd02 100644
--- a/WorkFeature/__init__.py
+++ b/WorkFeature/__init__.py
@@ -3,7 +3,8 @@
"""
***************************************************************************
* Thanks to original ideas and codes from : *
-* Javier Martinez Garcia 2014 *
+* Javier Martinez Garcia 2014, 2015 for ideas and first WF codes *
+* for tje code on parallelism of two faces *
* Gui ideas from by Jonathan Wiedemann 2014 *
* Jonathan Wiedemann for view codes *
* galou_breizh for macro which creates a circle from 3 selected points *
@@ -14,10 +15,10 @@
* and all discussions...merci Mario *
***************************************************************************
***************************************************************************
-* FreeCAD Work Features / version 2015-01 *
+* FreeCAD Work Features / version 2015-02 *
* Copyright (c) 2014, 2015 *
* Code rewrite by *
-* Copyright (c) 2014 Javier Martinez Garcia *
+* Copyright (c) 2014, 2015 Javier Martinez Garcia *
* Copyright (c) 2013, 2014 Jonathan Wiedemann *
* Copyright (c) 2014, 2015 Mario52 *
* Copyright (c) 2013 galou_breizh *
@@ -50,7 +51,7 @@ if not sys.path.__contains__("/usr/lib/freecad/lib"):
import WFGui_2015 as WFGui
global myRelease
-myRelease = "2105_02_19"
+myRelease = "2105_02_26"
import os.path
import math
@@ -88,11 +89,12 @@ global verbose
verbose=0
m_numberLinePart = 2
+m_numberLineCut = 2
m_distanceLinePoint = 0.0
m_extensionTwoPointsAxis = 0.0
m_extensionLinePointAxis = 0.0
m_radiusCircle = 10.0
-m_extensionFaceNormal = 10.0
+m_extensionFaceNormal = 0.0
m_extensionPlanePointPlane = 0.0
m_anglePlaneAxisPlane = 0.0
m_lengthPlane = 10.0
@@ -102,18 +104,32 @@ m_lengthCube = 2.0
m_widthCube = 2.0
m_heightCube = 20.0
m_widthPlane = 10.0
+m_attach_point = "Mid"
m_cut_selectObjects = []
m_angleCutObject = 0.0
m_thicknessCutObject = 0.0
m_callback = None
+m_clickForPoint = True
+m_clickForAxis = True
m_stack = []
error_msg = "Not yet Developped !"
####################################################################################
+#Create a simple QMessageBox dialog for info messages.
+def gui_infoDialog(msg):
+ """ Create a simple QMessageBox dialog for info messages.
+ """
+ # The first argument indicates the icon used:
+ # one of QtGui.QMessageBox.{NoIcon,Information,Warning Critical,Question}
+ diag = QtGui.QMessageBox(QtGui.QMessageBox.Information,'Info :', msg)
+ diag.setWindowModality(QtCore.Qt.ApplicationModal)
+ diag.exec_()
+
+
#Create a simple QMessageBox dialog for error messages.
def gui_errorDialog(msg):
""" Create a simple QMessageBox dialog for error messages.
@@ -126,7 +142,6 @@ def gui_errorDialog(msg):
diag.setWindowModality(QtCore.Qt.ApplicationModal)
diag.exec_()
-
#Print a message on console.
def print_msg(message):
""" Print a message on console.
@@ -135,6 +150,19 @@ def print_msg(message):
App.Console.PrintMessage( message + "\n")
+#Print a message on console and GUI if possible.
+def print_gui_msg(message):
+ """ Print a message on console.
+ """
+ print message
+ App.Console.PrintMessage( message + "\n")
+ try :
+ gui_infoDialog(message)
+ except:
+ App.Console.PrintError("\nERROR : Not able to launch a QT dialog !" )
+ raise(Exception(message))
+
+
#Print a ERROR message on console.
def printError_msg(message):
""" Print a ERROR message on console.
@@ -694,26 +722,30 @@ def intersecPoints(shape1, shape2, info=0):
return None
return
-def getClickedPoint2(info):
+def getClickedPoint(info):
+ global verbose
+ msg=verbose
view = Gui.ActiveDocument.ActiveView
down = (info["State"] == "DOWN")
pos = info["Position"]
global m_stack
global m_callback
- if (down):
+ if msg !=0:
+ print_msg("down is " + str(down))
+ if (down) :
point = view.getPoint(pos[0],pos[1])
obj = view.getObjectInfo(pos)
if obj == None:
m_stack.append(point)
else:
m_stack.append(App.Vector(obj["x"],obj["y"],obj["z"]))
- if len(m_stack) == 1:
+ if len(m_stack) >= 1:
name = "Point"
part = "Part::Feature"
plot_point(m_stack[-1], part, name)
print_point(m_stack[-1],"Click point at :")
- view.removeEventCallback("SoMouseButtonEvent",m_callback)
- del m_stack[:]
+ #view.removeEventCallback("SoMouseButtonEvent",m_callback)
+ #del m_stack[:]
def getClickedNormal(info):
@@ -725,7 +757,7 @@ def getClickedNormal(info):
print_msg("info['Position'] : " + str(pos))
global m_stack
global m_callback
- global m_extensionFaceNorma
+ global m_extensionFaceNormal
part = "Part::Feature"
if (down):
point = view.getPoint(pos[0],pos[1])
@@ -746,6 +778,8 @@ def getClickedNormal(info):
u,v = m_uv[0], m_uv[1]
m_p1 = m_face.valueAt(u,v)
m_p2 = m_face.normalAt(u,v)
+ if m_extensionFaceNormal == 0.0:
+ m_extensionFaceNormal = 10.0
m_p3 = m_p1 + m_p2.normalize().multiply(m_extensionFaceNormal)
createFolders('WorkAxis')
name = "Normal"
@@ -754,6 +788,7 @@ def getClickedNormal(info):
name = "Point"
plot_point(m_p1, part, name)
view.removeEventCallback("SoMouseButtonEvent",m_callback)
+
def getClickedTangent(info):
msg=0
@@ -764,7 +799,7 @@ def getClickedTangent(info):
print_msg("info['Position'] : " + str(pos))
global m_stack
global m_callback
- global m_extensionFaceNorma
+ global m_extensionFaceNormal
part = "Part::Feature"
if (down):
point = view.getPoint(pos[0],pos[1])
@@ -785,6 +820,8 @@ def getClickedTangent(info):
u,v = m_uv[0], m_uv[1]
m_p1 = m_face.valueAt(u,v)
m_p2 = m_face.normalAt(u,v)
+ if m_extensionFaceNormal == 0.0:
+ m_extensionFaceNormal = 10.
m_p3 = m_p1 + m_p2.normalize().multiply(m_extensionFaceNormal)
Plane_Normal = m_p3 - m_p1
createFolders('WorkPlanes')
@@ -797,23 +834,32 @@ def getClickedTangent(info):
name = "Point"
plot_point(m_p1, part, name)
view.removeEventCallback("SoMouseButtonEvent",m_callback)
-
-
-def getClickedPoint(event_cb):
- event = event_cb.getEvent()
- view = Gui.ActiveDocument.ActiveView
- stack = []
- global m_callback
- if event.getState() == SoMouseButtonEvent.DOWN:
- pos = event.getPosition()
- point = view.getPoint(pos[0],pos[1])
- stack.append(point)
- if len(stack) == 1:
- name = "Point"
- part = "Part::Feature"
- plot_point(stack[-1], part, name)
- view.removeEventCallbackPivy(SoMouseButtonEvent.getClassTypeId(),m_callback)
+def getClickedAxis2(info):
+ global verbose
+ msg=verbose
+ view = Gui.ActiveDocument.ActiveView
+ down = (info["State"] == "DOWN")
+ pos = info["Position"]
+ global m_stack
+ global m_callback
+ if msg !=0:
+ print_msg("down is " + str(down))
+ if (down) :
+ point = view.getPoint(pos[0],pos[1])
+ obj = view.getObjectInfo(pos)
+ if obj == None:
+ m_stack.append(point)
+ else:
+ m_stack.append(App.Vector(obj["x"],obj["y"],obj["z"]))
+ print_point(m_stack[0],"Click point at :")
+ if len(m_stack) > 1:
+ name = "Line"
+ part = "Part::Feature"
+ Axis_User_Name, axis = plot_axis(m_stack[-2], m_stack[-1], part, name)
+ print_point(m_stack[-1],"Click point at :")
+
+
def getClickedAxis(event_cb):
event = event_cb.getEvent()
@@ -1054,7 +1100,30 @@ def intersecLinePlane(A, B, Plane_Normal, Plane_Point, info=0):
if info == 1:
print_point(T, msg="Intersection Point is : ")
return T
-
+
+
+def attachPoint(*argc):
+ """ Attach point location by combo box.
+ Options :
+ Start
+ Mid
+ End
+ """
+ global m_attach_point
+ global verbose
+ msg=verbose
+ if msg != 0:
+ print_msg("Attach point location by combo box !")
+ m_attach_point = "Mid"
+ if str(*argc) == "Start":
+ m_attach_point = "Start"
+ if str(*argc) == "Mid":
+ m_attach_point = "Mid"
+ if str(*argc) == "End":
+ m_attach_point = "End"
+
+ if msg != 0:
+ print_msg("argc is " + str(*argc) + " and Attach point " + str(m_attach_point) + " selected !")
def intersecPlanePlane(Plane_Normal1, Plane_Point1, Plane_Normal2, Plane_Point2, info=0):
""" Return the intersection Line between two Planes.
@@ -1371,6 +1440,9 @@ def bounding_box(grp,ori_X,ori_Y,ori_Z,length_X,length_Y,length_Z,info=0):
def plot_originObject():
+ m_actDoc = get_ActiveDocument(info=msg)
+ if m_actDoc == None:
+ return None
createFolders('Origin')
try:
if not(App.ActiveDocument.getObject("Origin_Point")):
@@ -1504,7 +1576,12 @@ def plot_centerObjectPoint():
Be aware this point is not necessary the center of Mass of all Objects!
"""
global centerOfMass
- msg=0
+ global verbose
+ msg=verbose
+
+ m_actDoc = get_ActiveDocument(info=msg)
+ if m_actDoc == None:
+ return None
createFolders('WorkPoints')
error_msg = "Unable to create Center Point of Object(s) : \nSelect at least one Object !"
flag_centerOfMass=centerOfMass
@@ -1515,10 +1592,6 @@ def plot_centerObjectPoint():
result_msg = " : Center Point of global bounding box of Object(s) created !"
name = "CenterBBObject"
part = "Part::Feature"
-
- m_actDoc = get_ActiveDocument(info=msg)
- if m_actDoc.Name == None:
- return None
# Return a list of SelectionObjects for a given document name.
m_selEx = Gui.Selection.getSelectionEx(m_actDoc.Name)
@@ -1566,12 +1639,18 @@ def plot_centerObjectPoint():
def plot_NpointsPoint():
"""Create a Point at mean location of all selected points.
"""
- msg=0
+ global verbose
+ msg=verbose
+
+ m_actDoc = get_ActiveDocument(info=msg)
+ if m_actDoc == None:
+ return None
createFolders('WorkPoints')
error_msg = "Unable to create Center Point of Points : \nSelect at least 2 points !"
result_msg = " : Center Point of Points created !"
name = "CenterPoint"
part = "Part::Feature"
+
Selection = get_SelectedObjects(info=msg, printError=False)
try:
SelectedObjects = Selection
@@ -1596,26 +1675,35 @@ def plot_NpointsPoint():
def plot_extremaLinePoint():
""" Create Points at start and end location of each selected Line(s).
"""
- msg=0
+ global verbose
+ msg=verbose
+
+ m_actDoc = get_ActiveDocument(info=msg)
+ if m_actDoc == None:
+ return None
createFolders('WorkPoints')
error_msg = "Unable to create First and Last Line Point(s) : \nSelect at least one Line !"
result_msg = " : First and Last Line Point(s) created !"
name = "extremumPoint"
part = "Part::Feature"
+
Selection = get_SelectedObjects(info=msg, printError=False)
try:
SelectedObjects = Selection
- Number_of_Edges = SelectedObjects[1]
- #print_msg("Number_of_Edges=" + str(Number_of_Edges))
+ Number_of_Edges = SelectedObjects[1]
+ if msg != 0:
+ print_msg("Number_of_Edges=" + str(Number_of_Edges))
if Number_of_Edges >= 1:
Edge_List = SelectedObjects[4]
for i in range( Number_of_Edges ):
- #print_msg(str(Edge_List[i]))
+ if msg != 0:
+ print_msg(str(Edge_List[i]))
edge = Edge_List[i]
Vector_A = edge.valueAt( 0.0 )
Vector_B = edge.valueAt( edge.Length )
- #print_point(Vector_A, msg="First Point : ")
- #print_point(Vector_B, msg="Last Point : ")
+ if msg != 0:
+ print_point(Vector_A, msg="First Point : ")
+ print_point(Vector_B, msg="Last Point : ")
Center_User_Name = plot_point(Vector_A, part, name)
print_point(Vector_A,str(Center_User_Name) + result_msg + " at :")
@@ -1628,43 +1716,60 @@ def plot_extremaLinePoint():
def numberLinePart(value):
- """ Respond to the change in extension value from the spin box.
- """
+ """ Respond to the change in number of part value from the spin box.
+ """
+ global verbose
+ msg=verbose
+
try:
# First we check if a valid number have been entered
global m_numberLinePart
if str(value) == '-':
return
m_numberLinePart = int(value)
- print_msg("New number is :" + str(m_numberLinePart))
+ if msg != 0:
+ print_msg("New number is :" + str(m_numberLinePart))
except ValueError:
printError_msg("Number must be valid !")
def plot_centerLinePoint():
- """ Create a Point at mid point location of each selected Line(s).
+ """ Create Point(s):
+ - Create a Point at mid point location of each selected Line(s), or
+ - Cut each selected Line(s) in 2 (n) parts and create a (n-1) Point(s) at ends of edge(s).
+ The number indicates how many parts to consider.
"""
- msg=0
+ global verbose
+ msg=verbose
+
+ m_actDoc = get_ActiveDocument(info=msg)
+ if m_actDoc == None:
+ return None
+
createFolders('WorkPoints')
error_msg = "Unable to create Mid Line Point(s) : \nSelect at least one Line !"
result_msg = " : Mid Line Point(s) created !"
name = "MidPoint"
part = "Part::Feature"
+
global m_numberLinePart
if not (m_numberLinePart >= 2 and m_numberLinePart <= 10) :
m_numberLinePart = 2
Selection = get_SelectedObjects(info=msg, printError=False)
try:
SelectedObjects = Selection
- Number_of_Edges = SelectedObjects[1]
- #print_msg("Number_of_Edges=" + str(Number_of_Edges))
+ Number_of_Edges = SelectedObjects[1]
+ if msg != 0:
+ print_msg("Number_of_Edges=" + str(Number_of_Edges))
if Number_of_Edges >= 1:
Edge_List = SelectedObjects[4]
for i in range( Number_of_Edges ):
if m_numberLinePart == 2:
- #print_msg(str(Edge_List[i]))
+ if msg != 0:
+ print_msg(str(Edge_List[i]))
Vector_Line_Center = centerLinePoint(Edge_List[i],info=1)
- #print_point(Vector_Line_Center, msg="MidPoint : ")
+ if msg != 0:
+ print_point(Vector_Line_Center, msg="MidPoint : ")
Center_User_Name = plot_point(Vector_Line_Center, part, name)
print_point(Vector_Line_Center,str(Center_User_Name) + result_msg + " at :")
@@ -1673,7 +1778,6 @@ def plot_centerLinePoint():
Vector_Line_Center = centerLinePoints(Edge_List[i], j , m_numberLinePart, info=1)
Center_User_Name = plot_point(Vector_Line_Center, part, name)
print_point(Vector_Line_Center,str(Center_User_Name) + result_msg + " at :")
- pass
else:
printError_msg(error_msg)
except:
@@ -2012,13 +2116,24 @@ def plot_2LinesPoint():
def plot_clickForPoint():
""" Plot a Point at location of a mouse click.
"""
+ global verbose
+ msg=verbose
createFolders('WorkPoints')
+ global m_stack
global m_callback
- #print_msg("plot_clickForPoint" )
- #view = Gui.ActiveDocument.ActiveView
+ global m_clickForPoint
+
+ if msg !=0:
+ print_msg("plot_clickForPoint: flag is " + str(m_clickForPoint))
+
+ # Mimic behavior of toggle button
view = get_ActiveView()
- #m_callback = view.addEventCallbackPivy(SoMouseButtonEvent.getClassTypeId(),getClickedPoint)
- m_callback = view.addEventCallback("SoMouseButtonEvent",getClickedPoint2)
+ if m_clickForPoint:
+ m_callback = view.addEventCallback("SoMouseButtonEvent",getClickedPoint)
+ else:
+ del m_stack[:]
+ view.removeEventCallback("SoMouseButtonEvent",m_callback)
+ m_clickForPoint = not m_clickForPoint
def plot_baseObjectPoint():
@@ -2049,6 +2164,80 @@ def plot_baseObjectPoint():
printError_msg(error_msg)
+def point_toSketch():
+ """ Transform Point(s) in Sketch's Point(s) by projection onto the Sketch's Plane:
+ - First select an existing Skecth;
+ - Select as much as Points needed;
+ Then click on this button.
+ """
+ global verbose
+ msg=verbose
+
+ m_actDoc = get_ActiveDocument(info=msg)
+ if m_actDoc == None:
+ return None
+ error_msg = "Transform Point(s) in Sketch's Point(s) : \nFirst select an existing Skecth\nthen select point(s) !"
+ result_msg = " : Point(s) transformed in Sketch's Point(s) done!"
+
+ m_sel = Gui.Selection.getSelection(m_actDoc.Name)
+ m_selEx = Gui.Selection.getSelectionEx(m_actDoc.Name)
+ if msg != 0:
+ print_msg("m_sel : " + str(m_sel))
+ m_num = len(m_sel)
+ m_num_point = 0
+ if m_num > 1:
+ # Get the Sketch from the selection
+ m_obj = m_sel[0]
+ if msg != 0:
+ print_msg("m_obj : " + str(m_obj))
+ if hasattr(m_obj, 'TypeId'):
+ m_type = m_obj.TypeId
+ if msg != 0:
+ print_msg("m_obj.TypeId : " + str(m_type))
+ else:
+ m_type = m_obj.Type
+ if msg != 0:
+ print_msg("m_obj.Type : " + str(m_type))
+
+ if m_type[:6] == "Sketch":
+ if msg != 0:
+ print_msg("Found a Sketch object!")
+ m_sketch = m_obj
+ # Get the Sketch Plane info
+ m_rec = Part.makePlane(1,1)
+ m_rec.Placement = m_sketch.Placement
+ m_recN = m_rec.normalAt(0,0)
+ # Build a geometry list
+ geoList = []
+ # Get Point(s) from the selection
+ for m_i in range(1,m_num):
+ m_obj = m_selEx[m_i]
+ SubObject = m_obj.SubObjects[0]
+ if SubObject.ShapeType == "Vertex":
+ if msg != 0:
+ print_msg("Found a Points object!")
+ Point = m_obj.SubObjects[0]
+ # Get the Point
+ m_p = Point.Point
+ # Projection of the Point selected onto the Sketch Plane
+ Projection = m_p.projectToPlane(m_sketch.Placement.Base, m_recN)
+ # Append the Projection
+ geoList.append(Part.Point(Projection))
+ # Add the geometry list to the Sketch
+ m_sketch.addGeometry(geoList)
+ m_num_point = m_num_point + 1
+ else:
+ continue
+ # Refresh
+ App.getDocument(str(m_actDoc.Name)).recompute()
+ print_msg(str(m_num_point) + result_msg )
+ else:
+ printError_msg(error_msg)
+ else:
+ printError_msg(error_msg)
+ return
+
+
def plot_centerObjectAxes():
""" Create 3 Axes XY, and Z at center point of all selected objects.
"""
@@ -2140,7 +2329,13 @@ def extensionTwoPointsAxis(value):
def plot_2PointsAxis():
""" Create an Axis with the 2 points selected as ends.
"""
- msg=0
+ global verbose
+ msg=verbose
+
+ m_actDoc = get_ActiveDocument(info=msg)
+ if m_actDoc == None:
+ return None
+
createFolders('WorkAxis')
error_msg = "Unable to create Axis : \nSelect two points only !"
result_msg = " : Axis created !"
@@ -2183,6 +2378,7 @@ def plot_cylinderAxis():
result_msg = " : Cylinder Axis created !"
name = "Cylinder Axis"
part = "Part::Feature"
+ global m_extensionFaceNormal
m_actDoc = get_ActiveDocument(info=msg)
if m_actDoc.Name == None:
@@ -2231,8 +2427,16 @@ def plot_cylinderAxis():
Axis_A = Circle_Center_1
Axis_B = Circle_Center_2
Axis_dir = Axis_B - Axis_A
- Axis_E1 = Axis_B + Axis_dir.multiply(0.1)
- Axis_E2 = Axis_A - Axis_dir.multiply(0.9)
+ if m_extensionFaceNormal != 0.0:
+ Axis_dir_norm = Axis_B - Axis_A
+ Axis_dir_norm = Axis_dir_norm.normalize()
+ Axis_dir_norm = Axis_dir_norm.multiply(m_extensionFaceNormal)
+ Axis_E1 = Axis_B + Axis_dir_norm
+ Axis_E2 = Axis_A - Axis_dir_norm
+ else:
+ Axis_E1 = Axis_B + Axis_dir.multiply(0.1)
+ Axis_E2 = Axis_A - Axis_dir.multiply(0.9)
+
Axis_User_Name, axis = plot_axis(Axis_E1, Axis_E2, part, name)
@@ -2263,6 +2467,8 @@ def plot_cylinderAxis():
m_mult = m_r * 0.5
else:
m_mult = 5
+ if m_extensionFaceNormal != 0.0:
+ m_mult = m_extensionFaceNormal
Center_User_Name = plot_point(m_c, part, name)
Axis_User_Name, axis = plot_axis(m_c, m_c + m_a.multiply(m_mult), part, name)
Axis_User_Name, axis = plot_axis(m_c, m_c - m_a, part, name)
@@ -2274,42 +2480,7 @@ def plot_cylinderAxis():
printError_msg(error_msg)
-def plot_2LinesAxis():
- msg=0
- createFolders('WorkAxis')
- error_msg = "Unable to create Axis between 2 Lines : \nSelect two lines only !"
- result_msg = " : Axis between 2 Lines created !"
- name = "MidLine"
- part = "Part::Feature"
- Selection = get_SelectedObjects(info=msg, printError=False)
- try:
- SelectedObjects = Selection
- Number_of_Edges = SelectedObjects[1]
- #print_msg("Number_of_Edges=" + str(Number_of_Edges))
- if (Number_of_Edges == 2):
- Edge_List = SelectedObjects[4]
- #print_msg(str(Edge_List))
- Vector_A = Edge_List[0].valueAt( 0.0 )
- Vector_B = Edge_List[0].valueAt( Edge_List[0].Length )
- #print_point(Vector_A, msg="Point A : ")
- #print_point(Vector_B, msg="Point B : ")
-
- Vector_C = Edge_List[1].valueAt( 0.0 )
- Vector_D = Edge_List[1].valueAt( Edge_List[1].Length )
- #print_point(Vector_C, msg="Point C : ")
- #print_point(Vector_D, msg="Point D : ")
-
- Vector_edge_1 = Vector_A + Vector_C
- Vector_edge_2 = Vector_B + Vector_D
-
- Axis_E1 = Vector_edge_1.multiply(0.5)
- Axis_E2 = Vector_edge_2.multiply(0.5)
-
- Axis_User_Name, axis = plot_axis(Axis_E1, Axis_E2, part, name)
- print_msg(str(Axis_User_Name) + result_msg )
- except:
- printError_msg(error_msg)
def plot_planeAxis():
@@ -2321,6 +2492,7 @@ def plot_planeAxis():
result_msg = " : Plane Axis created !"
name = "Axis"
part = "Part::Feature"
+ global m_extensionFaceNormal
Selection = get_SelectedObjects(info=msg, printError=False)
try:
SelectedObjects = Selection
@@ -2333,7 +2505,10 @@ def plot_planeAxis():
Selected_Plane = Plane_List[i]
#print_msg(str(Selected_Plane))
Point_A = Selected_Plane.CenterOfMass
- Length = Selected_Plane.Length * 0.1
+ if m_extensionFaceNormal != 0.0:
+ Length = m_extensionFaceNormal
+ else:
+ Length = Selected_Plane.Length * 0.1
#print_point(Point_A, msg="Point_A : ")
#print_msg("Length = " + str(Length))
Normal = Selected_Plane.normalAt(0,0)
@@ -2375,8 +2550,119 @@ def plot_faceNormal():
global m_callback
view = Gui.ActiveDocument.ActiveView
m_callback = view.addEventCallback("SoMouseButtonEvent",getClickedNormal)
+
+def plot_2LinesAxis():
+ msg=0
+ createFolders('WorkAxis')
+ error_msg = "Unable to create Axis between 2 Lines : \nSelect two lines only !"
+ result_msg = " : Axis between 2 Lines created !"
+ name = "MidLine"
+ part = "Part::Feature"
+ Selection = get_SelectedObjects(info=msg, printError=False)
+ try:
+ SelectedObjects = Selection
+ Number_of_Edges = SelectedObjects[1]
+ #print_msg("Number_of_Edges=" + str(Number_of_Edges))
+ if (Number_of_Edges == 2):
+ Edge_List = SelectedObjects[4]
+ #print_msg(str(Edge_List))
+ Vector_A = Edge_List[0].valueAt( 0.0 )
+ Vector_B = Edge_List[0].valueAt( Edge_List[0].Length )
+ #print_point(Vector_A, msg="Point A : ")
+ #print_point(Vector_B, msg="Point B : ")
+
+ Vector_C = Edge_List[1].valueAt( 0.0 )
+ Vector_D = Edge_List[1].valueAt( Edge_List[1].Length )
+ #print_point(Vector_C, msg="Point C : ")
+ #print_point(Vector_D, msg="Point D : ")
+
+ Vector_edge_1 = Vector_A + Vector_C
+ Vector_edge_2 = Vector_B + Vector_D
+
+ Axis_E1 = Vector_edge_1.multiply(0.5)
+ Axis_E2 = Vector_edge_2.multiply(0.5)
+
+ Axis_User_Name, axis = plot_axis(Axis_E1, Axis_E2, part, name)
+
+ print_msg(str(Axis_User_Name) + result_msg )
+ except:
+ printError_msg(error_msg)
+
+def numberLineCut(value):
+ """ Respond to the change in number of cut value from the spin box.
+ """
+ global verbose
+ msg=verbose
+
+ try:
+ # First we check if a valid number have been entered
+ global m_numberLineCut
+ if str(value) == '-':
+ return
+ m_numberLineCut = int(value)
+ if msg != 0:
+ print_msg("New number is :" + str(m_numberLineCut))
+ except ValueError:
+ printError_msg("Number must be valid !")
+
+def plot_cutAxis():
+ """Create Axes:
+ Cut the selected Line in 2(n) parts and create 2(n) Axes.
+ The number indicates in how many parts to cut.
+ """
+ global verbose
+ msg=verbose
+
+ m_actDoc = get_ActiveDocument(info=msg)
+ if m_actDoc == None:
+ return None
+
+ createFolders('WorkAxis')
+ error_msg = "Unable to cut the Line/Axis : \nSelect at least one Line !"
+ result_msg = " : is last axis created from Axis cut !"
+ name = "Axes_from_axis"
+ part = "Part::Feature"
+
+ global m_numberLineCut
+ if not (m_numberLineCut >= 2 and m_numberLineCut <= 10) :
+ m_numberLineCut = 2
+ if msg != 0:
+ print_msg("Number_of_cuts=" + str(m_numberLineCut))
+ Selection = get_SelectedObjects(info=msg, printError=False)
+ m_num, m_selEx, m_objs, m_objNames = get_InfoObjects(info=msg, printError=False)
+ try:
+ SelectedObjects = Selection
+ Number_of_Edges = SelectedObjects[1]
+ if msg != 0:
+ print_msg("Number_of_Edges=" + str(Number_of_Edges))
+ if (Number_of_Edges >= 1):
+ Edge_List = SelectedObjects[4]
+ for i in range( Number_of_Edges ):
+ if msg != 0:
+ print_msg(str(Edge_List[i]))
+ Vector_A = Edge_List[i].valueAt( 0.0 )
+ for j in range( 1, m_numberLineCut ):
+ Vector_B = centerLinePoints(Edge_List[i], j , m_numberLineCut, info=msg)
+ if msg != 0:
+ print_point(Vector_A,"Vector_A is : ")
+ print_point(Vector_B,"Vector_B is : ")
+ Axis_User_Name, axis = plot_axis(Vector_A, Vector_B, part, name)
+ Vector_A = Vector_B
+ Vector_B = Edge_List[i].valueAt( Edge_List[i].Length )
+ if msg != 0:
+ print_point(Vector_A,"Vector_A is : ")
+ print_point(Vector_B,"Vector_B is : ")
+ Axis_User_Name, axis = plot_axis(Vector_A, Vector_B, part, name)
+ print_msg(str(Axis_User_Name) + result_msg )
+
+ Gui.ActiveDocument.getObject(str(m_objNames[i])).Visibility=False
+
+ except:
+ printError_msg(error_msg)
+
+
def extensionLinePointAxis(value):
""" Respond to the change in extension value from the text box.
"""
@@ -2451,17 +2737,20 @@ def plot_pointLineAxis():
result_msg = " : Paralell Axis created !"
name = "Parallel Line"
part = "Part::Feature"
+ global m_attach_point
Selection = get_SelectedObjects(info=msg, printError=False)
try:
SelectedObjects = Selection
Number_of_Points = SelectedObjects[0]
Number_of_Edges = SelectedObjects[1]
- #print_msg("Number_of_Edges=" + str(Number_of_Edges) + " Number_of_Points=" + str(Number_of_Points))
+ if msg != 0:
+ print_msg("Number_of_Edges=" + str(Number_of_Edges) + " Number_of_Points=" + str(Number_of_Points))
if (Number_of_Edges == 1) and (Number_of_Points) == 1 :
Point_List = SelectedObjects[3]
Edge_List = SelectedObjects[4]
- #print_msg(str(Point_List))
- #print_msg(str(Edge_List))
+ if msg != 0:
+ print_msg(str(Point_List))
+ print_msg(str(Edge_List))
Vector_Cprime = Point_List[0].Point
Vector_A = Edge_List[0].valueAt( 0.0 )
Vector_B = Edge_List[0].valueAt( Edge_List[0].Length )
@@ -2469,6 +2758,17 @@ def plot_pointLineAxis():
Vector_Translate = (Vector_Cprime - Vector_C)
Vector_Aprime = Vector_A + Vector_Translate
Vector_Bprime = Vector_B + Vector_Translate
+
+ if str(m_attach_point) == "Start":
+ Vector_Translate2 = (Vector_A - Vector_B)
+ Vector_Translate2 = Vector_Translate2.multiply(0.5)
+ Vector_Aprime = Vector_Aprime + Vector_Translate2
+ Vector_Bprime = Vector_Bprime + Vector_Translate2
+ if str(m_attach_point) == "End":
+ Vector_Translate2 = (Vector_B - Vector_A)
+ Vector_Translate2 = Vector_Translate2.multiply(0.5)
+ Vector_Aprime = Vector_Aprime + Vector_Translate2
+ Vector_Bprime = Vector_Bprime + Vector_Translate2
Axis_User_Name, axis = plot_axis(Vector_Aprime, Vector_Bprime, part, name)
@@ -2523,13 +2823,27 @@ def plot_linePlaneAxis():
def plot_clickForAxis():
- """ Plot an axis at location of 2 mouse clicks..
+ """ Plot an axis at location of 2 mouse clicks.
"""
+ global verbose
+ msg=verbose
+ createFolders('WorkAxis')
+ global m_stack
global m_callback
- #print_msg("plot_clickForAxis" )
- view = Gui.ActiveDocument.ActiveView
- m_callback = view.addEventCallbackPivy(SoMouseButtonEvent.getClassTypeId(),getClickedAxis)
+ global m_clickForAxis
+ if msg !=0:
+ print_msg("plot_clickForAxis: flag is " + str(m_clickForAxis))
+
+ # Mimic behavior of toggle button
+ view = get_ActiveView()
+ if m_clickForAxis:
+ #m_callback = view.addEventCallbackPivy(SoMouseButtonEvent.getClassTypeId(),getClickedAxis)
+ m_callback = view.addEventCallback("SoMouseButtonEvent",getClickedAxis2)
+ else:
+ del m_stack[:]
+ view.removeEventCallback("SoMouseButtonEvent",m_callback)
+ m_clickForAxis = not m_clickForAxis
def plot_2PlanesAxis():
""" Plot the intersection Axis between two planes.
@@ -2718,6 +3032,83 @@ def plot_baseObjectAxes():
printError_msg(error_msg)
+def line_toSketch():
+ """ Transform Line(s) in Sketch's Line(s) by projection onto the Sketch's Plane:
+ - First select an existing Skecth;
+ - Select as much as Lines needed;
+ Then click on this button.
+ """
+ global verbose
+ msg=verbose
+
+ m_actDoc = get_ActiveDocument(info=msg)
+ if m_actDoc == None:
+ return None
+ error_msg = "Transform Line(s) in Sketch's Line(s) : \nFirst select an existing Skecth\nthen select line(s) !"
+ result_msg = " : Line(s) transformed in Sketch's Line(s) done!"
+
+ m_sel = Gui.Selection.getSelection(m_actDoc.Name)
+ m_selEx = Gui.Selection.getSelectionEx(m_actDoc.Name)
+ if msg != 0:
+ print_msg("m_sel : " + str(m_sel))
+ m_num = len(m_sel)
+ m_num_line = 0
+ if m_num > 1:
+ # Get the Sketch from the selection
+ m_obj = m_sel[0]
+ if msg != 0:
+ print_msg("m_obj : " + str(m_obj))
+ if hasattr(m_obj, 'TypeId'):
+ m_type = m_obj.TypeId
+ if msg != 0:
+ print_msg("m_obj.TypeId : " + str(m_type))
+ else:
+ m_type = m_obj.Type
+ if msg != 0:
+ print_msg("m_obj.Type : " + str(m_type))
+
+ if m_type[:6] == "Sketch":
+ if msg != 0:
+ print_msg("Found a Sketch object!")
+ m_sketch = m_obj
+ # Get the Sketch Plane info
+ m_rec = Part.makePlane(1,1)
+ m_rec.Placement = m_sketch.Placement
+ m_recN = m_rec.normalAt(0,0)
+ # Build a geometry list
+ geoList = []
+ # Get Point(s) from the selection
+ for m_i in range(1,m_num):
+ m_obj = m_selEx[m_i]
+ SubObject = m_obj.SubObjects[0]
+ if SubObject.ShapeType == "Edge":
+ if msg != 0:
+ print_msg("Found a Edge object!")
+ m_Vertex1 = SubObject.Vertexes[0]
+ m_Vertex2 = SubObject.Vertexes[1]
+ # Get the Point
+ m_p1 = m_Vertex1.Point
+ m_p2 = m_Vertex2.Point
+ # Projection of the Point selected onto the Sketch Plane
+ Projection1 = m_p1.projectToPlane(m_sketch.Placement.Base, m_recN)
+ Projection2 = m_p2.projectToPlane(m_sketch.Placement.Base, m_recN)
+ # Append the Projection
+ geoList.append(Part.Line(Projection1,Projection2))
+ # Add the geometry list to the Sketch
+ m_sketch.addGeometry(geoList)
+ m_num_line = m_num_line + 1
+ else:
+ continue
+ # Refresh
+ App.getDocument(str(m_actDoc.Name)).recompute()
+ print_msg(str(m_num_line) + result_msg )
+ else:
+ printError_msg(error_msg)
+ else:
+ printError_msg(error_msg)
+ return
+
+
def radiusCircle(value):
""" Respond to the change in radius value from the text box.
"""
@@ -3232,9 +3623,16 @@ def plot_faceTangentPlane():
def plot_clickForPlane():
""" Create a Plane at location of one mouse click in the view or
onto a clicked object or
- at a pre-selected point location.
+ at a pre-selected point location:
+ Create a Plane perpendicular to the view at location of one mouse click.
+ - Click first on the Button then click once on the View.
+ - Click first on the Button then click once on one object of the View
+ to attach the plane at the object.
+ But you can also select an already existing point first and click the button
+ to attach the plane.
"""
- msg=0
+ global verbose
+ msg=verbose
createFolders('WorkPlanes')
m_actDoc = get_ActiveDocument(info=msg)
@@ -3708,7 +4106,79 @@ def plot_axisPointCube():
except:
printError_msg(error_msg)
-
+def view_align():
+ """ Set the current view perpendicular to the selected Face, Edge
+ or 2 points selected
+ """
+ # TODO
+ # se mettre tangent a un objet...
+ error_msg = "Unable to align camera : \nSelect one Face, one Edge or 2 points !"
+ m_actDoc=App.activeDocument()
+ if m_actDoc.Name:
+ # Return a list of Objects for a given document name.
+ m_selEx = Gui.Selection.getSelectionEx(m_actDoc.Name)
+ m_num = len(m_selEx)
+ if m_num >= 1:
+ Selected_Points = []
+ m_cam = Gui.ActiveDocument.ActiveView.getCameraNode()
+ m_camValues = m_cam.position.getValue()
+ m_pos = App.Vector( (m_camValues[0], m_camValues[1], m_camValues[2],) )
+
+ for m_i in range(m_num):
+ Sel_i_Object = m_selEx[m_i]
+ SubObjects_Inside = Sel_i_Object.SubObjects
+ SubObject = SubObjects_Inside[0]
+
+ if SubObject.ShapeType == "Vertex":
+ Selected_Points.append(SubObject)
+ Number_of_Points = len(Selected_Points)
+ if Number_of_Points == 2:
+ m_Vertex1 = Selected_Points[0]
+ m_dist1 = m_pos.sub(Selected_Points[0].Point)
+ m_Vertex2 = Selected_Points[1]
+ m_dist2 = m_pos.sub(Selected_Points[1].Point)
+
+ #print_msg("dist1=" + str(m_dist1.Length) + "\ndist2=" + str(m_dist2.Length))
+ if m_dist1.Length < m_dist2.Length:
+ alignCamera(m_Vertex1.Point,m_Vertex2.Point,False)
+ else:
+ alignCamera(m_Vertex1.Point,m_Vertex2.Point,True)
+
+
+ elif SubObject.ShapeType == "Edge":
+ m_Vertex1 = SubObject.Vertexes[0]
+ m_dist1 = m_pos.sub(SubObject.valueAt( 0.0 ))
+ m_Vertex2 = SubObject.Vertexes[1]
+ m_dist2 = m_pos.sub(SubObject.valueAt( SubObject.Length ))
+
+ #print_msg("dist1=" + str(m_dist1.Length) + "\ndist2=" + str(m_dist2.Length))
+ if m_dist1.Length < m_dist2.Length:
+ alignCamera(m_Vertex1.Point,m_Vertex2.Point,False)
+ else:
+ alignCamera(m_Vertex1.Point,m_Vertex2.Point,True)
+
+ elif SubObject.ShapeType == "Face":
+ m_faceSel = Sel_i_Object.SubObjects[0]
+ m_dir = m_faceSel.normalAt(0,0)
+ m_dir = m_faceSel.Surface.Axis
+ m_edge = Part.makeLine(m_faceSel.CenterOfMass, m_faceSel.CenterOfMass.add(m_dir))
+
+ m_Vertex1 = m_edge.Vertexes[0]
+ m_dist1 = m_pos.sub(m_faceSel.CenterOfMass)
+ m_Vertex2 = m_edge.Vertexes[1]
+ m_dist2 = m_pos.sub(m_faceSel.CenterOfMass.add(m_dir))
+
+ #print_msg("dist1=" + str(m_dist1.Length) + "\ndist2=" + str(m_dist2.Length))
+ if m_dist1.Length < m_dist2.Length:
+ alignCamera(m_Vertex1.Point,m_Vertex2.Point,False)
+ else:
+ alignCamera(m_Vertex1.Point,m_Vertex2.Point,True)
+ else:
+ printError_msg(error_msg)
+ else:
+ printError_msg(error_msg)
+
+
def angleCutObject(value):
""" Respond to the change in angle value from the text box.
"""
@@ -4449,111 +4919,60 @@ def plot_cutObject():
cut_reset()
-
-def object_align2view():
- """ Place your object selected to the position ActiveView (camera)
- __author__ = "Mario52"
- """
- # revoir le point de rotation
- msg=0
- error_msg = "Select one object !"
-
- m_actDoc = get_ActiveDocument(info=msg)
- if m_actDoc == None:
- return None
-
- m_num, m_selEx, m_objs, m_objNames = get_InfoObjects(info=msg)
- Center = centerObjectsPoint(m_objs)
- if Center != None:
- pl = FreeCAD.Placement()
- pl.Rotation = Gui.ActiveDocument.ActiveView.getCameraOrientation()
- pl.Base = App.Vector(0,0,0)
- for m_objName in m_objNames:
- App.ActiveDocument.getObject(m_objName).Placement=pl
-
- else:
- printError_msg(error_msg)
-
- #sel = Gui.Selection.getSelection()
- #Nameelement = sel[0].Name
- #pl = FreeCAD.Placement()
- #pl.Rotation = Gui.ActiveDocument.ActiveView.getCameraOrientation()
- #pl.Base = FreeCAD.Vector(0.0,0.0,0.0)
- #App.ActiveDocument.getObject(Nameelement).Placement=pl
-
-
-def view_align():
- """ Set the current view perpendicular to the selected Face, Edge
- or 2 points selected
- """
- # TODO
- # se mettre tangent a un objet...
- error_msg = "Unable to align camera : \nSelect one Face, one Edge or 2 points !"
- m_actDoc=App.activeDocument()
- if m_actDoc.Name:
- # Return a list of Objects for a given document name.
- m_selEx = Gui.Selection.getSelectionEx(m_actDoc.Name)
- m_num = len(m_selEx)
- if m_num >= 1:
- Selected_Points = []
- m_cam = Gui.ActiveDocument.ActiveView.getCameraNode()
- m_camValues = m_cam.position.getValue()
- m_pos = App.Vector( (m_camValues[0], m_camValues[1], m_camValues[2],) )
-
- for m_i in range(m_num):
- Sel_i_Object = m_selEx[m_i]
- SubObjects_Inside = Sel_i_Object.SubObjects
- SubObject = SubObjects_Inside[0]
-
- if SubObject.ShapeType == "Vertex":
- Selected_Points.append(SubObject)
- Number_of_Points = len(Selected_Points)
- if Number_of_Points == 2:
- m_Vertex1 = Selected_Points[0]
- m_dist1 = m_pos.sub(Selected_Points[0].Point)
- m_Vertex2 = Selected_Points[1]
- m_dist2 = m_pos.sub(Selected_Points[1].Point)
-
- #print_msg("dist1=" + str(m_dist1.Length) + "\ndist2=" + str(m_dist2.Length))
- if m_dist1.Length < m_dist2.Length:
- alignCamera(m_Vertex1.Point,m_Vertex2.Point,False)
- else:
- alignCamera(m_Vertex1.Point,m_Vertex2.Point,True)
-
- elif SubObject.ShapeType == "Edge":
- m_Vertex1 = SubObject.Vertexes[0]
- m_dist1 = m_pos.sub(SubObject.valueAt( 0.0 ))
- m_Vertex2 = SubObject.Vertexes[1]
- m_dist2 = m_pos.sub(SubObject.valueAt( SubObject.Length ))
-
- #print_msg("dist1=" + str(m_dist1.Length) + "\ndist2=" + str(m_dist2.Length))
- if m_dist1.Length < m_dist2.Length:
- alignCamera(m_Vertex1.Point,m_Vertex2.Point,False)
- else:
- alignCamera(m_Vertex1.Point,m_Vertex2.Point,True)
-
- elif SubObject.ShapeType == "Face":
- m_faceSel = Sel_i_Object.SubObjects[0]
- m_dir = m_faceSel.normalAt(0,0)
- m_dir = m_faceSel.Surface.Axis
- m_edge = Part.makeLine(m_faceSel.CenterOfMass, m_faceSel.CenterOfMass.add(m_dir))
-
- m_Vertex1 = m_edge.Vertexes[0]
- m_dist1 = m_pos.sub(m_faceSel.CenterOfMass)
- m_Vertex2 = m_edge.Vertexes[1]
- m_dist2 = m_pos.sub(m_faceSel.CenterOfMass.add(m_dir))
-
- #print_msg("dist1=" + str(m_dist1.Length) + "\ndist2=" + str(m_dist2.Length))
- if m_dist1.Length < m_dist2.Length:
- alignCamera(m_Vertex1.Point,m_Vertex2.Point,False)
- else:
- alignCamera(m_Vertex1.Point,m_Vertex2.Point,True)
- else:
- printError_msg(error_msg)
- else:
- printError_msg(error_msg)
-
+def object_parallel():
+ """
+ """
+ # Javier Martinez Garcia 2015
+ SelObj = Gui.Selection.getSelectionEx()
+ try:
+ NormalA = SelObj[0].SubObjects[0].normalAt(0,0)
+ NormalB = SelObj[1].SubObjects[0].normalAt(0,0)
+ if NormalA.cross(NormalB).Length == 0.0:
+ print_gui_msg("\nFaces are parallel\n")
+ else:
+ print_gui_msg("\nNon parallel faces\n")
+
+ except:
+ printError_msg("\nWrong selection!\n")
+
+
+def object_perpendicular():
+ """
+ """
+ # Javier Martinez Garcia 2015
+ SelObj = Gui.Selection.getSelectionEx()
+ try:
+ NormalA = SelObj[0].SubObjects[0].normalAt(0,0)
+ NormalB = SelObj[1].SubObjects[0].normalAt(0,0)
+ if NormalA.dot(NormalB) == 0.0:
+ print_gui_msg("\nFaces are perpendicular\n")
+ else:
+ print_gui_msg("\nNon perpendicular faces\n")
+
+ except:
+ printError_msg("\nWrong selection!\n")
+
+
+def object_coplanar():
+ """
+ """
+ # Javier Martinez Garcia 2015
+ SelObj = Gui.Selection.getSelectionEx()
+ try:
+ NormalA = SelObj[0].SubObjects[0].normalAt(0,0)
+ VAB = (SelObj[1].SubObjects[0].CenterOfMass-SelObj[0].SubObjects[0].CenterOfMass).normalize()
+ if NormalA.dot(VAB) == 0.0:
+ print_gui_msg("\nCoplanar faces\n")
+
+ else:
+ print_gui_msg("\nNon coplanar faces\n")
+
+ except:
+ printError_msg("\nWrong selection!\n")
+
+
+
####################################################################################
try:
_fromUtf8 = QtCore.QString.fromUtf8
@@ -4592,7 +5011,7 @@ class WorkFeatureTab():
self.ui.setupUi(self.m_dialog)
self.m_tab.setCurrentIndex(3)
- # Connect to functions
+ ### Connect to functions
self.connections_for_checkbox_toggled = {
"checkBox_object_center" : "bBox_toggled",
}
@@ -4617,18 +5036,22 @@ class WorkFeatureTab():
"button_twolines_point" : "plot_2LinesPoint",
"button_click_for_point" : "plot_clickForPoint",
"button_object_base_point" : "plot_baseObjectPoint",
+ "button_point_to_sketch" : "point_toSketch",
"button_object_axis" : "plot_centerObjectAxes",
"button_twopoints_axis" : "plot_2PointsAxis",
- "button_cylinder_axis" : "plot_cylinderAxis",
- "button_twolines_axis" : "plot_2LinesAxis",
+ "button_cylinder_axis" : "plot_cylinderAxis",
"button_plane_axis" : "plot_planeAxis",
- "button_face_normal" : "plot_faceNormal",
+ "button_face_normal" : "plot_faceNormal",
+ "button_twolines_axis" : "plot_2LinesAxis",
+ "button_cut_axis" : "plot_cutAxis",
"button_point_line_axis" : "plot_pointLineAxis",
"button_line_point_axis" : "plot_linePointAxis",
"button_line_plane_axis" : "plot_linePlaneAxis",
- "button_twoplanes_axis" : "plot_2PlanesAxis",
+ "button_twoplanes_axis" : "plot_2PlanesAxis",
+ "button_click_for_axis" : "plot_clickForAxis",
"button_object_base_axes" : "plot_baseObjectAxes",
+ "button_line_to_sketch" : "line_toSketch",
"button_linecenter_circle" : "plot_linecenterCircle",
"button_linepoint_circle" : "plot_linepointCircle",
@@ -4653,10 +5076,13 @@ class WorkFeatureTab():
"button_cut_select_object" : "cut_selectObject",
"button_cut_select_line" : "cut_selectLine",
- "button_cut_select_plane" : "cut_selectPlane",
-
+ "button_cut_select_plane" : "cut_selectPlane",
"button_cut_reset" : "cut_reset",
"button_cut_apply" : "plot_cutObject",
+
+ "button_isParallel" : "object_parallel",
+ "button_isPerpendicular" : "object_perpendicular",
+ "button_isCoplanar" : "object_coplanar",
}
self.connections_for_text_changed = {
@@ -4687,11 +5113,17 @@ class WorkFeatureTab():
self.connections_for_spin_changed = {
"spin_line_center" : "numberLinePart",
+ "spin_axis_cut" : "numberLineCut",
}
self.connections_for_radiobutton_clicked = {
"radioButton_verbose" : "verbose_toggled",
}
+
+ self.connections_for_combobox_changed = {
+ "point_loc_comboBox" : "attachPoint",
+ }
+
for m_key, m_val in self.connections_for_button_clicked.items():
#print_msg( "Connecting : " + str(m_key) + " and " + str(m_val) )
@@ -4727,12 +5159,17 @@ class WorkFeatureTab():
for m_key, m_val in self.connections_for_radiobutton_clicked.items():
#print_msg( "Connecting : " + str(m_key) + " and " + str(m_val) )
QtCore.QObject.connect(getattr(self.ui, str(m_key)),
- QtCore.SIGNAL(_fromUtf8("clicked(bool)")),globals()[str(m_val)])
+ QtCore.SIGNAL(_fromUtf8("clicked(bool)")),globals()[str(m_val)])
+
+ for m_key, m_val in self.connections_for_combobox_changed.items():
+ #print_msg( "Connecting : " + str(m_key) + " and " + str(m_val) )
+ QtCore.QObject.connect(getattr(self.ui, str(m_key)),
+ QtCore.SIGNAL(_fromUtf8("currentIndexChanged(QString)")),globals()[str(m_val)])
+
self.m_dialog.show()
m_text=str(myRelease)
self.ui.label_release.setText(QtGui.QApplication.translate("Form", m_text, None, QtGui.QApplication.UnicodeUTF8))
-
def quit_clicked(self): # quit
#self.m_dialog.hide()