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!

SET OF FACES

Status
Not open for further replies.

aerospace7

Aerospace
Joined
May 18, 2016
Messages
7
Location
IT
hi all,

first of all sorry for my bad english.
i am finding problems in creating a set with 4 faces. this faces are obtained with the command getByBoundingBox(...). Now the output of this command is a FaceArray object, which is a sequence of Face objects, that i can use for generate a set. I only need the first two elements of this array for generate my Set, and here comes the issues. Abaqus gives me the error: FEATURE CREATION FAILED. where is the error in my script?

facesinthebox=mdb.models['Model-1'].parts['Gruppo Ordinate'].faces.getByBoundingBox(-C2[0]-100,-C4[1],-CMX-wwb/2-Lo,C2[0]+100,C4[1],-CMX-wwb/2)
upperfaces=[]
upperfaces.append(facesinthebox[0])
upperfaces.append(facesinthebox[1])


mdb.models['Model-1'].parts['Gruppo Ordinate'].Set(faces=upperfaces,name='Set-1')

if i use this command:

mdb.models['Model-1'].parts['Gruppo Ordinate'].Set(faces=faceinthebox,name='Set-1')

there is no problems.

if i use this commands:

mdb.models['Model-1'].parts['Gruppo Ordinate'].Set(faces=(faceinthebox[0],faceinthebox[1]),name='Set-1')

still get the same error as before. where am I doing wrong?
 
When you print type(facesinthebox) and type(upperfaces) then you'll see that these are not the same datatypes.
The set command is expecting a face array and not a list. A face array a is Abaqus specific datatype.

You can do it like that:
Code:
p = mdb.models['Model-1'].parts['Part-1']

fib = p.faces.getByBoundingBox(-50,-50,-50,50,50,50)
fib1 = fib[0].index
fib2 = fib[1].index
setfaces = p.faces[fib1:fib1+1]+p.faces[fib2:fib2+1]
p.Set(faces=setfaces, name='Set-1')
 
nice! thank you very much! this quite solved my problem. But now i have a new issues. This faces in the boc are 4. Now i have to create 24 boxes, in which are contained always 4 faces. i just notice that abaqus gives to this 4 faces index at random, so i cant take always the first 2 faces ( [0].[1]). how can i tell to abaqus to create a set only with the 2 faces that have the Z-coord greater among the 4?
 
fib is like a list of faces and when you look at "print fib[0]" you'll find a pointOn information. 'same for each other face. Or you use getCentroid() on each face.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top