Search code examples
abaqus

How to get the edge index in ABAQUS


I create a cube and then create a face partition with sketch on the top face of the cube in the script. I want to get all the index of edges which I create in the sketch. Anyone know what should I do?


Solution

  • You can make use of getByBoundingBox(...) command. You can control the entity to select by optional arguments viz. xMin, yMin,zMin,xMax,yMax,zMax. These arguments creates an imaginary cube and selects the entity inside it.

    edgs = mdb.models['Model-1'].parts['Part-1'].edges.getByBoundingBox(xMin=0.0, 
               yMin=0.0,zMin=0.0,xMax1.0,yMax=1.0,zMax=1.0)
    

    Above commend selects the edges within the cube bounded by (0,0,0) and (1,1,1) points.
    Further to get the index of an edge, you can make use of index attribute.

    for edg in edgs:
        print(edg.index)