I'm currently having problem with my python scripting. Like described in the title, I'm trying to add FEM constraint references using python script.
Usually we achieve this by using this code:
Code: Select all
heatflux_constraint.References = [(obj, "Face1"), (obj, "Face2"), (obj, "Face3"), (obj, "Face4"), (obj, "Face5"), (obj, "Face6")]
Code: Select all
heatflux_constraint = ObjectsFem.makeConstraintHeatflux(doc, "FemConstraintHeatflux")
shapes = doc.findObjects("Part::Feature")
for sh in shapes:
for i in range(len(sh.Shape.Faces)):
face = "Face%d" % (i+1)
heatflux_constraint.References = [(obj, face)]
Does anybody have any idea how to fix this problem? I hope I described my problem clearly.
Thanks!
Dio