This is a fix on an error that occurs when you use displacement constraints in the absence of fixed constraints and write a split input file. The cause of the error was the omission of certain lines of code dictating the inclusion of the displacement constraint and the plane rotation constraint node sets in the split input file. The addition of the *INCLUDE statements for the nodes sets of both the aforementioned constraints seems to solve the error.
Line 216 of the original 'FemInputWriterCcx.py' read:
Code: Select all
if self.fixed_objects:
inpfileMain.write('*INCLUDE,INPUT=' + include_name + "_Node_sets.inp \n")
This led to an error being given if there was no fixed constraint present in the analysis and only a displacement and/or planerotation constraint. The addition of the following two 'if' statements seems to fix it. It was added just after the 'if' statement in line 216-217 of 'FemInputWriterCcx.py'
Code: Select all
if self.displacement_objects:
inpfileMain.write('*INCLUDE,INPUT=' + include_name + "_Node_sets.inp \n")
if self.planerotation_objects:
inpfileMain.write('*INCLUDE,INPUT=' + include_name + "_Node_sets.inp \n")
The link to the branch is:
https://github.com/stoflap/FreeCAD/tree/NodeSetFix