本文整理汇总了Python中FemTools.FemTools.reset_mesh_deformation方法的典型用法代码示例。如果您正苦于以下问题:Python FemTools.reset_mesh_deformation方法的具体用法?Python FemTools.reset_mesh_deformation怎么用?Python FemTools.reset_mesh_deformation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FemTools.FemTools
的用法示例。
在下文中一共展示了FemTools.reset_mesh_deformation方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: calculixFinished
# 需要导入模块: from FemTools import FemTools [as 别名]
# 或者: from FemTools.FemTools import reset_mesh_deformation [as 别名]
def calculixFinished(self, exitCode):
print "calculixFinished()", exitCode
print self.Calculix.state()
# Restore previous cwd
QtCore.QDir.setCurrent(self.cwd)
self.printCalculiXstdout()
self.Timer.stop()
self.femConsoleMessage("Calculix done!", "#00AA00")
self.form.pushButton_generate.setText("Re-run Calculix")
print "Loading results...."
self.femConsoleMessage("Loading result sets...")
self.form.label_Time.setText('Time: {0:4.1f}: '.format(time.time() - self.Start))
fea = FemTools()
fea.purge_results()
fea.reset_mesh_color()
fea.reset_mesh_deformation()
if os.path.isfile(self.base_name + '.frd'):
QApplication.setOverrideCursor(Qt.WaitCursor)
ccxFrdReader.importFrd(self.base_name + '.frd', FemGui.getActiveAnalysis())
QApplication.restoreOverrideCursor()
self.femConsoleMessage("Loading results done!", "#00AA00")
else:
self.femConsoleMessage("Loading results failed! Results file doesn\'t exist", "#FF0000")
self.form.label_Time.setText('Time: {0:4.1f}: '.format(time.time() - self.Start))
示例2: GetResources
# 需要导入模块: from FemTools import FemTools [as 别名]
# 或者: from FemTools.FemTools import reset_mesh_deformation [as 别名]
class _CommandQuickAnalysis:
def GetResources(self):
return {'Pixmap': 'Fem_Quick_Analysis',
'MenuText': QtCore.QT_TRANSLATE_NOOP("Fem_Quick_Analysis", "Run CalculiX ccx"),
'Accel': "R, C",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Fem_Quick_Analysis", "Write .inp file and run CalculiX ccx")}
def Activated(self):
def load_results(ret_code):
if ret_code == 0:
self.fea.load_results()
self.show_results_on_mesh()
else:
print "CalculiX failed ccx finished with error {}".format(ret_code)
self.fea = FemTools()
self.fea.purge_results()
self.fea.reset_mesh_color()
self.fea.reset_mesh_deformation()
message = self.fea.check_prerequisites()
if message:
QtGui.QMessageBox.critical(None, "Missing prerequisite", message)
return
self.fea.finished.connect(load_results)
QtCore.QThreadPool.globalInstance().start(self.fea)
def show_results_on_mesh(self):
#FIXME proprer mesh refreshing as per FreeCAD.FEM_dialog settings required
# or confirmation that it's safe to call restore_result_dialog
tp = _ResultControlTaskPanel()
tp.restore_result_dialog()
def IsActive(self):
return FreeCADGui.ActiveDocument is not None and FemGui.getActiveAnalysis() is not None
示例3: Activated
# 需要导入模块: from FemTools import FemTools [as 别名]
# 或者: from FemTools.FemTools import reset_mesh_deformation [as 别名]
def Activated(self):
fea = FemTools()
fea.purge_results()
fea.reset_mesh_color()
fea.reset_mesh_deformation()
示例4: restore_initial_result_dialog
# 需要导入模块: from FemTools import FemTools [as 别名]
# 或者: from FemTools.FemTools import reset_mesh_deformation [as 别名]
def restore_initial_result_dialog(self):
FreeCAD.FEM_dialog = {"results_type": "None", "show_disp": False,
"disp_factor": 0, "disp_factor_max": 100}
fea = FemTools()
fea.reset_mesh_color()
fea.reset_mesh_deformation()