Reputation: 9
Abaqus FEM software, which uses Python, creates its own variable/list types, for example:
a = mdb.models['Model-1'].rootAssembly.instances['Instance-1'].faces
print a
type(a)
['Face object', 'Face object', 'Face object', ...]
type 'FaceArray'
print a[0]:
type(a[0])
({'featureName': 'Name-1', 'index': 6, 'instanceName': 'Name-1', 'isReferenceRep': False, 'pointOn': ((0.0, 0.733333, -0.133333),)})
type 'Face'
When I now initialize x=[]
and add a 'Face object' with x.append(a[2])
, it results in
[mdb.models['Model-1'].rootAssembly.instances['Instance-1'].faces[2]]
instead of
['Face object']
How can I create a new variable of the same format as a?
Upvotes: 0
Views: 368
Reputation: 471
u have to create face array not simple array, then add into your face array Face objects
x = FaceArray()
Upvotes: 0