Difference between revisions of "Path Command"

From OSUPDOCS
Jump to navigation Jump to search
 
(22 intermediate revisions by the same user not shown)
Line 1: Line 1:
<p>The <code>Path</code> command is used in FEA analysis to define paths that are connected to mesh <a href="area.html">areas</a>. It has two forms. The first form is to define a new path:</p>
The <tt>Path</tt> and <tt>Paths</tt> commands are used in FEA analyses to define paths that are used to define [[Area Command|areas]] when [[FEA Mesh Generation Commands|generating a mesh]].
 
== Scripted Paths ==
 
In scripted files, the <tt>Path</tt> command has two forms.
 
==== Path Command ====
 
The first form is to define a new path:
<pre>Path #1,#2,&lt;#3&gt;
<pre>Path (id),(intervals),<(ratio)>
   Keypoint "start",0,5
   Keypoint "start",0,5
   Keypoint "middle",5,10
   Keypoint "middle",5,10
   Keypoint "end"
   Keypoints "end"
EndPath
EndPath
</pre>
</pre>
<p>where</p>
where


<ul>
<ul>


<li>#1 is the name or <code>id</code> to give to the new path. The <code>id</code> must be unique among all other paths.</li>
<li><tt>(id)</tt> 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 <a href="area.html">area</a>, it is the number of elements along that path.</li>
<li><tt>(intervals)</tt> 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>Optional <tt>(ratio)</tt> defines the ratio of the first element size to the last element size and can be used to define unequal element sizes. Alternatively, <tt>(ratio></tt> can be negative to specify the absolute size of the first element (in [[ConsistentUnits Command#Legacy and Consistent Units|length units]]) to be |<tt>(ratio></tt>|. If not specified, the default value is 1 which gives equally sized elements.
</li>
</li>


</ul>
</ul>


<p>Within the <code>Path</code> block, there are a series of <a href="keypoint.html">Keypoint commands</a> that define new keypoints (<i>e.g.</i> key point &quot;start&quot;) or refer to previously define key points (<i>e.g.</i> key point &quot;end&quot; without specified coordinates). The keypoints are connected to define the path. Consecutive defined keypoints can be selected with multiple <a href="keypoint.html">Keypoint</a> commands or with single <a href="keypoints.html">Keypoints</a>  commands. </p>
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 &quot;start&quot;) or refer to previously defined key points (<i>e.g.</i> key point &quot;end&quot; without specified coordinates). The keypoints are connected to define the path. Currently the path definition can only have two or three [[Keypoint Command|key points]]. Two key points define a line and three define an arc.


<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>
==== 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:


<pre>Path #1
Paths (id1),<(id2)>,...
</pre>
<p>where there is no matching <a href="endpath.html">EndPath</a> command and </p>


<ul>
where there is no matching <tt>EndPath</tt> command and <tt>(id1)</tt> (<tt>(id2)</tt>, ...) refer to the <code>id</code>s of previously defined paths. When more than one <tt>id</tt> is used they refer to consecutive paths in the current [[Area Command|area]].


<li>#1 is the name or <code>id</code> of a previously defined path.</li>
== XML Path Command ==


</ul>
After the [[Keypoint Command#XML Keypoints Block|<tt><Keypoints> block</tt>]] in the single <tt><Mesh></tt> element, all paths used by the mesh should be defined in a series of <tt><Path></tt> blocks that link the key points into lines or arcs and define mesh information along those paths. The basic format is:


<p>To include consecutive defined paths in an <a href="area.html">area</a>, you can use multiple <code>Path</code> commands or a single <a href="paths.html">Paths</a> command.</p>
<pre>
  &lt;Path id="bottom" intervals='6' ratio='1'&gt;
    &lt;keypt id='start'/&gt;
    &lt;keypt id='middle'/&gt;
    &lt;keypt id='end'/&gt;
  &lt;/Path&gt;
</pre>


<h2>Notes</h2>
Subordinate to each <tt><Path></tt> command are <tt><keypt></tt> commands that list the [[Keypoint Command|key points]] that define the path. Use two key points to define a line or three key points to define an arc. The [[Keypoint Command|key points]] are selected by their <tt>id</tt>. The attributes for a <tt><Path></tt> command are:


<ol>
*<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 ==


<li>A <code>Path</code> command to define a path can appear by itself or within an <a href="area.html">Area command</a> block. A <code>Path</code> command that refers to an existing path is only allowed within a <a href="area.html">Area command</a> block.</li>
<ol>


<li>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.
<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 existing paths is only allowed within an [[Area Command|area]] block.</li>
</li>


<li>To programmatically access path properties, you can use <a href="expression.html#atexpr">an &quot;at&quot; expression</a> <code>@path.ID.prop</code> where &quot;ID&quot; is the defined path name or <code>id</code> and the possible properties for <code>prop</code> are:
<li>To programmatically access path propertie in scripted files, you can use the [[Expression Syntax|&quot;at&quot; expression]] <tt>@path.ID.prop</tt> where &quot;ID&quot; is the defined path <tt>id</tt> and the possible properties for <tt>prop</tt> are:


<ul>
<ul>
<li><code>intervals</code> - number of intervals along the path</li>
<li><tt>intervals</tt> - number of intervals along the path</li>
<li><code>ratio</code> - ratio of first to last element size</li>
<li><tt>ratio</tt> - ratio of first to last element size</li>
<li><code>first</code> - name or <code>id</code> of the first <a href="keypoint.html">keypoint</a></li>
<li><tt>first</tt> - <tt>id</tt> of the first [[Keypoint Command|key point]]</li>
<li><code>middle</code> - name or <code>id</code> of the middle <a href="keypoint.html">keypoint</a> (or empty string is the path does not have a middle keypoint).</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><code>last</code> - name or <code>id</code> of the last <a href="keypoint.html">keypoint</a></li>
<li><tt>last</tt> - <tt>id</tt> of the last [[Keypoint Command|key point]]</li>
</ul>
</ul>


<li>The <code>Path</code> command is only allowed for <a href="analysis.html">FEA analyses.</a></li>
</ol>
 
 
==== Paths ====
 
Following the <tt>&lt;Keypoints&gt;</tt>, there are a series of <tt>&lt;Path&gt;</tt> commands that link the key points into lines or arcs and define mesh information along those paths. Subordinate to each <tt>&lt;Path&gt;</tt> command are a series of <tt>&lt;keypt&gt;</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>&lt;Path&gt;</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.

Latest revision as of 14:05, 2 June 2015

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 (id),(intervals),<(ratio)>
  Keypoint "start",0,5
  Keypoint "middle",5,10
  Keypoints "end"
EndPath

where

  • (id) is the id to give to the new path. The id must be unique among all other paths.
  • (intervals) 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.
  • Optional (ratio) defines the ratio of the first element size to the last element size and can be used to define unequal element sizes. Alternatively, (ratio> can be negative to specify the absolute size of the first element (in length units) to be |(ratio>|. 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. Currently the path definition can only have two or three key points. Two key points define a line and three define an arc.

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 (id1),<(id2)>,...

where there is no matching EndPath command and (id1) ((id2), ...) refer to the ids of previously defined paths. When more than one id is used they refer to consecutive paths in the current area.

XML Path Command

After the <Keypoints> block in the single <Mesh> element, all paths used by the mesh should be defined in a series of <Path> blocks that link the key points into lines or arcs and define mesh information along those paths. The basic format is:

  <Path id="bottom" intervals='6' ratio='1'>
    <keypt id='start'/>
    <keypt id='middle'/>
    <keypt id='end'/>
  </Path>

Subordinate to each <Path> command are <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. 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

  1. A scripted Path command to define a path can appear by itself or within an area block. A Paths command that refers to existing paths is only allowed within an area block.
  2. To programmatically access path propertie in scripted files, you can use the "at" expression @path.ID.prop where "ID" is the defined path id and the possible properties for prop are:
    • intervals - number of intervals along the path
    • ratio - ratio of first to last element size
    • first - id of the first key point
    • middle - id of the middle key point (or empty string is the path does not have a middle key point).
    • last - id of the last key point