This repository has been archived by the owner on Mar 4, 2023. It is now read-only.
/
Cell.py
150 lines (113 loc) · 4.24 KB
/
Cell.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
from abaqusConstants import *
class Cell:
"""Cells are volumetric regions of geometry.
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).
Notes
-----
This object can be accessed by:
.. code-block:: python
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]
"""
# An Int specifying the index of the cell in the CellArray.
index: int = None
# A Boolean specifying whether the cell belongs to the reference representation of the
# Part or Instance.
isReferenceRep: Boolean = OFF
# A tuple of Floats specifying the *X*-, *Y*-, and *Z*-coordinates of a point located on
# the cell.
pointOn: float = None
# A tuple of Floats specifying the name of the feature that created this cell.
featureName: float = None
# A tuple of Floats specifying the name of the part instance for this cell (if
# applicable).
instanceName: float = None
def getSize(self, printResults: Boolean = True):
"""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.
"""
pass
def getFaces(self):
"""This method returns a sequence consisting of the face IDs of the faces which bound the
cell.
Returns
-------
A tuple of integers.
"""
pass
def getEdges(self):
"""This method returns a sequence consisting of the edge IDs of the edges on the cell.
Returns
-------
A tuple of integers.
"""
pass
def getVertices(self):
"""This method returns a sequence consisting of the vertex IDs of the vertices on the cell.
Returns
-------
A tuple of integers.
"""
pass
def getAdjacentCells(self):
"""This method returns an array of cell objects that share at least one face of the cell.
Returns
-------
A CellArray object which is a sequence of Cell objects.
"""
pass
def getNodes(self):
"""This method returns an array of node objects that are associated with the cell.
Returns
-------
A MeshNodeArray object which is a sequence of MeshNode objects.
"""
pass
def getElements(self):
"""This method returns an array of element objects that are associated with the cell.
Returns
-------
A MeshElementArray object which is a sequence of MeshElement objects.
"""
pass
def getCADAttributes(self):
"""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.
"""
pass