FEM: ccx tools task panel and solver run, use new ccx tools class init without analysis

This commit is contained in:
Bernd Hahnebach
2019-03-26 22:17:33 +01:00
committed by wmayer
parent 9b4a6f743f
commit bcbe82de74
2 changed files with 5 additions and 5 deletions

View File

@@ -33,7 +33,6 @@ import FreeCADGui
import FemGui
# for the panel
from femtools import ccxtools
from PySide import QtCore
from PySide import QtGui
from PySide.QtCore import Qt
@@ -98,8 +97,9 @@ class _TaskPanelFemSolverCalculix:
def __init__(self, solver_object):
self.form = FreeCADGui.PySideUic.loadUi(FreeCAD.getHomePath() + "Mod/Fem/Resources/ui/SolverCalculix.ui")
# since open the task panel is only possible with an active analysis, we do not need to pass the analysis. it will be found
self.fea = ccxtools.FemToolsCcx(None, solver_object)
from femtools.ccxtools import CcxTools as ccx
# we do not need to pass the analysis, it will be found on fea init
self.fea = ccx(solver_object)
self.fea.setup_working_dir()
self.fea.setup_ccx()

View File

@@ -58,8 +58,8 @@ def run_fem_solver(solver, working_dir=None):
if solver.Proxy.Type == 'Fem::FemSolverCalculixCcxTools':
App.Console.PrintMessage("CalxuliX ccx tools solver!\n")
from femtools import ccxtools
fea = ccxtools.FemToolsCcx(None, solver)
from femtools.ccxtools import CcxTools as ccx
fea = ccx(solver)
fea.reset_mesh_purge_results_checked()
if working_dir is None:
fea.run()