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!

Python Scripting - Find pairs for creating a WireSet

Status
Not open for further replies.

isouto

Structural
Jan 11, 2022
1
Hi,

I have a structure in Abaqus composed by different parts. In order to define connector assignments between elements I need to create Wire features with two nodes, both in the same position but belonging to different parts. in the next script I should be able to find a solution somehow to replace vertices1[3] and vertices2[8] for a more general solution so I do not have to find the nodes 3 and 8.

Thanks in advanced,

modelname = 'Model-1'
assemblyname1 = 'UPRIGHT_2XL31-1'
assemblyname2 = 'CBRA 60402-1'

stepname_initial = 'Initial'

a = mdb.models[modelname].rootAssembly
vertices1 = a.instances[assemblyname1].vertices
vertices2 = a.instances[assemblyname2].vertices

a.WirePolyLine(points=((vertices1[3], vertices2[8]), ), mergeType=IMPRINT, meshable=OFF)

a = mdb.models[modelname].rootAssembly
e1 = a.edges
edges1 = e1[0:1]
a.Set(edges=edges1, name='Wire')

 
Replies continue below

Recommended for you

3 and 8 are the IDs of the vertices, not node numbers.

Based on what criteria shall the script get the vertices when you do not want to use the IDs? Is the user clicking on them in a plugin or do you want to find them based on coordinates? Or something else?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor