FEM: Temporary dir is only used by ccxInpWriter, so move it there
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
This commit is contained in:
parent
f83520b2cc
commit
67714c5025
|
@ -247,9 +247,6 @@ class _JobControlTaskPanel:
|
|||
self.CalculixBinary = FreeCAD.getHomePath() + 'bin/ccx.exe'
|
||||
else:
|
||||
self.CalculixBinary = 'ccx'
|
||||
self.TempDir = FreeCAD.ActiveDocument.TransientDir.replace('\\', '/') + '/FemAnl_' + object.Uid[-4:]
|
||||
if not os.path.isdir(self.TempDir):
|
||||
os.mkdir(self.TempDir)
|
||||
|
||||
self.obj = object
|
||||
self.Calculix = QtCore.QProcess()
|
||||
|
@ -376,7 +373,7 @@ class _JobControlTaskPanel:
|
|||
QApplication.setOverrideCursor(Qt.WaitCursor)
|
||||
try:
|
||||
import ccxInpWriter as iw
|
||||
inp_writer = iw.inp_writer(self.TempDir, self.MeshObject, self.MaterialObjects,
|
||||
inp_writer = iw.inp_writer(self.obj, self.MeshObject, self.MaterialObjects,
|
||||
self.FixedObjects, self.ForceObjects, self.PressureObjects)
|
||||
self.base_name = inp_writer.write_calculix_input_file()
|
||||
if self.base_name != "":
|
||||
|
|
|
@ -6,13 +6,16 @@ import sys
|
|||
|
||||
|
||||
class inp_writer:
|
||||
def __init__(self, dir_name, mesh_obj, mat_obj, fixed_obj, force_obj, pressure_obj):
|
||||
def __init__(self, obj, mesh_obj, mat_obj, fixed_obj, force_obj, pressure_obj):
|
||||
self.mesh_object = mesh_obj
|
||||
self.material_objects = mat_obj
|
||||
self.fixed_objects = fixed_obj
|
||||
self.force_objects = force_obj
|
||||
self.pressure_objects = pressure_obj
|
||||
self.base_name = dir_name + '/' + self.mesh_object.Name
|
||||
self.dir_name = FreeCAD.ActiveDocument.TransientDir.replace('\\', '/') + '/FemAnl_' + obj.Uid[-4:]
|
||||
if not os.path.isdir(self.dir_name):
|
||||
os.mkdir(self.dir_name)
|
||||
self.base_name = self.dir_name + '/' + self.mesh_object.Name
|
||||
self.file_name = self.base_name + '.inp'
|
||||
print 'CalculiX .inp file will be written to: ', self.file_name
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user