diff --git a/WorkFeature/Doc/WF_releasesDocumentation.pdf b/WorkFeature/Doc/WF_releasesDocumentation.pdf
index 7eae71b..9e3328c 100644
Binary files a/WorkFeature/Doc/WF_releasesDocumentation.pdf and b/WorkFeature/Doc/WF_releasesDocumentation.pdf differ
diff --git a/WorkFeature/Ui/WFGui_2015.py b/WorkFeature/Ui/WFGui_2015.py
index f04e200..13fb09c 100644
--- a/WorkFeature/Ui/WFGui_2015.py
+++ b/WorkFeature/Ui/WFGui_2015.py
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'WFGui_2015.ui'
#
-# Created: Wed Nov 4 07:10:00 2015
+# Created: Sat Nov 7 20:09:36 2015
# by: PySide UI code generator 4.11.2
#
# WARNING! All changes made in this file will be lost!
@@ -2321,7 +2321,7 @@ class Ui_Form(object):
self.gridLayout_34.addLayout(self.horizontalLayout_43, 1, 0, 1, 1)
self.retranslateUi(Form)
- self.tabWidget_7.setCurrentIndex(0)
+ self.tabWidget_7.setCurrentIndex(4)
self.point_loc_comboBox.setCurrentIndex(1)
self.tabWidget_8.setCurrentIndex(0)
self.transition_comboBox.setCurrentIndex(2)
@@ -2475,7 +2475,9 @@ class Ui_Form(object):
self.button_object_axis.setText(_translate("Form", "Object(s) X, Y, Z Axes", None))
self.button_twopoints_axis.setToolTip(_translate("Form", "Create an Axis crossing 2 Points.", None))
self.button_twopoints_axis.setText(_translate("Form", "Two Points Axis", None))
- self.extension_twopoints_axis.setToolTip(_translate("Form", "Distance for the extensions on extrema", None))
+ self.extension_twopoints_axis.setToolTip(_translate("Form", "Distance for the extensions on extrema.\n"
+"Positive values will enlarge the Axis.\n"
+"Negative values will start to shrink it (then reverse when middle reached). ", None))
self.extension_twopoints_axis.setText(_translate("Form", "0.0", None))
self.button_Npoints_axis.setToolTip(_translate("Form", "Axis=(Points):\n"
"Create a \"best fit\" line from a set of points using Singular Value Decomposition..\n"
@@ -2515,8 +2517,12 @@ class Ui_Form(object):
"(These selections can also be done into the Combined View)", None))
self.button_face_normal.setText(_translate("Form", "Face Normal", None))
self.extension_face_normal.setToolTip(_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))
+" If zero In case of cylinder axis the extension will be a percentage (10%) of the object length.\n"
+" If zero and plane of face Normal, the extension will be 10 units.\n"
+"\n"
+"For \"Cylinder Axis\", \"Planes Axes\" and \"Face Normal\"\n"
+" Positive values will enlarge the Axis toward OUTSIDE of the Face Object;\n"
+" Negative values will enlarge the Axis toward INSIDE of the Face Object.", None))
self.extension_face_normal.setText(_translate("Form", "0.0", None))
self.button_point_line_axis.setToolTip(_translate("Form", "Create an Axis Parallel to an Axis (as Direction) and crossing a Point.\n"
"- Select one Axis and one (or several) Point(s) NOT on the previous Axis.\n"
@@ -2536,7 +2542,9 @@ class Ui_Form(object):
self.button_line_point_axis.setToolTip(_translate("Form", "Create an Axis Perpendicular to an Axis and crossing a Point\n"
"-Select one Axis and one (or several) Point(s) NOT on the previous Axis.", None))
self.button_line_point_axis.setText(_translate("Form", "Axis=(Axis,Point)", None))
- self.extension_line_point_axis.setToolTip(_translate("Form", "Distance for the extensions on extrema.", None))
+ self.extension_line_point_axis.setToolTip(_translate("Form", "Distance for the extensions on extrema.\n"
+"Positive values will enlarge the Axis.\n"
+"Negative values will start to shrink it (then reverse when middle reached). ", None))
self.extension_line_point_axis.setText(_translate("Form", "0.0", None))
self.button_twolines_axis.setToolTip(_translate("Form", "Create an Axis between two Axes.\n"
"-Select two Axes.", None))
@@ -2631,7 +2639,11 @@ class Ui_Form(object):
"NB: \n"
" - The percentage of the extension can be defined first.", None))
self.button_extension_axis.setText(_translate("Form", "Enlarge(Axis)", None))
- self.extension_axis.setToolTip(_translate("Form", "Extension of the Line in percentage.", None))
+ self.extension_axis.setToolTip(_translate("Form", "Extension of the Line in percentage of original length of the Line.\n"
+"If the extension is 50% it means that each side is extended with 25% length.\n"
+"\n"
+"Positive values will enlarge the Axis.\n"
+"Negative values will start to shrink it. ", None))
self.extension_axis.setText(_translate("Form", "50.0", None))
self.button_click_for_axis.setToolTip(_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"
diff --git a/WorkFeature/Ui/WFGui_2015.ui b/WorkFeature/Ui/WFGui_2015.ui
index 14bfa63..f3f6d99 100644
--- a/WorkFeature/Ui/WFGui_2015.ui
+++ b/WorkFeature/Ui/WFGui_2015.ui
@@ -57,7 +57,7 @@
QTabWidget::West
- 0
+ 4
@@ -921,7 +921,9 @@ Then click on this button.
- Distance for the extensions on extrema
+ Distance for the extensions on extrema.
+Positive values will enlarge the Axis.
+Negative values will start to shrink it (then reverse when middle reached).
0.0
@@ -1106,8 +1108,12 @@ To create several Normal of the face:
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.
+ If zero In case of cylinder axis the extension will be a percentage (10%) of the object length.
+ If zero and plane of face Normal, the extension will be 10 units.
+
+For "Cylinder Axis", "Planes Axes" and "Face Normal"
+ Positive values will enlarge the Axis toward OUTSIDE of the Face Object;
+ Negative values will enlarge the Axis toward INSIDE of the Face Object.
0.0
@@ -1253,7 +1259,9 @@ End of the Axis.
- Distance for the extensions on extrema.
+ Distance for the extensions on extrema.
+Positive values will enlarge the Axis.
+Negative values will start to shrink it (then reverse when middle reached).
0.0
@@ -1775,7 +1783,11 @@ NB:
- Extension of the Line in percentage.
+ Extension of the Line in percentage of original length of the Line.
+If the extension is 50% it means that each side is extended with 25% length.
+
+Positive values will enlarge the Axis.
+Negative values will start to shrink it.
50.0
diff --git a/WorkFeature/WFGui_2015.py b/WorkFeature/WFGui_2015.py
index f04e200..13fb09c 100644
--- a/WorkFeature/WFGui_2015.py
+++ b/WorkFeature/WFGui_2015.py
@@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'WFGui_2015.ui'
#
-# Created: Wed Nov 4 07:10:00 2015
+# Created: Sat Nov 7 20:09:36 2015
# by: PySide UI code generator 4.11.2
#
# WARNING! All changes made in this file will be lost!
@@ -2321,7 +2321,7 @@ class Ui_Form(object):
self.gridLayout_34.addLayout(self.horizontalLayout_43, 1, 0, 1, 1)
self.retranslateUi(Form)
- self.tabWidget_7.setCurrentIndex(0)
+ self.tabWidget_7.setCurrentIndex(4)
self.point_loc_comboBox.setCurrentIndex(1)
self.tabWidget_8.setCurrentIndex(0)
self.transition_comboBox.setCurrentIndex(2)
@@ -2475,7 +2475,9 @@ class Ui_Form(object):
self.button_object_axis.setText(_translate("Form", "Object(s) X, Y, Z Axes", None))
self.button_twopoints_axis.setToolTip(_translate("Form", "Create an Axis crossing 2 Points.", None))
self.button_twopoints_axis.setText(_translate("Form", "Two Points Axis", None))
- self.extension_twopoints_axis.setToolTip(_translate("Form", "Distance for the extensions on extrema", None))
+ self.extension_twopoints_axis.setToolTip(_translate("Form", "Distance for the extensions on extrema.\n"
+"Positive values will enlarge the Axis.\n"
+"Negative values will start to shrink it (then reverse when middle reached). ", None))
self.extension_twopoints_axis.setText(_translate("Form", "0.0", None))
self.button_Npoints_axis.setToolTip(_translate("Form", "Axis=(Points):\n"
"Create a \"best fit\" line from a set of points using Singular Value Decomposition..\n"
@@ -2515,8 +2517,12 @@ class Ui_Form(object):
"(These selections can also be done into the Combined View)", None))
self.button_face_normal.setText(_translate("Form", "Face Normal", None))
self.extension_face_normal.setToolTip(_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))
+" If zero In case of cylinder axis the extension will be a percentage (10%) of the object length.\n"
+" If zero and plane of face Normal, the extension will be 10 units.\n"
+"\n"
+"For \"Cylinder Axis\", \"Planes Axes\" and \"Face Normal\"\n"
+" Positive values will enlarge the Axis toward OUTSIDE of the Face Object;\n"
+" Negative values will enlarge the Axis toward INSIDE of the Face Object.", None))
self.extension_face_normal.setText(_translate("Form", "0.0", None))
self.button_point_line_axis.setToolTip(_translate("Form", "Create an Axis Parallel to an Axis (as Direction) and crossing a Point.\n"
"- Select one Axis and one (or several) Point(s) NOT on the previous Axis.\n"
@@ -2536,7 +2542,9 @@ class Ui_Form(object):
self.button_line_point_axis.setToolTip(_translate("Form", "Create an Axis Perpendicular to an Axis and crossing a Point\n"
"-Select one Axis and one (or several) Point(s) NOT on the previous Axis.", None))
self.button_line_point_axis.setText(_translate("Form", "Axis=(Axis,Point)", None))
- self.extension_line_point_axis.setToolTip(_translate("Form", "Distance for the extensions on extrema.", None))
+ self.extension_line_point_axis.setToolTip(_translate("Form", "Distance for the extensions on extrema.\n"
+"Positive values will enlarge the Axis.\n"
+"Negative values will start to shrink it (then reverse when middle reached). ", None))
self.extension_line_point_axis.setText(_translate("Form", "0.0", None))
self.button_twolines_axis.setToolTip(_translate("Form", "Create an Axis between two Axes.\n"
"-Select two Axes.", None))
@@ -2631,7 +2639,11 @@ class Ui_Form(object):
"NB: \n"
" - The percentage of the extension can be defined first.", None))
self.button_extension_axis.setText(_translate("Form", "Enlarge(Axis)", None))
- self.extension_axis.setToolTip(_translate("Form", "Extension of the Line in percentage.", None))
+ self.extension_axis.setToolTip(_translate("Form", "Extension of the Line in percentage of original length of the Line.\n"
+"If the extension is 50% it means that each side is extended with 25% length.\n"
+"\n"
+"Positive values will enlarge the Axis.\n"
+"Negative values will start to shrink it. ", None))
self.extension_axis.setText(_translate("Form", "50.0", None))
self.button_click_for_axis.setToolTip(_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"
diff --git a/WorkFeature/WF_2015.py b/WorkFeature/WF_2015.py
index 76540ee..1f9d8a1 100644
--- a/WorkFeature/WF_2015.py
+++ b/WorkFeature/WF_2015.py
@@ -64,7 +64,7 @@ from WF_Utils_2015 import *
from WF_ObjParCurve_2015 import *
global myRelease
-myRelease = "2015_10_20"
+myRelease = "2015_11_08"
import os.path
import time
@@ -3450,7 +3450,9 @@ def plot_2PointsAxis():
Axis_E2 = Axis_A - Axis_dir.normalize().multiply(m_extensionTwoPointsAxis)
else:
Axis_E2 = Axis_A + Axis_dir.normalize().multiply(m_extensionTwoPointsAxis)
-
+ if Axis_E1 == Axis_E2:
+ Axis_E1 = Axis_E1 + Axis_dir.multiply(0.1)
+ Axis_E2 = Axis_E2 - Axis_dir.multiply(0.9)
Axis_User_Name, axis = plot_axis(Axis_E1, Axis_E2, part, name)
print_msg(str(Axis_User_Name) + result_msg )
@@ -3605,14 +3607,21 @@ def plot_cylinderAxis():
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
+ Axis_dir_norm = Axis_dir_norm.multiply(abs(m_extensionFaceNormal))
+ if m_extensionFaceNormal > 0.0:
+ Axis_E1 = Axis_B + Axis_dir_norm
+ Axis_E2 = Axis_A - Axis_dir_norm
+ else :
+ 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)
-
+ if Axis_E1 == Axis_E2:
+ Axis_E1 = Axis_E1 + Axis_dir.multiply(0.1)
+ Axis_E2 = Axis_E2 - Axis_dir.multiply(0.9)
+
Axis_User_Name, axis = plot_axis(Axis_E1, Axis_E2, part, name)
print_msg(str(Axis_User_Name) + result_msg )
@@ -4087,6 +4096,9 @@ def plot_linePointAxis():
else:
Axis_E2 = Vector_T + Axis_dir.normalize().multiply(m_extensionLinePointAxis)
+ if Axis_E1 == Axis_E2:
+ Axis_E1 = Axis_E1 + Axis_dir.multiply(0.1)
+ Axis_E2 = Axis_E2 - Axis_dir.multiply(0.9)
Axis_User_Name, axis = plot_axis(Axis_E1, Axis_E2, part, name)
print_msg(str(Axis_User_Name) + result_msg )
@@ -4400,7 +4412,7 @@ def extensionAxis(value):
m_extensionAxis = float(value)
print_msg("New Axis extension is :" + str(m_extensionAxis))
except ValueError:
- printError_msg("Axis extension must be valid number 5percentage)!")
+ printError_msg("Axis extension must be valid number percentage)!")
def plot_extensionAxis():
@@ -4433,11 +4445,15 @@ def plot_extensionAxis():
print_point(Point_A, msg="Selected_Edge.Vertexes[0] Point_A : ")
print_point(Point_B, msg="Selected_Edge.Vertexes[-1] Point_B : ")
AB_Vector = Point_B.sub(Point_A)
- demi_add_length = Selected_Edge.Length * ((m_extensionAxis/50))
+ demi_add_length = Selected_Edge.Length * ((m_extensionAxis/200))
+ print_msg("demi_add_length=" + str(demi_add_length))
add_Vector = AB_Vector.normalize().multiply(demi_add_length)
Point_A = Point_A.sub(add_Vector)
Point_B = Point_B.add(add_Vector)
+ if Point_A == Point_B:
+ Point_A = Point_A.sub(add_Vector.multiply(0.1))
+ Point_B = Point_B.add(add_Vector.multiply(0.9))
Axis_User_Name, axis = plot_axis(Point_A, Point_B, part, name)
print_msg(str(Axis_User_Name) + result_msg )
@@ -5064,7 +5080,7 @@ def edgeToSketch(edges, sketch):
geoList.append(Part.Line(Projection1,Projection3))
return_edges.append(Part.Line(Projection2,Projection4))
num_edge = num_edge + 1
- m_sketch.addGeometry(geoList)
+ m_sketch.addGeometry(geoList)
return num_edge, return_edges, num_point, return_points
@@ -7774,7 +7790,6 @@ def plot_sectionSweep():
if msg != 0:
print_msg("03-Get the list of sections in case of first section is a Compound")
- print_msg(m_msg)
print_msg("m_sections = " + str(m_sections))
# Loop on sections