Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Keyword error on faces" when handing over tuples to f.findAt function

Status
Not open for further replies.

Simon90

Aerospace
Joined
Jun 14, 2019
Messages
1
Location
DE
I want to make a set with the help of some python code. The coordinates for the set are stored in the list circle list.

The following I tried:
Code:
p = mdb.models['Model-1'].parts['Part-1']
f = p.faces

coordinates_for_faces = tuple()

for i in range(0, len(circleList)):
    tuple_coordinates= (circleList[i].center.x, circleList[i].center.y,0.0)
    coordinates_for_faces = coordinates_for_faces + tuple_coordinates

print("coordinates_for_faces:",  coordinates_for_faces)
faces = f.findAt(*coordinates_for_faces)
p.Set(faces=faces, name='SetOfFibers')

So I stored the coordinates in a tupel. In faces I tried to reference these tupels.

This brings the error "Keyword error on faces" while running the code in python.

I also tried to make a list of tupels and hand over that list of tupels. Attached is the whole code.
 
 https://files.engineering.com/getfile.aspx?folder=a9a7a715-6c9d-40fc-836a-90da6eed3506&file=10_SinglePart_with_intersections_metal_coating_set.py
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top