当前位置:服务支持 >  软件文章 >  Abaqus Python脚本开发第三章:指令方法对象(2)

Abaqus Python脚本开发第三章:指令方法对象(2)

阅读数 7
点赞 0
article_banner

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


免责声明:本文系网络转载或改编,未找到原创作者,版权归原作者所有。如涉及版权,请联系删
相关文章
QR Code
微信扫一扫,欢迎咨询~

联系我们
武汉格发信息技术有限公司
湖北省武汉市经开区科技园西路6号103孵化器
电话:155-2731-8020 座机:027-59821821
邮件:tanzw@gofarlic.com
Copyright © 2023 Gofarsoft Co.,Ltd. 保留所有权利
遇到许可问题?该如何解决!?
评估许可证实际采购量? 
不清楚软件许可证使用数据? 
收到软件厂商律师函!?  
想要少购买点许可证,节省费用? 
收到软件厂商侵权通告!?  
有正版license,但许可证不够用,需要新购? 
联系方式 155-2731-8020
预留信息,一起解决您的问题
* 姓名:
* 手机:

* 公司名称:

姓名不为空

手机不正确

公司不为空