Abaqus python脚本开发 第三章 各类指令的方法对象变量 (2)
3.2 Basic geometry commands
3.2.1 EdgeArray object
The EdgeArray is a sequence of Edge objects. If the part is modified, then EdgeArray must be updated for that part.
Access
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.edges mdb.models[name].rootAssembly.allinstances.sets[name].edges mdb.models[name].rootAssembly.allinstances.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
3.2.1.1 findAt(...)
This method returns the object or objects in the EdgeArray located at the given coordinates.
Required argument
coordinates
Optional argument
printWarning
def Find_edges_by_coordinates(My_mdb,My_instance,coordinate_seq1,coordinate_seq2): e=mdb.models[My_mdb].rootAssembly.instances[My_instance].edges My_edges=e.findAt((coordinate_seq1,),(coordinate_seq2,)) return My_edges
3.2.1.2 getClosest(...)
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.
Required argument
coordinates
Optional argument
searchTolerance
getByBoundingBox(...)
This method returns an array of edge objects that lie within the specified bounding box.
Optional arguments
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.
def Get_edges_by_BoundingBox(My_mdb,My_instance,y_Max,y_Min): e=mdb.models[My_mdb].rootAssembly.instances[My_instance].edges My_edges=e.getByBoundingBox(y_Max,y_Min) return My_edges
7.4.6 getByBoundingCylinder(...)
This method returns an array of edge objects that lie within the specified bounding cylinder.
Required arguments
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.
def Get_edges_by_BoundingCylinder(My_mdb,My_instance,center1,center2,radius): e=mdb.models[My_mdb].rootAssembly.instances[My_instance].edges My_edges=e.getByBoundingCylinder(center1,center2,radius) return My_edges
7.4.7 getByBoundingSphere(...)
This method returns an array of edge objects that lie within the specified bounding sphere.
Required arguments
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.
def Get_edges_by_BoundingSphere(My_mdb,My_instance,center,radius): e=mdb.models[My_mdb].rootAssembly.instances[My_instance].edges My_edges=e.getByBoundingCylinder(center,radius) return My_edges
欢迎收藏转发!
Abaqus Python脚本开发持续更新中
微信公众号:山石结构
Bilibili:happyleo7