From dca9a25a2bfa754db47b8351f99e0d82eba720dd Mon Sep 17 00:00:00 2001 From: jriegel Date: Thu, 15 Aug 2013 22:50:09 +0200 Subject: [PATCH] Nicer more informative Isostatic dialog --- src/Mod/Fem/Gui/ViewProviderFemMeshPy.xml | 18 ++++++++----- src/Mod/Fem/Gui/ViewProviderFemMeshPyImp.cpp | 19 ++++++++++++++ src/Mod/Machining_Distortion/Isostatic.ui | 25 ++++++------------- .../Machining_Distortion/MachDistIsostatic.py | 18 ++++++++++++- 4 files changed, 55 insertions(+), 25 deletions(-) diff --git a/src/Mod/Fem/Gui/ViewProviderFemMeshPy.xml b/src/Mod/Fem/Gui/ViewProviderFemMeshPy.xml index 871bfb5f2..7d599de19 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemMeshPy.xml +++ b/src/Mod/Fem/Gui/ViewProviderFemMeshPy.xml @@ -20,11 +20,17 @@ - - - Pose of Axis 1 in degrees - - - + + + Pose of Axis 1 in degrees + + + + + + Pose of Axis 1 in degrees + + + diff --git a/src/Mod/Fem/Gui/ViewProviderFemMeshPyImp.cpp b/src/Mod/Fem/Gui/ViewProviderFemMeshPyImp.cpp index dd3b14153..b6fecdd71 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemMeshPyImp.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemMeshPyImp.cpp @@ -38,6 +38,25 @@ void ViewProviderFemMeshPy::setNodeColor(Py::List /*arg*/) throw Py::AttributeError("Not yet implemented"); } +Py::List ViewProviderFemMeshPy::getHighlightedNodes(void) const +{ + //return Py::List(); + throw Py::AttributeError("Not yet implemented"); +} + +void ViewProviderFemMeshPy::setHighlightedNodes(Py::List arg) +{ + /* std::set& nodeSet; + for (Py::List::iterator it = arg.begin(); it != arg.end() && index < 16; ++it) { + nodeSet.i (double)Py::Int(*it); + } + setHighlightNodes*/ + throw Py::AttributeError("Not yet implemented"); + +} + + + PyObject *ViewProviderFemMeshPy::getCustomAttributes(const char* /*attr*/) const { return 0; diff --git a/src/Mod/Machining_Distortion/Isostatic.ui b/src/Mod/Machining_Distortion/Isostatic.ui index 590e7bd5b..59740348e 100644 --- a/src/Mod/Machining_Distortion/Isostatic.ui +++ b/src/Mod/Machining_Distortion/Isostatic.ui @@ -7,30 +7,19 @@ 0 0 228 - 42 + 227 - Form + Isostatic Plane - - - - - Size: - - - - - - - true - - - - + + + true + + diff --git a/src/Mod/Machining_Distortion/MachDistIsostatic.py b/src/Mod/Machining_Distortion/MachDistIsostatic.py index 649d59435..d5b411ce9 100644 --- a/src/Mod/Machining_Distortion/MachDistIsostatic.py +++ b/src/Mod/Machining_Distortion/MachDistIsostatic.py @@ -152,7 +152,7 @@ class _IsostaticTaskPanel: self.form = QtGui.QWidget() self.formUi.setupUi(self.form) self.params = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Machining_Distortion") - + #QtCore.QObject.connect(self.formUi.select_L_file, QtCore.SIGNAL("clicked()"), self.add_L_data) self.femMeshObj.ViewObject.Transparency = 50 @@ -166,6 +166,22 @@ class _IsostaticTaskPanel: def update(self): 'fills the widgets' + OutStr = 'Isostatic Plane:\n' + + IsoNodes = list(self.obj.Nodes) + + AllNodes = self.femMeshObj.FemMesh.Nodes + GridNode1 = AllNodes[IsoNodes[0]] + GridNode2 = AllNodes[IsoNodes[1]] + GridNode3 = AllNodes[IsoNodes[2]] + + OutStr = OutStr + 'Nodes: '+`IsoNodes[0]`+', '+`IsoNodes[1]`+', '+`IsoNodes[2]`+'\n' + OutStr = OutStr + '('+`GridNode1.x`[0:6]+', '+`GridNode1.y`[0:6]+', '+`GridNode1.z`[0:6]+')\n' + OutStr = OutStr + '('+`GridNode2.x`[0:6]+', '+`GridNode2.y`[0:6]+', '+`GridNode2.z`[0:6]+')\n' + OutStr = OutStr + '('+`GridNode3.x`[0:6]+', '+`GridNode3.y`[0:6]+', '+`GridNode3.z`[0:6]+')\n' + + + self.formUi.textEdit.setText(OutStr) return def accept(self):