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

ABAQUS二次开发Python脚本

Abaqus python脚本开发 第三章 各类指令的方法对象变量 (2)的评论1条

Abaqus python脚本开发 第三章 各类指令的方法对象变量 (2)的相关视频课程

Abaqus python脚本开发 第三章 各类指令的方法对象变量 (2)的相关案例教程

3.3.1 DatumPlaneByOffset(...) This method creates a Feature object and a DatumPlane object offset by a specified distance from an existing plane. Path mdb.models[name].rootAssembly.DatumPlaneByOffset
1 命令解释 命令解释:返回包含在指定空间圆柱中的几何元素或者网格元素的对象序列 ,下面是帮助文档中对于这个命令的解释: getByBoundingCylinder(...) This method returns an array of element objects that lie within the specified bounding cylinder. Required argume
例如:cell4 = mdb.models['block'].parts['crankcase'].cells[4],要把part模块中编号为4的体赋值给cell4,就需通过路径mdb→models→part→cells(4号体属性),其中'block'、'crankcase'、分别是model和part的名字。 在草图Sketch中画线: s = mdb.models[' block '].Co
前言 Python具有以下特点。Python语言是一种动态解释型编程语言,其功能强大,简单易学,支持面向对象编程((object-oriented programming),虽然由于其动态性致使程序解释执行速度比编译语言慢,但是随着Python语言的不断优化以及计算机硬件的迅猛发展,Python语言将会受到越来越多用户的关注。Python具有开源、自由等特征。它的简洁性和易用性使程序的开发过程变得
from abaqus import * from abaqusConstants import * import part orphanMeshPart = mdb.models['Model-1'].parts['PART-1-1'] mdb.models['Model-1'].Part2DGeomFrom2DMesh(name='newPart',                      
影响力
粉丝
内容
获赞
收藏
    项目客服
    培训客服
    1 1