- 积分
- 0
- 注册时间
- 2011-6-8
- 仿真币
-
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2015-12-1 16:44:42
|
显示全部楼层
来自 南非
本帖最后由 cellcowboy 于 2015-12-1 12:06 编辑
具体怎么写这两个函数,可以查阅Abaqus帮助文档的编程命令手册“Abaqus Scripting Reference Guide”。你的思路我觉得是可行的,但是应该会出现新的问题,比如你需要寻找这两个函数参量所要求的对象,而对象的选取,又要涉及到相应的命令——或许你可以事先给这些需要被选取的对象命个名。getLength()功能是获取边的长度,其参量应该是边(edges);而getdistance()的功能是点与点的、点与边以及边与边的距离。这两个命令在上面提到的编程手册有比较详细介绍,粘贴如下。
37.1.31 getLength(...)
This method returns the length of a given edge or group of edges.
1.Required argument
edges
A sequence of edge objects whose total length the method will calculate.
2. Optional arguments
None.
3. Return value
A Float specifying the total length.
4. Exceptions
None.
37.1.30 getDistance(...)
Depending on the arguments provided, this method returns one of the following:
The distance between two points.
The minimum distance between a point and an edge.
The minimum distance between two edges.
1. Required arguments
entity1
A Vertex, Datum point, MeshNode, or Edge specifying the first entity from which to measure.
entity2
A Vertex, Datum point, MeshNode, or Edge specifying the second entity to which to measure.
2. Optional arguments
None.
3. Return value
A Float specifying the distance between entity1 and entity2.
4. Exceptions
None.
|
|