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

delete datum points on Abaqus with python script

Status
Not open for further replies.

chourouk

Mechanical
Joined
Sep 15, 2016
Messages
41
Location
FR
Hi,
I have a list of n points a=[[1,2,3],[2,3,4],....] i need to delete this points on Abaqus with python script.
and i have another list of n points b where i want to applicat displacement on this points!
Can you help me please!!!
 
So what's the problem? Through the datum container you can check the coordinates and get the ID and then you can use the ID and delete them from the feature list.

Points for BC have to be reference points, not datum points. Creating them and applying a BC is also not hard. Just work yourself into scripting.
 
for the Bc supper !
but for the deleting points i use this script but i'don't have result:
deletednoeud=[]
for m in range (len(noeud)):
if noeud[m][2]<zmin+1:
deletednoeud=deletednoeud+[noeud[m]]
delnoeud=p.DatumPointByCoordinate(coords=(deletednoeud[0])).id
for m in range (1,len(deletednoeud)):
delnoeud=delnoeud+p.DatumPointByCoordinate(coords=(deletednoeud[m])).id
p.deleteFeatures(('delnoeud',))
 
If it worked, then there are two files in my post. A simple cae file and an example script.
The script deletes all datum points with coord z>5 in the part. That should give you an idea how it can be done.
 
 http://files.engineering.com/getfile.aspx?folder=8c991276-5e6c-4b6d-b426-7d88d96029b0&file=delete_datums.py
thanks for the example but when i applicat them i have a python error KeyError:wire-2 in the line 31 .
 
Since I didn't had any wire in my example, I assume you've tried to use my script on your model.
That was not my intent. It was an example how to work on datum points on part level. Learn from the script and then create one that works for your model.

Use the python interpreter in /CAE to test things. print commands are useful and the TAB key to see further otions.
 
how can i delete the parent feature without deleting its child features?
 
Usually that is not possible, because there is a direct dependency.
 
so do you have another solution for this problem:
1-create n points
2-relate this points with wires
3-define a plan
4-define a cut extrude
5-and finally delete points below the plan
thanks for your help!!
 
If my understanding of your procedure is correct:
That won't work, since all initially selected datums are parents of the wire. So you can't delete any of those datums later.


But...
When you know the coordinates of the points that the wire should pass, why do you use datums to create the wire? Start the wire option and then enter the coordinates directly. Afterwards look into the .rpy file and take the python command to automate that process. With that method you don't need any datums.
 
the problem that i don't know the points that the wire should pass,i have a list of n points that i will relate them with wires if the distance between two points less than a parameter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top