Difference between revisions of "Path Command"
Line 5: | Line 5: | ||
In scripted files, the <tt>Path</tt> command has two forms. | In scripted files, the <tt>Path</tt> command has two forms. | ||
== Path Command == | ==== Path Command ==== | ||
The first form is to define a new path: | The first form is to define a new path: | ||
Line 31: | Line 31: | ||
Within the <tt>Path</tt> block, there are a series of [[Keypoint Command|<tt>Keypoint</tt> and <tt>Keypoints</tt> commands]] that define new keypoints (<i>e.g.</i> key point "start") or refer to previously defined key points (<i>e.g.</i> key point "end" without specified coordinates). The keypoints are connected to define the path. | Within the <tt>Path</tt> block, there are a series of [[Keypoint Command|<tt>Keypoint</tt> and <tt>Keypoints</tt> commands]] that define new keypoints (<i>e.g.</i> key point "start") or refer to previously defined key points (<i>e.g.</i> key point "end" without specified coordinates). The keypoints are connected to define the path. | ||
==== Paths Command ==== | |||
A path can be used in more than one [[Area Command|area]]. The first time it is used it is defined as above. For all subsequent uses, however, it is reused by giving just the <tt>id</tt>. Thus, the second form of the <tt>Path</tt> command is to refer to a previous key point using the <tt>Paths</tt> command: | |||
Paths #1,<#2>,... | |||
< | |||
< | where there is no matching <tt>EndPath</tt> command and #1 (#2, ...) refer to the <code>id</code> of a previously defined paths. When more than one <tt>iid</tt> is used they refer to consecutive paths in the current [[Area Command|area]]. | ||
== Paths == | |||
</ | Following the <tt><Keypoints></tt>, there are a series of <tt><Path></tt> commands that link the key points into lines or arcs and define mesh information along those paths. Subordinate to each <tt><Path></tt> command are a series of <tt><keypt></tt> commands that list the key points that define the path. Use two key points to define a line or three key points to define an arc. Currently the path can only have two or three key points. The key points are selected by their <tt>id</tt>. The attributes for a <tt><Path></tt> command are: | ||
< | *<tt>id</tt>: An <tt>id</tt> for the path. The <tt>id</tt>'s can be text or numbers and must be unique among all paths. | ||
*<tt>intervals</tt>: Number of elements along this path when it is meshed into an area. | |||
* <tt>ratio</tt>: Ratio of the size of the first element along the path to the last one. If <tt>ratio<0</tt>, then the absolute size of the first element on the path with be <tt>|ratio|</tt>. The default is 1.0 which gives equally sized elements. | |||
== Notes == | |||
<ol> | <ol> | ||
<li>A scripted <tt>Path</tt> command to define a path can appear by itself or within an [[Area command|area]] block. A <tt>Paths</tt> command that refers to an existing path is only allowed within an [[Area command|area]] block.</li> | |||
<li>Currently the path definition can only have two or three key points. Two key points define a line and three key points define an arc. | |||
<li>Currently the path definition can only have two or three key points. Two key points define a line and three key points | |||
</li> | </li> | ||
<li>To programmatically access path properties, you can use | <li>To programmatically access path properties, you can use the [[Expression Syntax|"at" expressions]] <tt>@path.ID.prop</tt> where "ID" is the defined path <tt>id</tt> and the possible properties for <tt>prop</tt> are: | ||
<ul> | <ul> | ||
<li>< | <li><tt>intervals</tt> - number of intervals along the path</li> | ||
<li>< | <li><tt>ratio</code> - ratio of first to last element size</li> | ||
<li>< | <li><tt>first<tt> - <tt>id</tt> of the first [[Keypoint Command|key point]]</li> | ||
<li>< | <li><tt>middle</tt> - <tt>id</tt> of the middle [[Keypoint Command|key point]] (or empty string is the path does not have a middle key point).</li> | ||
<li>< | <li><tt>last</tt> - <code>id</code> of the last [[Keypoint Command|key point]]</li> | ||
</ul> | </ul> | ||
<li>The | <li>The <tt>Path</tt> and <tt>Path</tt> commands are only allowed for FEA analyses.</li> | ||
</ol> | |||
Revision as of 12:05, 30 August 2013
The Path and Paths commands are used in FEA analyses to define paths that are used to define areas when generating a mesh.
Scripted Paths
In scripted files, the Path command has two forms.
Path Command
The first form is to define a new path:
Path #1,#2,<#3> Keypoint "start",0,5 Keypoint "middle",5,10 Keypoints "end" EndPath
where
- #1 is the id to give to the new path. The id must be unique among all other paths.
- #2 is the number of intervals along the path. When the path is used to mesh an area, it is the number of elements along that path.
- #3 defines the ratio of the first element size to the last element size and can be used to define unequal element sizes. Alternatively, #3 can be negative to specify the absolute size of the first element (in mm) to be |#3|. If not specified, the default value is 1 which gives equally sized elements.
Within the Path block, there are a series of Keypoint and Keypoints commands that define new keypoints (e.g. key point "start") or refer to previously defined key points (e.g. key point "end" without specified coordinates). The keypoints are connected to define the path.
Paths Command
A path can be used in more than one area. The first time it is used it is defined as above. For all subsequent uses, however, it is reused by giving just the id. Thus, the second form of the Path command is to refer to a previous key point using the Paths command:
Paths #1,<#2>,...
where there is no matching EndPath command and #1 (#2, ...) refer to the id
of a previously defined paths. When more than one iid is used they refer to consecutive paths in the current area.
Paths
Following the <Keypoints>, there are a series of <Path> commands that link the key points into lines or arcs and define mesh information along those paths. Subordinate to each <Path> command are a series of <keypt> commands that list the key points that define the path. Use two key points to define a line or three key points to define an arc. Currently the path can only have two or three key points. The key points are selected by their id. The attributes for a <Path> command are:
- id: An id for the path. The id's can be text or numbers and must be unique among all paths.
- intervals: Number of elements along this path when it is meshed into an area.
- ratio: Ratio of the size of the first element along the path to the last one. If ratio<0, then the absolute size of the first element on the path with be |ratio|. The default is 1.0 which gives equally sized elements.
Notes
- A scripted Path command to define a path can appear by itself or within an area block. A Paths command that refers to an existing path is only allowed within an area block.
- Currently the path definition can only have two or three key points. Two key points define a line and three key points define an arc.
- To programmatically access path properties, you can use the "at" expressions @path.ID.prop where "ID" is the defined path id and the possible properties for prop are:
- The Path and Path commands are only allowed for FEA analyses.