- start FreeCADCmd (it ONLY happens in Cmd!)
- run code ...
Code: Select all
import unittest
unittest.TextTestRunner().run(unittest.TestLoader().loadTestsFromName("femtest.testccxtools.TestCcxTools.test_1_static_analysis"))
Code: Select all
Constraint fixed: FemConstraintFixed
Finite element mesh nodes will be retrieved by searching the appropriate nodes in the finite element mesh.
ReferenceShape ... Type: Face, Object name: Box, Object label: Box, Element name: Face1
Unexpected error when writing CalculiX input file: <class 'TypeError'>
E
======================================================================
ERROR: test_1_static_analysis (femtest.testccxtools.TestCcxTools)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/hugo/Documents/dev/freecad/freecadbhb_dev/build/Mod/Fem/femtest/testccxtools.py", line 143, in test_1_static_analysis
error = fea.write_inp_file()
File "/home/hugo/Documents/dev/freecad/freecadbhb_dev/build/Mod/Fem/femtools/ccxtools.py", line 650, in write_inp_file
self.inp_file_name = inp_writer.write_calculix_input_file()
File "/home/hugo/Documents/dev/freecad/freecadbhb_dev/build/Mod/Fem/femsolver/calculix/writer.py", line 113, in write_calculix_input_file
self.write_calculix_one_input_file()
File "/home/hugo/Documents/dev/freecad/freecadbhb_dev/build/Mod/Fem/femsolver/calculix/writer.py", line 143, in write_calculix_one_input_file
self.write_node_sets_constraints_fixed(inpfile)
File "/home/hugo/Documents/dev/freecad/freecadbhb_dev/build/Mod/Fem/femsolver/calculix/writer.py", line 501, in write_node_sets_constraints_fixed
self.get_constraints_fixed_nodes()
File "/home/hugo/Documents/dev/freecad/freecadbhb_dev/build/Mod/Fem/femsolver/writerbase.py", line 133, in get_constraints_fixed_nodes
femobj
File "/home/hugo/Documents/dev/freecad/freecadbhb_dev/build/Mod/Fem/femmesh/meshtools.py", line 48, in get_femnodes_by_femobj_with_references
node_set = get_femnodes_by_references(femmesh, femobj['Object'].References)
File "/home/hugo/Documents/dev/freecad/freecadbhb_dev/build/Mod/Fem/femmesh/meshtools.py", line 84, in get_femnodes_by_references
references_femnodes += get_femnodes_by_refshape(femmesh, ref)
File "/home/hugo/Documents/dev/freecad/freecadbhb_dev/build/Mod/Fem/femmesh/meshtools.py", line 110, in get_femnodes_by_refshape
nodes += femmesh.getNodesByFace(r)
TypeError: argument 1 must be Part.TopoShape, not Part.Face
----------------------------------------------------------------------
Ran 1 test in 0.045s
FAILED (errors=1)
<unittest.runner.TextTestResult run=1 errors=1 failures=0>
>>> >>>