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 TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to return specific geometries along an edge using python

Status
Not open for further replies.

maish449

Mechanical
Joined
May 22, 2015
Messages
2
Location
GB
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


 
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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top