Basic Geometry#

The basic geometry commands create geometric entities that are referenced by Part objects, Instance objects, and GeometrySet objects.

Object features#

Cell#

class Cell[source]#

Cells are volumetric regions of geometry.

Notes

This object can be accessed by:

import part
mdb.models[name].parts[name].allInternalSets[name].cells[i]
mdb.models[name].parts[name].allSets[name].cells[i]
mdb.models[name].parts[name].cells[i]
mdb.models[name].parts[name].sets[name].cells[i]
import assembly
mdb.models[name].rootAssembly.allInstances[name].cells[i]
mdb.models[name].rootAssembly.allInstances[name].sets[name].cells[i]
mdb.models[name].rootAssembly.allInternalSets[name].cells[i]
mdb.models[name].rootAssembly.allSets[name].cells[i]
mdb.models[name].rootAssembly.instances[name].cells[i]
mdb.models[name].rootAssembly.instances[name].sets[name].cells[i]
mdb.models[name].rootAssembly.modelInstances[i].sets[name].cells[i]
mdb.models[name].rootAssembly.sets[name].cells[i]
Attributes:
index: int

An Int specifying the index of the cell in the CellArray.

isReferenceRep: Boolean

A Boolean specifying whether the cell belongs to the reference representation of the Part or Instance.

pointOn: float

A tuple of Floats specifying the X-, Y-, and Z-coordinates of a point located on the cell.

featureName: float

A tuple of Floats specifying the name of the feature that created this cell.

instanceName: float

A tuple of Floats specifying the name of the part instance for this cell (if applicable).

Methods

getAdjacentCells()

This method returns an array of cell objects that share at least one face of the cell.

getCADAttributes()

This method returns an array of CAD attribute strings associated with the cell when the part was created from CAD data.

getEdges()

This method returns a sequence consisting of the edge IDs of the edges on the cell.

getElements()

This method returns an array of element objects that are associated with the cell.

getFaces()

This method returns a sequence consisting of the face IDs of the faces which bound the cell.

getNodes()

This method returns an array of node objects that are associated with the cell.

getSize([printResults])

This method returns a Float indicating the volume of the cell.

getVertices()

This method returns a sequence consisting of the vertex IDs of the vertices on the cell.

getAdjacentCells()[source]#

This method returns an array of cell objects that share at least one face of the cell.

Returns:
A CellArray object which is a python:sequence of Cell objects.
getCADAttributes()[source]#

This method returns an array of CAD attribute strings associated with the cell when the part was created from CAD data.

Returns:
An array of String.
getEdges()[source]#

This method returns a sequence consisting of the edge IDs of the edges on the cell.

Returns:
A python:tuple of integers.
getElements()[source]#

This method returns an array of element objects that are associated with the cell.

Returns:
A MeshElementArray object which is a python:sequence of MeshElement objects.
getFaces()[source]#

This method returns a sequence consisting of the face IDs of the faces which bound the cell.

Returns:
A python:tuple of integers.
getNodes()[source]#

This method returns an array of node objects that are associated with the cell.

Returns:
A MeshNodeArray object which is a python:sequence of MeshNode objects.
getSize(printResults: BooleanType = True)[source]#

This method returns a Float indicating the volume of the cell.

Parameters:
printResults

A Boolean that determines whether a verbose output is to be printed. The default is True.

Returns:
A Float.
getVertices()[source]#

This method returns a sequence consisting of the vertex IDs of the vertices on the cell.

Returns:
A python:tuple of integers.

CellArray#

class CellArray(cells: list[Cell])[source]#

The CellArray is a sequence of Cell objects.

Notes

This object can be accessed by:

import part
mdb.models[name].parts[name].allInternalSets[name].cells
mdb.models[name].parts[name].allSets[name].cells
mdb.models[name].parts[name].cells
mdb.models[name].parts[name].sets[name].cells
import assembly
mdb.models[name].rootAssembly.allInstances[name].cells
mdb.models[name].rootAssembly.allInstances[name].sets[name].cells
mdb.models[name].rootAssembly.allInternalSets[name].cells
mdb.models[name].rootAssembly.allSets[name].cells
mdb.models[name].rootAssembly.instances[name].cells
mdb.models[name].rootAssembly.instances[name].sets[name].cells
mdb.models[name].rootAssembly.modelInstances[i].sets[name].cells
mdb.models[name].rootAssembly.sets[name].cells

Methods

findAt(coordinates[, printWarning])

This method returns the object or objects in the CellArray located at the given coordinates.

getBoundingBox()

This method returns a dictionary of two tuples representing minimum and maximum boundary values of the bounding box of the minimum size containing the cell sequence.

getByBoundingBox([xMin, yMin, zMin, xMax, ...])

This method returns an array of cell objects that lie within the specified bounding box.

getByBoundingCylinder(center1, center2, radius)

This method returns an array of cell objects that lie within the specified bounding cylinder.

getByBoundingSphere(center, radius)

This method returns an array of cell objects that lie within the specified bounding sphere.

getExteriorFaces()

This method returns the cell faces on the exterior of the CellArray.

getMask()

This method returns a string specifying the object or objects.

getSequenceFromMask(mask)

This method returns the object or objects in the CellArray identified using the specified mask.

findAt(coordinates: tuple, printWarning: BooleanType = True)[source]#

This method returns the object or objects in the CellArray located at the given coordinates. findAt initially uses the ACIS tolerance of 1E-6. As a result, findAt returns any entity that is at the arbitrary point specified or at a distance of less than 1E-6 from the arbitrary point. If nothing is found, findAt uses the tolerance for imprecise geometry (applicable only for imprecise geometric entities). The arbitrary point must not be shared by a second cell. If two cells intersect or coincide at the arbitrary point, findAt chooses the first cell that it encounters, and you should not rely on the return value being consistent. findAt will always try to find objects among all the cells in the part or assembly instance and will not restrict itself to a subset even if the CellArray represents such subset.

Parameters:
coordinates

A sequence of Floats specifying the X-, Y-, and Z-coordinates of the object to find.findAt returns either a Cell object or a sequence of Cell objects based on the type of input. If coordinates is a sequence of Floats, findAt returns the Cell object at that point. If coordinates is a sequence of sequence of Floats, findAt returns a sequence of Cell objects at the given locations. The sequence of sequence of Floats must be a sequence of sequence of point and normal data, not a sequence of point data. For example,`cells1 = myCrackedBlockInstance.cells.findAt( ((5.5, -8.3, 294.2),), ((12.1, -8.3, 287.8),),

((14.4, -10.4, 285.5),),)`

printWarning

A Boolean specifying whether a message is to be printed to the CLI if no entity is found at the specified location. The default value is True.

Returns:
A Cell object.
getBoundingBox()[source]#

This method returns a dictionary of two tuples representing minimum and maximum boundary values of the bounding box of the minimum size containing the cell sequence.

Returns:
A Dictionary object with the following items:
low: a python:tuple of three floats representing the minimum X-, Y-, and Z-boundary
values of the bounding box.
high: a python:tuple of three floats representing the maximum X-, Y-, and Z-boundary
values of the bounding box.
getByBoundingBox(xMin: str = '', yMin: str = '', zMin: str = '', xMax: str = '', yMax: str = '', zMax: str = '')[source]#

This method returns an array of cell objects that lie within the specified bounding box.

Parameters:
xMin

A float specifying the minimum X-boundary of the bounding box.

yMin

A float specifying the minimum Y-boundary of the bounding box.

zMin

A float specifying the minimum Z-boundary of the bounding box.

xMax

A float specifying the maximum X-boundary of the bounding box.

yMax

A float specifying the maximum Y-boundary of the bounding box.

zMax

A float specifying the maximum Z-boundary of the bounding box.

Returns:
A CellArray object, which is a python:sequence of Cell objects.
getByBoundingCylinder(center1: tuple, center2: tuple, radius: str)[source]#

This method returns an array of cell objects that lie within the specified bounding cylinder.

Parameters:
center1

A tuple of the X-, Y-, and Z-coordinates of the center of the first end of the cylinder.

center2

A tuple of the X-, Y-, and Z-coordinates of the center of the second end of the cylinder.

radius

A float specifying the radius of the cylinder.

Returns:
A CellArray object, which is a python:sequence of Cell objects.
getByBoundingSphere(center: tuple, radius: str)[source]#

This method returns an array of cell objects that lie within the specified bounding sphere.

Parameters:
center

A tuple of the X-, Y-, and Z-coordinates of the center of the sphere.

radius

A float specifying the radius of the sphere.

Returns:
A CellArray object, which is a python:sequence of Cell objects.
getExteriorFaces()[source]#

This method returns the cell faces on the exterior of the CellArray. That is, it returns the faces that are referenced by exactly one of the cells in the sequence.

Returns:
A FaceArray object representing the faces on the exterior of the cells.
getMask()[source]#

This method returns a string specifying the object or objects.

Returns:
A String specifying the object or objects.
getSequenceFromMask(mask: str)[source]#

This method returns the object or objects in the CellArray identified using the specified mask. This command is generated when the JournalOptions are set to COMPRESSEDINDEX. When large number of objects are involved, this method is highly efficient.

Parameters:
mask

A String specifying the object or objects.

Returns:
A Cell object or a python:sequence of Cell objects.
Raises:
  • An exception occurs if the resulting python:sequence is empty.

    Error: The mask results in an empty sequence

Edge#

class Edge[source]#

Edges are one-dimensional regions of geometry.

Notes

This object can be accessed by:

import part
mdb.models[name].parts[name].allInternalSets[name].edges[i]
mdb.models[name].parts[name].allInternalSurfaces[name].edges[i]
mdb.models[name].parts[name].allSets[name].edges[i]
mdb.models[name].parts[name].allSurfaces[name].edges[i]
mdb.models[name].parts[name].edges[i]
mdb.models[name].parts[name].sets[name].edges[i]
mdb.models[name].parts[name].surfaces[name].edges[i]
import assembly
mdb.models[name].rootAssembly.allInstances[name].edges[i]
mdb.models[name].rootAssembly.allInstances[name].sets[name].edges[i]
mdb.models[name].rootAssembly.allInstances[name].surfaces[name].edges[i]
mdb.models[name].rootAssembly.allInternalSets[name].edges[i]
mdb.models[name].rootAssembly.allInternalSurfaces[name].edges[i]
mdb.models[name].rootAssembly.allSets[name].edges[i]
mdb.models[name].rootAssembly.allSurfaces[name].edges[i]
mdb.models[name].rootAssembly.edges[i]
mdb.models[name].rootAssembly.instances[name].edges[i]
mdb.models[name].rootAssembly.instances[name].sets[name].edges[i]
mdb.models[name].rootAssembly.instances[name].surfaces[name].edges[i]
mdb.models[name].rootAssembly.modelInstances[i].edges[i]
mdb.models[name].rootAssembly.modelInstances[i].sets[name].edges[i]
mdb.models[name].rootAssembly.modelInstances[i].surfaces[name].edges[i]
mdb.models[name].rootAssembly.sets[name].edges[i]
mdb.models[name].rootAssembly.surfaces[name].edges[i]
Attributes:
index: int

An Int specifying the index of the edge in the EdgeArray.

isReferenceRep: Boolean

A Boolean specifying whether the edge belongs to the reference representation of the Part or Instance.

pointOn: float

A tuple of Floats specifying the X-, Y-, and Z-coordinates of a point located on the edge.

featureName: float

A tuple of Floats specifying the name of the feature that created this edge.

instanceName: float

A tuple of Floats specifying the name of the part instance for this edge (if applicable).

Methods

getAdjacentEdges()

This method returns an array of Edge objects that share at least one vertex of the edge.

getCurvature(parameter, point)

This method returns curvature information at a location on the edge.

getEdgesByEdgeAngle(angle)

This method returns an array of Edge objects that are obtained by recursively finding adjacent edges that are at an angle of less than or equal to the specified face angle.

getElements()

This method returns an array of element objects that are associated with the edge.

getFaces()

This method returns a sequence consisting of the face ids of the faces which share this edge.

getNodes()

This method returns an array of node objects that are associated with the edge.

getRadius()

This method returns the radius of circular edges.

getSize([printResults])

This method returns a Float indicating the length of the edge.

getVertices()

This method returns a sequence of indices of the vertices that bound this edge.

isTangentFlipped()

This method determines whether the tangent to the edge is flipped from its default direction by the use of the flipTangent method on a Part object.

getAdjacentEdges()[source]#

This method returns an array of Edge objects that share at least one vertex of the edge.

Returns:
An EdgeArray object, which is a python:sequence of Edge objects.
getCurvature(parameter: float, point: tuple)[source]#

This method returns curvature information at a location on the edge.

Parameters:
parameter

A Float specifying the normalized parameter location on the edge where the curvature is to be computed. This argument is mutually exclusive with the argument point.

point

A tuple of X-, Y-, and Z-coordinates of a point at which the curvature is to be computed. If point does not lie on the edge an attempt is made to project it onto the edge and use the projected point.

Returns:
A dictionary with keys ‘evaluationPoint’, ‘curvature’, ‘radius’, and ‘tangent’, where
‘evaluationPoint’ specifies the location at which the curvature was computed;
‘curvature’ specifies the curvature vector at that location; ‘radius’ is the radius of
curvature; and ‘tangent’ specifies the tangent to the edge at that location.
Raises:
The given edge is straight.
getEdgesByEdgeAngle(angle: str)[source]#

This method returns an array of Edge objects that are obtained by recursively finding adjacent edges that are at an angle of less than or equal to the specified face angle.

Parameters:
angle

A float specifying the value of the face angle in degrees.

Returns:
An EdgeArray object, which is a python:sequence of Edgeobjects.
getElements()[source]#

This method returns an array of element objects that are associated with the edge.

Returns:
A MeshElementArray object which is a python:sequence of MeshElement objects.
getFaces()[source]#

This method returns a sequence consisting of the face ids of the faces which share this edge.

Returns:
A python:tuple of integers.
getNodes()[source]#

This method returns an array of node objects that are associated with the edge.

Returns:
A MeshNodeArray object, which is a python:sequence of MeshNode objects.
getRadius()[source]#

This method returns the radius of circular edges.

Returns:
A Float specifying the radius.
Raises:
The given edges is not circular.
getSize(printResults: str = True)[source]#

This method returns a Float indicating the length of the edge.

Parameters:
printResults

A Bool specifying whether verbose output is printed. The default is True.

Returns:
A Float.
getVertices()[source]#

This method returns a sequence of indices of the vertices that bound this edge. The first index refers to the vertex where the normalized curve parameter = 0.0, and the second index refers to the vertex where the normalized curve parameter = 1.0. If the edge is a closed curve, only one vertex index is returned.

Returns:
A python:tuple of integers.
isTangentFlipped()[source]#

This method determines whether the tangent to the edge is flipped from its default direction by the use of the flipTangent method on a Part object.

Returns:
A Boolean value of python:True if the tangent is flipped and python:False if not.

EdgeArray#

class EdgeArray(edges: list[Edge])[source]#

The EdgeArray is a sequence of Edge objects. If the part is modified, then EdgeArray must be updated for that part.

Notes

This object can be accessed by:

import part
mdb.models[name].parts[name].allInternalSets[name].edges
mdb.models[name].parts[name].allInternalSurfaces[name].edges
mdb.models[name].parts[name].allSets[name].edges
mdb.models[name].parts[name].allSurfaces[name].edges
mdb.models[name].parts[name].edges
mdb.models[name].parts[name].sets[name].edges
mdb.models[name].parts[name].surfaces[name].edges
import assembly
mdb.models[name].rootAssembly.allInstances[name].edges
mdb.models[name].rootAssembly.allInstances[name].sets[name].edges
mdb.models[name].rootAssembly.allInstances[name].surfaces[name].edges
mdb.models[name].rootAssembly.allInternalSets[name].edges
mdb.models[name].rootAssembly.allInternalSurfaces[name].edges
mdb.models[name].rootAssembly.allSets[name].edges
mdb.models[name].rootAssembly.allSurfaces[name].edges
mdb.models[name].rootAssembly.edges
mdb.models[name].rootAssembly.instances[name].edges
mdb.models[name].rootAssembly.instances[name].sets[name].edges
mdb.models[name].rootAssembly.instances[name].surfaces[name].edges
mdb.models[name].rootAssembly.modelInstances[i].edges
mdb.models[name].rootAssembly.modelInstances[i].sets[name].edges
mdb.models[name].rootAssembly.modelInstances[i].surfaces[name].edges
mdb.models[name].rootAssembly.sets[name].edges
mdb.models[name].rootAssembly.surfaces[name].edges

Methods

findAt(coordinates[, printWarning])

This method returns the object or objects in the EdgeArray located at the given coordinates.

getBoundingBox()

This method returns a dictionary of two tuples representing minimum and maximum boundary values of the bounding box of the minimum size containing the edge sequence.

getByBoundingBox([xMin, yMin, zMin, xMax, ...])

This method returns an array of edge objects that lie within the specified bounding box.

getByBoundingCylinder(center1, center2, radius)

This method returns an array of edge objects that lie within the specified bounding cylinder.

getByBoundingSphere(center, radius)

This method returns an array of edge objects that lie within the specified bounding sphere.

getClosest(coordinates[, searchTolerance])

This method returns an object or objects in the EdgeArray closest to the given set of points, where the given points need not lie on the edges in the EdgeArray.

getMask()

This method returns a string specifying the object or objects.

getSequenceFromMask(mask)

This method returns the object or objects in the EdgeArray identified using the specified mask.

findAt(coordinates: tuple, printWarning: BooleanType = True)[source]#

This method returns the object or objects in the EdgeArray located at the given coordinates. findAt initially uses the ACIS tolerance of 1E-6. As a result, findAt returns any edge that is at the arbitrary point specified or at a distance of less than 1E-6 from the arbitrary point. If nothing is found, findAt uses the tolerance for imprecise geometry (applicable only for imprecise geometric entities). The arbitrary point must not be shared by a second edge. If two edges intersect or coincide at the arbitrary point, findAt chooses the first edge that it encounters, and you should not rely on the return value being consistent. findAt will always try to find objects among all the edges in the part or assembly instance and will not restrict itself to a subset even if the EdgeArray represents such subset.

Parameters:
coordinates

A sequence of Floats specifying the X-, Y-, and Z-coordinates of the object to find.findAt returns either an Edge object or a sequence of Edge objects based on the type of input.If coordinates is a sequence of Floats, findAt returns the Edge object at that point.If you omit the coordinates keyword argument, findAt accepts as arguments a sequence of sequence of floats in the following format:edges = e.findAt(((20.19686, -169.513997, 27.798593), ), ((19.657627, -167.295749, 27.056402), ), ((18.274129, -157.144741, 25.15218), ))

printWarning

A Boolean specifying whether a message is to be printed to the CLI if no entity is found at the specified location. The default value is True.

Returns:
An Edge object or a python:sequence of Edge objects.
getBoundingBox()[source]#

This method returns a dictionary of two tuples representing minimum and maximum boundary values of the bounding box of the minimum size containing the edge sequence.

Returns:
A Dictionary object with the following items:
low: a python:tuple of three floats representing the minimum X-, Y-, and Z-boundary
values of the bounding box.
high: a python:tuple of three floats representing the maximum X-, Y-, and Z-boundary
values of the bounding box.
getByBoundingBox(xMin: str = '', yMin: str = '', zMin: str = '', xMax: str = '', yMax: str = '', zMax: str = '')[source]#

This method returns an array of edge objects that lie within the specified bounding box.

Parameters:
xMin

A float specifying the minimum X-boundary of the bounding box.

yMin

A float specifying the minimum Y-boundary of the bounding box.

zMin

A float specifying the minimum Z-boundary of the bounding box.

xMax

A float specifying the maximum X-boundary of the bounding box.

yMax

A float specifying the maximum Y-boundary of the bounding box.

zMax

A float specifying the maximum Z-boundary of the bounding box.

Returns:
An EdgeArray object, which is a python:sequence of Edge objects.
getByBoundingCylinder(center1: tuple, center2: tuple, radius: str)[source]#

This method returns an array of edge objects that lie within the specified bounding cylinder.

Parameters:
center1

A tuple of the X-, Y-, and Z-coordinates of the center of the first end of the cylinder.

center2

A tuple of the X-, Y-, and Z-coordinates of the center of the second end of the cylinder.

radius

A float specifying the radius of the cylinder.

Returns:
An EdgeArray object, which is a python:sequence of Edge objects.
getByBoundingSphere(center: tuple, radius: str)[source]#

This method returns an array of edge objects that lie within the specified bounding sphere.

Parameters:
center

A tuple of the X-, Y-, and Z-coordinates of the center of the sphere.

radius

A float specifying the radius of the sphere.

Returns:
An EdgeArray object, which is a python:sequence of Edge objects.
getClosest(coordinates: tuple, searchTolerance: str = '')[source]#

This method returns an object or objects in the EdgeArray closest to the given set of points, where the given points need not lie on the edges in the EdgeArray.

Parameters:
coordinates

A sequence of a sequence of floats, where each sequence of floats describes the X-, Y-, and Z-coordinates of a point.`r=e.getClosest(coordinates=((20.0,20.0,10.0),(-1.0, -15.0, 15),))``r.keys()``[0, 1]``r[0]``(mdb.models[‘Model-1’].parts[‘Part-1’].edges[3],

(15.7090625762939, 20.0, 10.0))`

searchTolerance

A double specifying the distance within which the closest object must lie. The default value is half of the parent part/instance size.

Returns:
This method returns a dictionary object. The key to the dictionary object is the
position of the input point in the python:tuple specified in the coordinates starting at
index 0. If a closest edge could be found then the value is a python:sequence consisting of two
objects. The first object in the python:sequence is an Edge that is close to the input point
referred to by the key. The second object in the python:sequence is a python:sequence of floats that
specifies the X-, Y-, and Z-location of the closest point on the Edge to the given
point. See program listing above.
getMask()[source]#

This method returns a string specifying the object or objects.

Returns:
A String specifying the object or objects.
getSequenceFromMask(mask: str)[source]#

This method returns the object or objects in the EdgeArray identified using the specified mask. This command is generated when the JournalOptions are set to COMPRESSEDINDEX. When a large number of objects are involved, this method is highly efficient.

Parameters:
mask

A String specifying the object or objects.

Returns:
An Edge object or a python:sequence of Edge objects.
Raises:
  • An exception occurs if the resulting python:sequence is empty.

    Error: The mask results in an empty sequence

Face#

class Face[source]#

Faces are two-dimensional regions of geometry.

Notes

This object can be accessed by:

import part
mdb.models[name].parts[name].allInternalSets[name].faces[i]
mdb.models[name].parts[name].allInternalSurfaces[name].faces[i]
mdb.models[name].parts[name].allSets[name].faces[i]
mdb.models[name].parts[name].allSurfaces[name].faces[i]
mdb.models[name].parts[name].faces[i]
mdb.models[name].parts[name].sets[name].faces[i]
mdb.models[name].parts[name].surfaces[name].faces[i]
import assembly
mdb.models[name].rootAssembly.allInstances[name].faces[i]
mdb.models[name].rootAssembly.allInstances[name].sets[name].faces[i]
mdb.models[name].rootAssembly.allInstances[name].surfaces[name].faces[i]
mdb.models[name].rootAssembly.allInternalSets[name].faces[i]
mdb.models[name].rootAssembly.allInternalSurfaces[name].faces[i]
mdb.models[name].rootAssembly.allSets[name].faces[i]
mdb.models[name].rootAssembly.allSurfaces[name].faces[i]
mdb.models[name].rootAssembly.instances[name].faces[i]
mdb.models[name].rootAssembly.instances[name].sets[name].faces[i]
mdb.models[name].rootAssembly.instances[name].surfaces[name].faces[i]
mdb.models[name].rootAssembly.modelInstances[i].sets[name].faces[i]
mdb.models[name].rootAssembly.modelInstances[i].surfaces[name].faces[i]
mdb.models[name].rootAssembly.sets[name].faces[i]
mdb.models[name].rootAssembly.surfaces[name].faces[i]
Attributes:
index: int

An Int specifying the index of the face in the FaceArray.

isReferenceRep: Boolean

A Boolean specifying whether the face belongs to the reference representation of the Part or Instance.

pointOn: float

A tuple of tuples of Floats specifying the coordinates. For a face of a shell pointOn specifies the X-, Y-, and Z-coordinates of a point located on the face and the X-, Y-, and Z-components of the normal to the face.For a face of a solid pointOn specifies the X-, Y-, and Z-coordinates of a point located on the face.

featureName: float

A tuple of Floats specifying the name of the feature that created this face.

instanceName: float

A tuple of Floats specifying the name of the part instance for this face (if applicable).

Methods

getAdjacentFaces()

This method returns an array of face objects that share at least one edge of the face.

getCADAttributes()

This method returns an array of CAD attribute strings associated with the Face when the part was created from CAD data.

getCells()

This method returns a sequence consisting of the cell ids of the cells to which this face belongs.

getCentroid()

This method returns the centroid of a face.

getCurvature(point, uParam, vParam)

This method returns information about the curvature at a location on the face.

getEdges()

This method returns a sequence consisting of the edge ids of the edges on the face.

getElementFaces([faceSide])

This method returns an array of mesh face objects.

getElements()

This method returns an array of element objects that are associated with the face.

getFacesByCurvature()

This method returns an array of Face objects that are obtained by recursively finding adjacent faces that share the same curvature.

getFacesByFaceAngle(angle)

This method returns an array of Face objects that are obtained by recursively finding adjacent faces that are at an angle of less than or equal to the specified angle.

getNodes([faceSide])

This method returns an array of mesh node objects.

getNormal([point])

This method returns the normal to a face at the location specified by the pointOn member.

getSize([printResults])

This method returns a Float indicating the area of the face.

getVertices()

This method returns a sequence consisting of the vertex ids of the vertices of the face.

isNormalFlipped()

This method determines whether the normal to the face is flipped from its default direction by the use of the flipNormal method on a Part object.

getAdjacentFaces()[source]#

This method returns an array of face objects that share at least one edge of the face.

Returns:
A FaceArray object which is a python:sequence of Face objects.
getCADAttributes()[source]#

This method returns an array of CAD attribute strings associated with the Face when the part was created from CAD data.

Returns:
An array of String .
getCells()[source]#

This method returns a sequence consisting of the cell ids of the cells to which this face belongs.

Returns:
A python:tuple of integers.
getCentroid()[source]#

This method returns the centroid of a face.

Returns:
A python:sequence of Floats specifying the X-, Y-, and Z-coordinates of the centroid of
the face.
getCurvature(point: tuple, uParam: float, vParam: float)[source]#

This method returns information about the curvature at a location on the face.

Parameters:
point

A tuple specifying the X-, Y-, and Z coordinates of the point where the curvature is desired. If the point does not lie on the face it will be projected onto the face. This argument and uParam and vParam are mutually exclusive.

uParam

A Float specifying the normalized U parameter value at which the curvature is to be computed. This value must lie between (0,1). vParam must also be specified. This argument is mutually exclusive with point.

vParam

A Float specifying the normalized V parameter value at which the curvature is to be computed. This value must lie between (0,1).

Returns:
A dictionary with keys ‘evaluationPoint’, ‘principalAxis1’, ‘principalAxis2’,
‘curvature1’, ‘curvature2’ and ‘gaussianCurvature’. Where the evaluationPoint specifies
the location at which the curvature was evaluated. ‘principalAxis1’ and ‘principalAxis2’
refer to the vectors specifying the two principal axes of the face. ‘curvature1’ and
‘curvature2’ specify the curvatures along the two principal axes.
getEdges()[source]#

This method returns a sequence consisting of the edge ids of the edges on the face.

Returns:
A python:tuple of integers.
getElementFaces(faceSide: SymbolicConstantType = 'BOTH_SIDES')[source]#

This method returns an array of mesh face objects. Each mesh face object contains the element label and the side of the element that lies on the geometric face.

Parameters:
faceSide

A symbolic constant specifying the side of the geometric face of a solid from which the element faces should be retrieved. Possible values are SIDE1, SIDE2, and BOTH_SIDES. The default value is BOTH_SIDES. For shell faces this option is ignored.

Returns:
A MeshFaceArray object which is a python:sequence of MeshFace objects.
getElements()[source]#

This method returns an array of element objects that are associated with the face.

Returns:
A MeshElementArray object which is a python:sequence of MeshElement objects.
getFacesByCurvature()[source]#

This method returns an array of Face objects that are obtained by recursively finding adjacent faces that share the same curvature.

Returns:
A FaceArray object, which is a python:sequence of Face objects.
getFacesByFaceAngle(angle: str)[source]#

This method returns an array of Face objects that are obtained by recursively finding adjacent faces that are at an angle of less than or equal to the specified angle.

Parameters:
angle

A float specifying the value of the face angle.

Returns:
A FaceArray object, which is a python:sequence of Face objects.
getNodes(faceSide: SymbolicConstantType = 'BOTH_SIDES')[source]#

This method returns an array of mesh node objects. Each mesh node object contains the label of the node that lies on the geometric face.

Parameters:
faceSide

A symbolic constant specifying the side of the geometric face of a solid from which the nodes should be retrieved. Possible values are xo*SIDE1*, SIDE2, and BOTH_SIDES. The default value is BOTH_SIDES. For shell faces and for faces with compatible meshes on either sides this option is ignored. Otherwise, the nodes on the specified side(s) of the face are output.

Returns:
A MeshNodeArray object which is a python:sequence of MeshNode objects.
getNormal(point: tuple = ())[source]#

This method returns the normal to a face at the location specified by the pointOn member. The normal at a different location on the face can be obtained by specifying the optional point argument.

Parameters:
point

A tuple specifying the X-, Y-, and Z coordinates of the point where the normal to the face is desired. If the point does not lie on the face it will be projected onto the face.

Returns:
A python:sequence of Floats specifying the X-, Y-, and Z-components of the normal to the
face.
Raises:
An exception is raised if the optional argument point is provided but the point cannot
be projected onto the face.
getSize(printResults: str = True)[source]#

This method returns a Float indicating the area of the face.

Parameters:
printResults

A Bool specifying whether verbose output is printed. The default value is True.

Returns:
A Float.
getVertices()[source]#

This method returns a sequence consisting of the vertex ids of the vertices of the face.

Returns:
A python:tuple of integers.
isNormalFlipped()[source]#

This method determines whether the normal to the face is flipped from its default direction by the use of the flipNormal method on a Part object.

Returns:
A Boolean value of python:True if the normal is flipped and python:False if not.

FaceArray#

class FaceArray(faces: list[Face])[source]#

The FaceArray is a sequence of Face objects. If the part is modified, then FaceArray must be updated for that part.

Notes

This object can be accessed by:

import part
mdb.models[name].parts[name].allInternalSets[name].faces
mdb.models[name].parts[name].allInternalSurfaces[name].faces
mdb.models[name].parts[name].allSets[name].faces
mdb.models[name].parts[name].allSurfaces[name].faces
mdb.models[name].parts[name].faces
mdb.models[name].parts[name].sets[name].faces
mdb.models[name].parts[name].surfaces[name].faces
import assembly
mdb.models[name].rootAssembly.allInstances[name].faces
mdb.models[name].rootAssembly.allInstances[name].sets[name].faces
mdb.models[name].rootAssembly.allInstances[name].surfaces[name].faces
mdb.models[name].rootAssembly.allInternalSets[name].faces
mdb.models[name].rootAssembly.allInternalSurfaces[name].faces
mdb.models[name].rootAssembly.allSets[name].faces
mdb.models[name].rootAssembly.allSurfaces[name].faces
mdb.models[name].rootAssembly.instances[name].faces
mdb.models[name].rootAssembly.instances[name].sets[name].faces
mdb.models[name].rootAssembly.instances[name].surfaces[name].faces
mdb.models[name].rootAssembly.modelInstances[i].sets[name].faces
mdb.models[name].rootAssembly.modelInstances[i].surfaces[name].faces
mdb.models[name].rootAssembly.sets[name].faces
mdb.models[name].rootAssembly.surfaces[name].faces

Methods

findAt(coordinates[, normal, printWarning])

This method returns the object or objects in the FaceArray located at the given coordinates.

getBoundingBox()

This method returns a dictionary of two tuples representing minimum and maximum boundary values of the bounding box of the minimum size containing the face sequence.

getByBoundingBox([xMin, yMin, zMin, xMax, ...])

This method returns an array of face objects that lie within the specified bounding box.

getByBoundingCylinder(center1, center2, radius)

This method returns an array of face objects that lie within the specified bounding cylinder.

getByBoundingSphere(center, radius)

This method returns an array of face objects that lie within the specified bounding sphere.

getClosest(coordinates[, searchTolerance])

This method returns an object or objects in the FaceArray closest to the given set of points, where the given points need not lie on the faces in the FaceArray.

getExteriorEdges()

This method returns the edges on the exterior of the faces in the FaceArray.

getMask()

This method returns a string specifying the object or objects.

getSequenceFromMask(mask)

This method returns the object or objects in the FaceArray identified using the specified mask.

findAt(coordinates: tuple, normal: tuple = (), printWarning: BooleanType = True)[source]#

This method returns the object or objects in the FaceArray located at the given coordinates. findAt initially uses the ACIS tolerance of 1E-6. As a result, findAt returns any face that is at the arbitrary point specified or at a distance of less than 1E-6 from the arbitrary point. If nothing is found, findAt uses the tolerance for imprecise geometry (applicable only for imprecise geometric entities). The arbitrary point must not be shared by a second face. If two faces intersect or coincide at the arbitrary point, findAt chooses the first face that it encounters, and you should not rely on the return value being consistent. findAt will always try to find objects among all the faces in the part or assembly instance and will not restrict itself to a subset even if the FaceArray represents such subset.

Parameters:
coordinates

A sequence of Floats specifying the X-, Y-, and Z-coordinates of the object to find.findAt returns either a Face object or a sequence of Face objects based on the type of input.If coordinates is a sequence of Floats, findAt returns the Face object at that point.If you omit the coordinates keyword argument, findAt accepts as arguments a sequence of pairs of sequences describing each face’s coordinate and normal, and findAt returns a sequence of Face objects at the given locations. If you omit the coordinates keyword argument, you must also omit the normal argument. faces = f.findAt(((-16.438578, -41.835673, -24.19804), ), ((25.210364, -35.689868, 1.860314), ), ((26.727683, -38.207055, 4.164759), ))

normal

A sequence of Floats specifying the X-, Y-, and Z-components of a vector indicating the face normal.

printWarning

A Boolean specifying whether a message is to be printed to the CLI if no entity is found at the specified location. The default value is True.

Returns:
A Face object.
getBoundingBox()[source]#

This method returns a dictionary of two tuples representing minimum and maximum boundary values of the bounding box of the minimum size containing the face sequence.

Returns:
A Dictionary object with the following items:
low: a python:tuple of three floats representing the minimum X-, Y-, and Z-boundary
values of the bounding box.
high: a python:tuple of three floats representing the maximum X-, Y-, and Z-boundary
values of the bounding box.
getByBoundingBox(xMin: str = '', yMin: str = '', zMin: str = '', xMax: str = '', yMax: str = '', zMax: str = '')[source]#

This method returns an array of face objects that lie within the specified bounding box.

Parameters:
xMin

A float specifying the minimum X-boundary of the bounding box.

yMin

A float specifying the minimum Y-boundary of the bounding box.

zMin

A float specifying the minimum Z-boundary of the bounding box.

xMax

A float specifying the maximum X-boundary of the bounding box.

yMax

A float specifying the maximum Y-boundary of the bounding box.

zMax

A float specifying the maximum Z-boundary of the bounding box.

Returns:
A FaceArray object, which is a python:sequence of Face objects.
getByBoundingCylinder(center1: tuple, center2: tuple, radius: str)[source]#

This method returns an array of face objects that lie within the specified bounding cylinder.

Parameters:
center1

A tuple of the X-, Y-, and Z-coordinates of the center of the first end of the cylinder.

center2

A tuple of the X-, Y-, and Z-coordinates of the center of the second end of the cylinder.

radius

A float specifying the radius of the cylinder.

Returns:
A FaceArray object, which is a python:sequence of Face objects.
getByBoundingSphere(center: tuple, radius: str)[source]#

This method returns an array of face objects that lie within the specified bounding sphere.

Parameters:
center

A tuple of the X-, Y-, and Z-coordinates of the center of the sphere.

radius

A float specifying the radius of the sphere.

Returns:
A FaceArray object, which is a python:sequence of Face objects.
getClosest(coordinates: tuple, searchTolerance: str = '')[source]#

This method returns an object or objects in the FaceArray closest to the given set of points, where the given points need not lie on the faces in the FaceArray.

Parameters:
coordinates

A sequence of a sequence of floats, where each sequence of floats describes the X-, Y-, and Z-coordinates of a point.`r=f.getClosest(coordinates=((20.0,20.0,10.0),(-1.0, -15.0, 15),))``r.keys()``[0, 1]``r[0]``(mdb.models[‘Model-1’].parts[‘Part-1’].faces[0],

(15.7090625762939, 20.0, 10.0))`

searchTolerance

A double specifying the distance within which the closest object must lie. The default value is half of the parent part/instance size.

Returns:
This method returns a dictionary object. The key to the dictionary object is the
position of the input point in the python:tuple specified in the coordinates starting at
index 0. If a closest face could be found then the value is a python:sequence consisting of two
objects. The first object in the python:sequence is a Face that is close to the input point
referred to by the key. The second object in the python:sequence is a python:sequence of floats that
specifies the X-, Y-, and Z-location of the closest point on the Face to the given
point. See program listing above.
Raises:
  • An exception occurs if the resulting python:sequence is empty.

    Error: The mask results in an empty sequence

getExteriorEdges()[source]#

This method returns the edges on the exterior of the faces in the FaceArray. That is, it returns the edges that are referenced by exactly one of the faces in the sequence.

Returns:
An EdgeArray object specifying the exterior edges.
getMask()[source]#

This method returns a string specifying the object or objects.

Returns:
A String specifying the object or objects.
getSequenceFromMask(mask: str)[source]#

This method returns the object or objects in the FaceArray identified using the specified mask. This command is generated when the JournalOptions are set to COMPRESSEDINDEX. When a large number of objects are involved, this method is highly efficient.

Parameters:
mask

A String specifying the object or objects.

Returns:
A Face object or a python:sequence of Face objects.

IgnoredEdge#

class IgnoredEdge[source]#

An IgnoredEdge object is a one-dimensional region of geometry that has been abstracted away by a virtual topology feature.

Notes

This object can be accessed by:

import part
mdb.models[name].parts[name].ignoredEdges[i]
import assembly
mdb.models[name].rootAssembly.allInstances[name].ignoredEdges[i]
mdb.models[name].rootAssembly.instances[name].ignoredEdges[i]
Attributes:
index: int

An Int specifying the index of the IgnoredEdge in the IgnoredEdgeArray.

pointOn: float

A tuple of Floats specifying the X-, Y-, and Z-coordinates of a point located on the edge.

Methods

getCurvature(parameter, point)

This method returns curvature information at a location on the IgnoredEdge object.

getRadius()

This method returns the radius of a circular IgnoredEdge object.

getSize([printResults])

This method returns a Float indicating the length of the edge.

getCurvature(parameter: float, point: tuple)[source]#

This method returns curvature information at a location on the IgnoredEdge object.

Parameters:
parameter

A Float specifying the normalized parameter location on the IgnoredEdge where the curvature is to be computed. This argument is mutually exclusive with the argument point.

point

A tuple of X-, Y-, and Z-coordinates of a point at which the curvature is to be computed. If point does not lie on the IgnoredEdge an attempt is made to project it onto the IgnoredEdge and use the projected point.

Returns:
A dictionary with keys ‘evaluationPoint’, ‘curvature’, ‘radius’, ‘tangent’. Where
‘evaluationPoint’ specifies the location at which the curvature was computed.
‘curvature’ specifies the curvature vector at that location. ‘radius’ is the Radius of
curvature and ‘tangent’ specifies the tangent to the IgnoredEdge at that location.
Raises:
The given IgnoredEdge is straight.
getRadius()[source]#

This method returns the radius of a circular IgnoredEdge object.

Returns:
A Float specifying the radius.
Raises:
The given IgnoredEdge object is not circular.
getSize(printResults: str = True)[source]#

This method returns a Float indicating the length of the edge.

Parameters:
printResults

A Bool specifying whether verbose output is printed. The default is True.

Returns:
A Float.

IgnoredEdgeArray#

class IgnoredEdgeArray[source]#

The IgnoredEdgeArray is a sequence of IgnoredEdge objects. If the part is modified, then IgnoredEdgeArray must be updated for that part.

Notes

This object can be accessed by:

import part
mdb.models[name].parts[name].ignoredEdges
import assembly
mdb.models[name].rootAssembly.allInstances[name].ignoredEdges
mdb.models[name].rootAssembly.instances[name].ignoredEdges

Methods

findAt(coordinates[, printWarning])

This method returns the object or objects in the IgnoredEdgeArray located at the given coordinates.

getClosest(coordinates[, searchTolerance])

This method returns a object or objects in the IgnoredEdgeArray closest to the given set of points, where the given points need not lie on the edges in the IgnoredEdgeArray.

getMask()

This method returns a string specifying the object or objects.

getSequenceFromMask(mask)

This method returns the object or objects in the IgnoredEdgeArray identified using the specified mask.

findAt(coordinates: tuple, printWarning: BooleanType = True)[source]#

This method returns the object or objects in the IgnoredEdgeArray located at the given coordinates. findAt initially uses the ACIS tolerance of 1E-6. As a result, findAt returns any IgnoredEdge that is at the arbitrary point specified or at a distance of less than 1E-6 from the arbitrary point. If nothing is found, findAt uses the tolerance for imprecise geometry (applicable only for imprecise geometric entities). The arbitrary point must not be shared by a second IgnoredEdge. If two IgnoredEdge objects intersect or coincide at the arbitrary point, findAt chooses the first IgnoredEdge that it encounters, and you should not rely on the return value being consistent. findAt will always try to find objects among all the ignored edges in the part or assembly instance and will not restrict itself to a subset even if the IgnoredEdgeArray represents such subset.

Parameters:
coordinates

A sequence of Floats specifying the X-, Y-, and Z-coordinates of the object to find.findAt returns either an IgnoredEdge object or a sequence of IgnoredEdge objects based on the type of input.If coordinates is a sequence of Floats, findAt returns the IgnoredEdge object at that point.If you omit the coordinates keyword argument, findAt accepts as arguments a sequence of sequence of floats in the following format:`ignoredEdges = e.findAt(((20.19686, -169.513997, 27.798593), ),

((19.657627, -167.295749, 27.056402), ), ((18.274129,

-157.144741, 25.15218), ))`

printWarning

A Boolean specifying whether a message is to be printed to the CLI if no entity is found at the specified location. The default value is True.

Returns:
An IgnoredEdge object or a python:sequence of IgnoredEdge objects.
getClosest(coordinates: tuple, searchTolerance: str = '')[source]#

This method returns a object or objects in the IgnoredEdgeArray closest to the given set of points, where the given points need not lie on the edges in the IgnoredEdgeArray.

Parameters:
coordinates

A sequence of a sequence of floats, where each sequence of floats describes the X-, Y-, and Z-coordinates of a point.`r=e.getClosest(coordinates=((20.0,20.0,10.0),(-1.0, -15.0, 15),))``r.keys()``[0, 1]``r[0]``(mdb.models[‘Model-1’].parts[‘Part-1’].ignoredEdges[3],

(15.7090625762939, 20.0, 10.0))`

searchTolerance

A double specifying the distance within which the closest object must lie. The default value is half of the parent part/instance size.

Returns:
This method returns a dictionary object. The key to the dictionary object is the
position of the input point in the python:tuple specified in the coordinates starting at
index 0. If a closest IgnoredEdge could be found then the value is a python:sequence consisting
of two objects. The first object in the python:sequence is an IgnoredEdge that is close to the
input point referred to by the key. The second object in the python:sequence, is a python:sequence of
floats which specify the X-, Y-, and Z-location of the closest point on the
IgnoredEdge to the given point. See program listing above.
Raises:
  • An exception occurs if the resulting python:sequence is empty.

    Error: The mask results in an empty sequence

getMask()[source]#

This method returns a string specifying the object or objects.

Returns:
A String specifying the object or objects.
getSequenceFromMask(mask: str)[source]#

This method returns the object or objects in the IgnoredEdgeArray identified using the specified mask. This command is generated when the JournalOptions are set to COMPRESSEDINDEX. When large number of objects are involved, this method is highly efficient.

Parameters:
mask

A String specifying the object or objects.

Returns:
An IgnoredEdge object or a python:sequence of IgnoredEdge objects.

IgnoredVertex#

class IgnoredVertex[source]#

An IgnoredVertex object is a point region of the geometry that was abstracted away by a virtual topology feature.

Notes

This object can be accessed by:

import part
mdb.models[name].parts[name].ignoredVertices[i]
import assembly
mdb.models[name].rootAssembly.allInstances[name].ignoredVertices[i]
mdb.models[name].rootAssembly.instances[name].ignoredVertices[i]
Attributes:
index: int

An Int specifying the index of the IgnoredVertex in the IgnoredVertexArray.

pointOn: float

A tuple of Floats specifying the X-, Y-, and Z-coordinates of the vertex.

IgnoredVertexArray#

class IgnoredVertexArray[source]#

The IgnoredVertexArray is a sequence of IgnoredVertex objects. If the part is modified, then IgnoredVertexArray must be updated for that part.

Notes

This object can be accessed by:

import part
mdb.models[name].parts[name].ignoredVertices
import assembly
mdb.models[name].rootAssembly.allInstances[name].ignoredVertices
mdb.models[name].rootAssembly.instances[name].ignoredVertices

Methods

findAt(coordinates[, printWarning])

This method returns the object or objects in the IgnoredVertexArray located at the given coordinates.

getClosest(coordinates[, searchTolerance])

This method returns a object or objects in the IgnoredVertexArray closest to the given set of points, where the given points need not lie on the vertices in the IgnoredVertexArray.

getMask()

This method returns a string specifying the object or objects.

getSequenceFromMask(mask)

This method returns the object or objects in the IgnoredVertexArray identified using the specified mask.

findAt(coordinates: tuple, printWarning: BooleanType = True)[source]#

This method returns the object or objects in the IgnoredVertexArray located at the given coordinates. findAt initially uses the ACIS tolerance of 1E-6. As a result, findAt returns any IgnoredVertex object that is at the arbitrary point specified or at a distance of less than 1E-6 from the arbitrary point. If nothing is found, findAt uses the tolerance for imprecise geometry (applicable only for imprecise geometric entities). findAt will always try to find objects among all the ignored vertices in the part or assembly instance and will not restrict itself to a subset even if the IgnoredVertexArray represents such subset.

Parameters:
coordinates

A sequence of Floats specifying the X-, Y-, and Z-coordinates of the object to find.findAt returns either a IgnoredVertex object or a sequence of IgnoredVertex objects based on the type of input.If coordinates is a sequence of Floats, findAt returns the IgnoredVertex object at that point.If you omit the coordinates keyword argument, findAt accepts as arguments a sequence of sequence of floats in the following format:verts = v.findAt(((20.19686, -169.513997, 27.798593), ), ((19.657627, -167.295749, 27.056402), ), ((18.274129, -157.144741, 25.15218), ))

printWarning

A Boolean specifying whether a message is to be printed to the CLI if no entity is found at the specified location. The default value is True.

Returns:
An IgnoredVertex object or a python:sequence of IgnoredVertex objects.
getClosest(coordinates: tuple, searchTolerance: str = '')[source]#

This method returns a object or objects in the IgnoredVertexArray closest to the given set of points, where the given points need not lie on the vertices in the IgnoredVertexArray.

Parameters:
coordinates

A sequence of a sequence of floats, where each sequence of floats describes the X-, Y-, and Z-coordinates of a point.`r=e.getClosest(coordinates=((20.0,20.0,10.0),(-1.0, -15.0, 15),))``r.keys()``[0, 1]``r[0]``(mdb.models[‘Model-1’].parts[‘Part-1’].ignoredVertices[3],

(15.7090625762939, 20.0, 10.0))`

searchTolerance

A double specifying the distance within which the closest object must lie. The default value is half of the parent part/instance size.

Returns:
This method returns a dictionary object. The key to the dictionary object is the
position of the input point in the python:tuple specified in the coordinates starting at
index 0. If a closest IgnoredVertex could be found then the value is a python:sequence
consisting of two objects. The first object in the python:sequence is a IgnoredVertex that is
close to the input point referred to by the key. The second object in the python:sequence, is a
python:sequence of floats which specify the X-, Y-, and Z-location of the IgnoredVertex.
See program listing above.
Raises:
  • An exception occurs if the resulting python:sequence is empty.

    Error: The mask results in an empty sequence

getMask()[source]#

This method returns a string specifying the object or objects.

Returns:
A String specifying the object or objects.
getSequenceFromMask(mask: str)[source]#

This method returns the object or objects in the IgnoredVertexArray identified using the specified mask. This command is generated when the JournalOptions are set to COMPRESSEDINDEX. When large number of objects are involved, this method is highly efficient.

Parameters:
mask

A String specifying the object or objects.

Returns:
An IgnoredVertex object or a python:sequence of IgnoredVertex objects.

InterestingPoint#

class InterestingPoint(edge: Edge, rule: SymbolicConstantType)[source]#

Interesting points can be located at the following: - The middle of an edge. - The middle of an arc. - The center of an arc. An InterestingPoint object is a temporary object and cannot be accessed from the Mdb object.

Notes

This object can be accessed by:

import part
import assembly

ModelDot#

class ModelDot[source]#

The ModelDot object can be used to access an actual MeshNode, ReferencePoint, or ConstrainedSketchVertex object.

Notes

This object can be accessed by:

ModelDotArray#

class ModelDotArray(iterable=(), /)[source]#

Methods

findAt

ReferencePoint#

class ReferencePoint(point: tuple | Vertex | InterestingPoint | MeshNode | Datum, instanceName: str = '')[source]#

The ReferencePoint object has no direct constructor; it is created when a Feature object is created. The ReferencePoint method creates a Feature object that creates a ReferencePoint object.

Notes

This object can be accessed by:

import part
mdb.models[name].parts[name].allInternalSets[name].referencePoints[i]
mdb.models[name].parts[name].allSets[name].referencePoints[i]
mdb.models[name].parts[name].referencePoints[i]
mdb.models[name].parts[name].sets[name].referencePoints[i]
import assembly
mdb.models[name].rootAssembly.allInstances[name].referencePoints[i]
mdb.models[name].rootAssembly.allInstances[name].sets[name].referencePoints[i]
mdb.models[name].rootAssembly.allInternalSets[name].referencePoints[i]
mdb.models[name].rootAssembly.allSets[name].referencePoints[i]
mdb.models[name].rootAssembly.instances[name].referencePoints[i]
mdb.models[name].rootAssembly.instances[name].sets[name].referencePoints[i]
mdb.models[name].rootAssembly.modelInstances[i].referencePoints[i]
mdb.models[name].rootAssembly.modelInstances[i].sets[name].referencePoints[i]
mdb.models[name].rootAssembly.referencePoints[i]
mdb.models[name].rootAssembly.sets[name].referencePoints[i]

ReferencePointArray#

class ReferencePointArray(iterable=(), /)[source]#

Methods

findAt

ReferencePoints#

class ReferencePoints[source]#

Transform#

class Transform[source]#

The MakeSketchTransform method creates a Transform object. The Transform object has no direct constructor. A Transform object is a 4×3 matrix of Floats that represents the transformation from sketch coordinates to assembly coordinates or to part coordinates.

Notes

This object can be accessed by:

import part
import assembly

Methods

matrix()

This method returns the transformation matrix as a tuple of 12 Floats.

matrix()[source]#

This method returns the transformation matrix as a tuple of 12 Floats.

Returns:
A python:tuple of 12 Floats.

Vertex#

class Vertex[source]#

Vertices are point regions of geometry.

Notes

This object can be accessed by:

import part
mdb.models[name].parts[name].allInternalSets[name].vertices[i]
mdb.models[name].parts[name].allSets[name].vertices[i]
mdb.models[name].parts[name].sets[name].vertices[i]
mdb.models[name].parts[name].vertices[i]
import assembly
mdb.models[name].rootAssembly.allInstances[name].sets[name].vertices[i]
mdb.models[name].rootAssembly.allInstances[name].vertices[i]
mdb.models[name].rootAssembly.allInternalSets[name].vertices[i]
mdb.models[name].rootAssembly.allSets[name].vertices[i]
mdb.models[name].rootAssembly.instances[name].sets[name].vertices[i]
mdb.models[name].rootAssembly.instances[name].vertices[i]
mdb.models[name].rootAssembly.modelInstances[i].sets[name].vertices[i]
mdb.models[name].rootAssembly.modelInstances[i].vertices[i]
mdb.models[name].rootAssembly.sets[name].vertices[i]
mdb.models[name].rootAssembly.vertices[i]
Attributes:
index: int

An Int specifying the index of the ConstrainedSketchVertex in the VertexArray.

isReferenceRep: Boolean

A Boolean specifying whether the vertex belongs to the reference representation of the Part or Instance.

pointOn: float

A tuple of Floats specifying the X -, Y -, and Z -coordinates of the vertex.

featureName: float

A tuple of Floats specifying the name of the feature that created this vertex.

instanceName: float

A tuple of Floats specifying the name of the part instance for this vertex (if applicable).

Methods

getEdges()

This method returns a sequence consisting of the edge ids of the edges which share this vertex.

getElements()

This method returns an array of element objects that are associated with the vertex.

getNodes()

This method returns an array of node objects that are associated with the vertex.

getEdges()[source]#

This method returns a sequence consisting of the edge ids of the edges which share this vertex.

Returns:
A python:tuple of integers.
getElements()[source]#

This method returns an array of element objects that are associated with the vertex.

Returns:
A MeshElementArray object which is a python:sequence of MeshElement objects.
getNodes()[source]#

This method returns an array of node objects that are associated with the vertex.

Returns:
A MeshNodeArray object which is a python:sequence of MeshNode objects.

VertexArray#

class VertexArray(vertices: list[Vertex])[source]#

The VertexArray is a sequence of ConstrainedSketchVertex objects. If the part is modified, then VertexArray must be updated for that part.

Notes

This object can be accessed by:

import part
mdb.models[name].parts[name].allInternalSets[name].vertices
mdb.models[name].parts[name].allSets[name].vertices
mdb.models[name].parts[name].sets[name].vertices
mdb.models[name].parts[name].vertices
import assembly
mdb.models[name].rootAssembly.allInstances[name].sets[name].vertices
mdb.models[name].rootAssembly.allInstances[name].vertices
mdb.models[name].rootAssembly.allInternalSets[name].vertices
mdb.models[name].rootAssembly.allSets[name].vertices
mdb.models[name].rootAssembly.instances[name].sets[name].vertices
mdb.models[name].rootAssembly.instances[name].vertices
mdb.models[name].rootAssembly.modelInstances[i].sets[name].vertices
mdb.models[name].rootAssembly.modelInstances[i].vertices
mdb.models[name].rootAssembly.sets[name].vertices
mdb.models[name].rootAssembly.vertices

Methods

findAt(coordinates[, printWarning])

This method returns the object or objects in the VertexArray located at the given coordinates.

getBoundingBox()

This method returns a dictionary of two tuples representing minimum and maximum boundary values of the bounding box of the minimum size containing the vertex sequence.

getByBoundingBox([xMin, yMin, zMin, xMax, ...])

This method returns an array of vertex objects that lie within the specified bounding box.

getByBoundingCylinder(center1, center2, radius)

This method returns an array of vertex objects that lie within the specified bounding cylinder.

getByBoundingSphere(center, radius)

This method returns an array of vertex objects that lie within the specified bounding sphere.

getClosest(coordinates[, searchTolerance])

This method returns a object or objects in the VertexArray closest to the given set of points, where the given points need not lie on ConstrainedSketchVertex objects in the VertexArray.

getMask()

This method returns a string specifying the object or objects.

getSequenceFromMask(mask)

This method returns the object or objects in the VertexArray identified using the specified mask.

findAt(coordinates: tuple, printWarning: BooleanType = True)[source]#

This method returns the object or objects in the VertexArray located at the given coordinates. findAt initially uses the ACIS tolerance of 1E-6. As a result, findAt returns any ConstrainedSketchVertex object that is at the arbitrary point specified or at a distance of less than 1E-6 from the arbitrary point. If nothing is found, findAt uses the tolerance for imprecise geometry (applicable only for imprecise geometric entities). findAt will always try to find objects among all the vertices in the part or assembly instance and will not restrict itself to a subset even if the VertexArray represents such subset.

Parameters:
coordinates

A sequence of Floats specifying the X-, Y-, and Z-coordinates of the object to find.findAt returns either a ConstrainedSketchVertex object or a sequence of ConstrainedSketchVertex objects based on the type of input.If coordinates is a sequence of Floats, findAt returns the ConstrainedSketchVertex object at that point.If you omit the coordinates keyword argument, findAt accepts as arguments a sequence of sequence of floats in the following format:verts = v.findAt(((20.19686, -169.513997, 27.798593), ), ((19.657627, -167.295749, 27.056402), ), ((18.274129, -157.144741, 25.15218), ))

printWarning

A Boolean specifying whether a message is to be printed to the CLI if no entity is found at the specified location. The default value is True.

Returns:
A ConstrainedSketchVertex object or a python:sequence of ConstrainedSketchVertex objects..
getBoundingBox()[source]#

This method returns a dictionary of two tuples representing minimum and maximum boundary values of the bounding box of the minimum size containing the vertex sequence.

Returns:
A Dictionary object with the following items:
low: a python:tuple of three floats representing the minimum X-, Y-, and Z-boundary
values of the bounding box.
high: a python:tuple of three floats representing the maximum X-, Y-, and Z-boundary
values of the bounding box.
getByBoundingBox(xMin: str = '', yMin: str = '', zMin: str = '', xMax: str = '', yMax: str = '', zMax: str = '')[source]#

This method returns an array of vertex objects that lie within the specified bounding box.

Parameters:
xMin

A float specifying the minimum X-boundary of the bounding box.

yMin

A float specifying the minimum Y-boundary of the bounding box.

zMin

A float specifying the minimum Z-boundary of the bounding box.

xMax

A float specifying the maximum X-boundary of the bounding box.

yMax

A float specifying the maximum Y-boundary of the bounding box.

zMax

A float specifying the maximum Z-boundary of the bounding box.

Returns:
A VertexArray object, which is a python:sequence of ConstrainedSketchVertex objects..
getByBoundingCylinder(center1: tuple, center2: tuple, radius: str)[source]#

This method returns an array of vertex objects that lie within the specified bounding cylinder.

Parameters:
center1

A tuple of the X-, Y-, and Z-coordinates of the center of the first end of the cylinder.

center2

A tuple of the X-, Y-, and Z-coordinates of the center of the second end of the cylinder.

radius

A float specifying the radius of the cylinder.

Returns:
A VertexArray object, which is a python:sequence of ConstrainedSketchVertex objects..
getByBoundingSphere(center: tuple, radius: str)[source]#

This method returns an array of vertex objects that lie within the specified bounding sphere.

Parameters:
center

A tuple of the X-, Y-, and Z-coordinates of the center of the sphere.

radius

A float specifying the radius of the sphere.

Returns:
A VertexArray object, which is a python:sequence of ConstrainedSketchVertex objects..
getClosest(coordinates: tuple, searchTolerance: str = '')[source]#

This method returns a object or objects in the VertexArray closest to the given set of points, where the given points need not lie on ConstrainedSketchVertex objects in the VertexArray.

Parameters:
coordinates

A sequence of a sequence of floats, where each sequence of floats describes the X-, Y-, and Z-coordinates of a point.`r=v.getClosest(coordinates=((20.0,20.0,10.0),(-1.0, -15.0, 15),))``r.keys()``[0, 1]``r[0]``(mdb.models[‘Model-1’].parts[‘Part-1’].vertices[0], (15.7090625762939, 29.1666641235352, 20.0))`

searchTolerance

A double specifying the distance within which the closest object must lie. The default value is half of the parent part/instance size.

Returns:
This method returns a dictionary object. The key to the dictionary object is the
position of the input point in the python:tuple specified in the coordinates starting at
index 0. If a closest vertex could be found then the value is a python:sequence consisting of
two objects. The first object in the python:sequence is a ConstrainedSketchVertex that is close to the input
point referred to by the key. The second object in the python:sequence is a python:sequence of floats
that specifies the X-, Y-, and Z-location of the ConstrainedSketchVertex. See program listing
above.
Raises:
  • An exception occurs if the resulting python:sequence is empty.

    Error: The mask results in an empty sequence

getMask()[source]#

This method returns a string specifying the object or objects.

Returns:
A String specifying the object or objects.
getSequenceFromMask(mask: str)[source]#

This method returns the object or objects in the VertexArray identified using the specified mask. This command is generated when the JournalOptions are set to COMPRESSEDINDEX. When a large number of objects are involved, this method is highly efficient.

Parameters:
mask

A String specifying the object or objects.

Returns:
A ConstrainedSketchVertex object or a python:sequence of ConstrainedSketchVertex objects..