×
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

getByBoundingBox command

getByBoundingBox command

getByBoundingBox command

(OP)

Hello guys :)
I working on a script to partition a face and I'm using the getByBoundingBox command to select that face
I wrote this script and tried to run it however the feature creation failed


This is my script

mdb.models['Model-1'].parts['sec1'].PartitionFaceByDatumPlane(datumPlane=
mdb.models['Model-1'].parts['sec1'].datums[7], faces=
mdb.models['Model-1'].parts['sec1'].faces.getByBoundingBox(0.53,-0.03,0.0,2.03,-0.03,2.0))

I want to know if there is something wrong with the script abnd how can I fix it, I appreciate if someone can help

Regards

RE: getByBoundingBox command

Can you nest functions like that? Have you tried pulling out the faces= to before you do the partition, then pass it the faces variable rather than doing it directly?

RE: getByBoundingBox command

(OP)
I don't know, I'm new to scripting, and I'm trying to learn to model the ship parts using python scripts
You mean that I can define the faces before I do the partitioning?, can you write a script example please?

RE: getByBoundingBox command

(OP)
I also tried this script

p = mdb.models['Model-1'].parts['sec1']
Face = mdb.models['Model-1'].parts['sec1'].faces.getByBoundingBox(0.53,-0.03,0.0,2.03,-0.03,2.0)
p.PartitionFaceByDatumPlane(datumPlane=mdb.models['Model-1'].parts['sec1'].datums[7], faces=Face)

but I got the same result, Feature Creation failed!

RE: getByBoundingBox command

Is there anything in the Face variable?

RE: getByBoundingBox command

(OP)
Could it be because the face has a little curvature, it's not plane?

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