×
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

how to return specific geometries along an edge using python

how to return specific geometries along an edge using python

how to return specific geometries along an edge using python

(OP)
hi all, I am new to abaqus, and sort of a novice when it comes to python. so any help is appreciated.

the end goal of my script is to take 5 geometry points along a named edge. the geometry points need to be evenly spaced along this edge and the edge wont always be a straight edge. I habe figured out how to return some information about the selected edge like the length and what I think is the point where it begins.

my code relating to the edge is below.

# Picks out Edge from User Set 'Set-1'
e = mdb.models['Model A'].parts['Part A'].sets['Set-1'].edges[0]
print ('Edge Details ='+str(e))

#Find Length
l = e.getSize()
print ('Length of Edge='+str(l))

and the results of this are

Edge Details =({'featureName': 'Solid extrude-1', 'index': 1, 'instanceName': None, 'isReferenceRep': False, 'pointOn': ((10.0, 30.0, 5.0),)})
Length of edge = 20
Length of Edge=20.0

so my next challenge which I'm completely stumped with would be taking this edge which wont always be a straight line (not sure if this makes it more complex) and grabbing 5 evenly spaced geometry points on this edge. so I can do some 'stuff' with it.

Any ideas? even a pointer to a place in the script user guide will help.

Many thanks if you take the time to look at the post


RE: how to return specific geometries along an edge using python

From scripting reference guide:

DatumPointByEdgeParam() - 20.1.30. Creates a datum point at normalized length along an edge. Use this five times then query the datums for coordinates.

PartitionEdgeByParam() - 20.1.44. This will split your edge into two, but both will remain in the original set. You would then have to repeat this three more times, making sure you pick the correct edge and fraction each time.

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