×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

SET OF FACES

SET OF FACES

SET OF FACES

(OP)
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?

RE: SET OF FACES

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') 

RE: SET OF FACES

(OP)
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?

RE: SET OF FACES

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources