I'm trying to get the normal of every face in a surface (EDIT: the surface is extracted from a solid, not a shell). I can't seem to get the face objects though. According to the scripting reference guide this should be the syntax:
mdb.models[name].rootAssembly.instances[name].surfaces[name].faces[i]
I tried this:
femur_instance.surfaces['IMPLANT_SHAFT'].faces[0]
but when trying to get the normal using pointOn[1]
attribute it gave me an attribute error. When I look at the attributes I get this:
['__class__', '__copy__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__getstate__', '__hash__', '__init__', '__lt__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setstate__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_addToCache', '_cache', '_counter', '_id', '_p', '_scdId', 'getId', 'getText', 'name']
the type of the returned object is: 'symbolicConstant'
What am I doing wrong?
EDIT: femur_instance
was defined as, odb.rootAssembly.instances['FEMUR_SHAFT_1']
which caused the error, see answer.