FEM: better help messages at self weight

This commit is contained in:
Bernd Hahnebach
2020-02-27 15:11:12 +01:00
parent 802832f1dd
commit 72d3a94ce8
2 changed files with 8 additions and 7 deletions

View File

@@ -35,19 +35,19 @@ class _FemConstraintSelfWeight:
"App::PropertyFloat",
"Gravity_x",
"Gravity",
"set the gravity component in the x direction"
"Gravity direction: set the x-component of the normalized gravity vector"
)
obj.addProperty(
"App::PropertyFloat",
"Gravity_y",
"Gravity",
"set the gravity component in the y direction"
"Gravity direction: set the y-component of the normalized gravity vector"
)
obj.addProperty(
"App::PropertyFloat",
"Gravity_z",
"Gravity",
"set the gravity component in the z direction"
"Gravity direction: set the z-component of the normalized gravity vector"
)
obj.Gravity_x = 0.0
obj.Gravity_y = 0.0

View File

@@ -1099,13 +1099,14 @@ class FemInputWriterCcx(writerbase.FemInputWriter):
f.write("** " + selwei_obj.Label + "\n")
f.write("*DLOAD\n")
f.write(
# elset, GRAV, magnitude, direction x, dir y ,dir z
"{},GRAV,{},{},{},{}\n"
.format(
self.ccx_eall,
self.gravity,
selwei_obj.Gravity_x,
selwei_obj.Gravity_y,
selwei_obj.Gravity_z
self.gravity, # actual magnitude of gravity vector
selwei_obj.Gravity_x, # coordinate x of normalized gravity vector
selwei_obj.Gravity_y, # y
selwei_obj.Gravity_z # z
)
)
f.write("\n")