FEM: add icons for clear mesh and mesh info command
This commit is contained in:
@@ -25,10 +25,12 @@
|
||||
<file>icons/fem-control-solver.svg</file>
|
||||
<file>icons/fem-cylinder.svg</file>
|
||||
<file>icons/fem-data.png</file>
|
||||
<file>icons/fem-femmesh-clear-mesh.svg</file>
|
||||
<file>icons/fem-femmesh-create-node-by-poly.svg</file>
|
||||
<file>icons/fem-femmesh-from-shape.svg</file>
|
||||
<file>icons/fem-femmesh-gmsh-from-shape.svg</file>
|
||||
<file>icons/fem-femmesh-netgen-from-shape.svg</file>
|
||||
<file>icons/fem-femmesh-print-info.svg</file>
|
||||
<file>icons/fem-femmesh-region.svg</file>
|
||||
<file>icons/fem-femmesh-to-mesh.svg</file>
|
||||
<file>icons/fem-frequency-analysis.svg</file>
|
||||
|
||||
120
src/Mod/Fem/Gui/Resources/icons/fem-femmesh-clear-mesh.svg
Normal file
120
src/Mod/Fem/Gui/Resources/icons/fem-femmesh-clear-mesh.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 5.4 KiB |
119
src/Mod/Fem/Gui/Resources/icons/fem-femmesh-print-info.svg
Normal file
119
src/Mod/Fem/Gui/Resources/icons/fem-femmesh-print-info.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 271 KiB |
@@ -37,7 +37,7 @@ class _CommandClearMesh(FemCommands):
|
||||
"clear the FEM mesh"
|
||||
def __init__(self):
|
||||
super(_CommandClearMesh, self).__init__()
|
||||
self.resources = {'Pixmap': 'fem-femmesh-from-shape',
|
||||
self.resources = {'Pixmap': 'fem-femmesh-clear-mesh',
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_ClearMesh", "Clear FEM mesh"),
|
||||
# 'Accel': "Z, Z",
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_ClearMesh", "Clear the Mesh of a FEM mesh object")}
|
||||
|
||||
@@ -31,13 +31,14 @@ import FreeCAD
|
||||
from FemCommands import FemCommands
|
||||
import FreeCADGui
|
||||
from PySide import QtCore
|
||||
from PySide import QtGui
|
||||
|
||||
|
||||
class _CommandPrintMeshInfo(FemCommands):
|
||||
"Print FEM mesh info"
|
||||
def __init__(self):
|
||||
super(_CommandPrintMeshInfo, self).__init__()
|
||||
self.resources = {'Pixmap': 'fem-femmesh-from-shape',
|
||||
self.resources = {'Pixmap': 'fem-femmesh-print-info',
|
||||
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_PrintMeshInfo", "Print FEM mesh info"),
|
||||
# 'Accel': "Z, Z",
|
||||
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_PrintMeshInfo", "Print FEM mesh info")}
|
||||
@@ -49,6 +50,10 @@ class _CommandPrintMeshInfo(FemCommands):
|
||||
FreeCAD.ActiveDocument.openTransaction("Print FEM mesh info")
|
||||
FreeCADGui.doCommand("print(App.ActiveDocument." + sel[0].Name + ".FemMesh)")
|
||||
|
||||
FreeCADGui.addModule("PySide")
|
||||
FreeCADGui.doCommand("mesh_info = str(App.ActiveDocument." + sel[0].Name + ".FemMesh)")
|
||||
FreeCADGui.doCommand("PySide.QtGui.QMessageBox.information(None, 'FEM Mesh Info', mesh_info)")
|
||||
|
||||
FreeCADGui.Selection.clearSelection()
|
||||
|
||||
FreeCADGui.addCommand('Fem_PrintMeshInfo',_CommandPrintMeshInfo())
|
||||
|
||||
Reference in New Issue
Block a user