Difference between revisions of "Path Command"
Line 7: | Line 7: | ||
== Path Command == | == Path Command == | ||
The first form is to define a new path: | |||
<pre>Path #1,#2,<#3> | <pre>Path #1,#2,<#3> | ||
Keypoint "start",0,5 | Keypoint "start",0,5 | ||
Keypoint "middle",5,10 | Keypoint "middle",5,10 | ||
Keypoints "end" | |||
EndPath | EndPath | ||
</pre> | </pre> | ||
where | |||
<ul> | <ul> | ||
<li>#1 is the | <li>#1 is the <tt>id</tt> to give to the new path. The <tt>id</tt> must be unique among all other paths.</li> | ||
<li>#2 is the number of intervals along the path. When the path is used to mesh an | <li>#2 is the number of intervals along the path. When the path is used to mesh an [[Area Command|area]], it is the number of elements along that path.</li> | ||
<li>#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. | <li>#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. | ||
Line 29: | Line 29: | ||
</ul> | </ul> | ||
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. | |||
<p>A path can be used in more than one <a href="area.html">area</a>. The first time it is used it is defined as above. For all subsequent uses, however, it is reused by giving just the <code>id</code>. Thus, the second form of the <code>Path</code> command is to refer to a previous path:</p> | <p>A path can be used in more than one <a href="area.html">area</a>. The first time it is used it is defined as above. For all subsequent uses, however, it is reused by giving just the <code>id</code>. Thus, the second form of the <code>Path</code> command is to refer to a previous path:</p> |
Revision as of 11:57, 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.
A path can be used in more than one <a href="area.html">area</a>. 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 path:
Path #1
where there is no matching <a href="endpath.html">EndPath</a> command and
- #1 is the name or
id
of a previously defined path.
To include consecutive defined paths in an <a href="area.html">area</a>, you can use multiple Path
commands or a single <a href="paths.html">Paths</a> command.
Notes
- A
Path
command to define a path can appear by itself or within an <a href="area.html">Area command</a> block. APath
command that refers to an existing path is only allowed within a <a href="area.html">Area command</a> block. - Currently the path definition can only have two or three key points. Two key points define a line and three key points can define an arc.
- To programmatically access path properties, you can use <a href="expression.html#atexpr">an "at" expression</a>
@path.ID.prop
where "ID" is the defined path name orid
and the possible properties forprop
are:intervals
- number of intervals along the pathratio
- ratio of first to last element sizefirst
- name orid
of the first <a href="keypoint.html">keypoint</a>middle
- name orid
of the middle <a href="keypoint.html">keypoint</a> (or empty string is the path does not have a middle keypoint).last
- name orid
of the last <a href="keypoint.html">keypoint</a>
- The
Path
command is only allowed for <a href="analysis.html">FEA analyses.</a> - 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.
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: