Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

getByBoundingBox command

Status
Not open for further replies.

HayaNaji

Marine/Ocean
Jun 9, 2016
14
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
Capture_ldnqhh.png


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
 
Replies continue below

Recommended for you

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?
 
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?
 
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!
 
Could it be because the face has a little curvature, it's not plane?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor