41.4 Set object

If a set spans more than one part instance, the vertex, edge, face, cell, element, and node members return a sequence of sequences for each part instance. Each sequence contains entities from a single instance. For example:

assembly=mdb.models['Transmission'].assembly
clutchElements=assembly.instances['Clutch'].elements
clutchSet=clutchElements[16:18]+clutchElements[78:80]
housingElements=assembly.instances['Housing'].elements
housingSet=housingElements[45:48]
transmissionSet=assembly.Set(name='TransmissionSet',
    elements=(clutchSet, housingSet))
len(transmissionSet.element)=2
transmissionSet.elements[0]=16,17,78,79
transmissionSet.elements[1]=45,46,47

Access
import part
mdb.models[name].parts[name].allInternalSets[name]
mdb.models[name].parts[name].allSets[name]
mdb.models[name].parts[name].sets[name]
import assembly
mdb.models[name].rootAssembly.allInternalSets[name]
mdb.models[name].rootAssembly.allSets[name]
mdb.models[name].rootAssembly.instances[name].sets[name]
mdb.models[name].rootAssembly.sets[name]


41.4.1 Set(...)

This method creates a set from a sequence of objects in a model database.

Path
mdb.models[name].parts[name].Set
mdb.models[name].rootAssembly.Set

Required argument

name

A String specifying the repository key.

Optional arguments

At least one sequence argument must be provided—elements, nodes, vertices, edges, faces, cells, or referencePoints. The arguments xVertices, xEdges, and xFaces are used to exclude lower-dimension entities and to provide finer control on the content of the set. For example, the following statement defines a region enclosing a square face but without two of its edges:

set = mdb.models['Model-1'].rootAssembly.Set(
    name='mySet', faces=f[3:4], xEdges=e[1:3])

nodes

A sequence of MeshNode objects. The default value is None.

elements

A sequence of MeshElement objects. The default value is None.

region

A Region object specifying other objects to be included in the set. The default value is None.

vertices

A sequence of Vertex objects. The default value is None.

edges

A sequence of Edge objects. The default value is None.

faces

A sequence of Face objects. The default value is None.

cells

A sequence of Cell objects. The default value is None.

xVertices

A sequence of Vertex objects that excludes specific vertices from the set. The default value is None.

xEdges

A sequence of Edge objects that excludes specific edges from the set. The default value is None.

xFaces

A sequence of Face objects that excludes specific faces from the set. The default value is None.

referencePoints

A sequence of ReferencePoint objects. The default value is an empty sequence.

skinFaces

A tuple of tuples specifying a skin name and the sequence of faces associated with this skin. Valid only for geometric regions on 3D and 2D parts.

skinEdges

A tuple of tuples specifying a skin name and the sequence of edges associated with this skin. Valid only for geometric regions on Axisymmetric parts.

stringerEdges

A tuple of tuples specifying a stringer name and the sequence of edges associated with this stringer. Valid only for geometric regions on 3D and 2D parts.

Return value

A Set object.

Exceptions

InvalidNameError.


41.4.2 SetByMerge(...)

This method creates a set that is the result of merging two or more sets.

Path
mdb.models[name].parts[name].SetByMerge
mdb.models[name].rootAssembly.SetByMerge

Required arguments

name

A String specifying the repository key.

sets

A sequence of Set objects.

Optional arguments

None.

Return value

A Set object.

Exceptions

InvalidNameError.


41.4.3 SetFromColor(...)

This method creates a set containing faces of the part marked with a specified color attribute. Third-party applications can assign color attributes to faces, and the color attribute can be imported into Abaqus from an ACIS file. You can use this method to create sets only on parts; however, you can access the sets from instances of the parts in the assembly.

Path
mdb.models[name].parts[name].SetFromColor

Required arguments

name

A String specifying the repository key.

color

A sequence of three Ints specifying the RGB color. Values can range from 0 to 255. The first integer is for red, the second for green, and the third for blue. For example, a face colored in yellow is identified by:

color=(255,255,0)

Optional arguments

None.

Return value

A Set object.

Exceptions

InvalidNameError.


41.4.4 SetFromElementLabels(...)

This method creates a set from a sequence of element labels in a model database.

Path
mdb.models[name].parts[name].SetFromElementLabels
mdb.models[name].rootAssembly.SetFromElementLabels

Required arguments

name

A String specifying the repository key.

elementLabels

A sequence of element labels. An element label is a sequence of Int element identifiers. For example, for a part:

elementLabels=(2,3,5,7)
For an assembly:
elementLabels=(('Instance-1', (2,3,5,7)), 
    ('Instance-2', (1,2,3)))

Optional arguments

None.

Return value

A Set object.

Exceptions

InvalidNameError.


41.4.5 SetFromNodeLabels(...)

This method creates a set from a sequence of node labels in a model database.

Path
mdb.models[name].parts[name].SetFromNodeLabels
mdb.models[name].rootAssembly.SetFromNodeLabels

Required arguments

name

A String specifying the repository key.

nodeLabels

A sequence of node labels. A node label is a sequence of Int node identifiers. For example, for a part:

nodeLabels=(2,3,5,7)
For an assembly:
nodeLabels=(('Instance-1', (2,3,5,7)), 
    ('Instance-2', (1,2,3)))

Optional arguments

None.

Return value

A Set object.

Exceptions

InvalidNameError.


41.4.6  Members

The Set object has the following members:

elements
nodes

A MeshNodeArray object.

vertices

A VertexArray object.

edges

An EdgeArray object.

faces

A FaceArray object.

cells

A CellArray object.

referencePoints