Difference between revisions of "Keypoint Command"
m (→Notes) |
|||
(9 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
The first form is to define a key point: | The first form is to define a key point: | ||
Keypoint | Keypoint (id),(x),(y),<(ispolar)> | ||
where | where | ||
* | * <tt>(id)</tt> is the <tt>id</tt> to give to the new keypoint. The <tt>id</tt> must be unique among all other key points. | ||
* | * <tt>(x)</tt> and <tt>(y)</tt> are the x and y coordinates of the key point (or R and Z coordinates for axisymmetric analyses) in [[ConsistentUnits Command#Legacy and Consistent Units|length units]]. | ||
* | * Optional <tt>(ispolar)</tt> can be "polar" to indicate the coordinates are given in polar coordinates (r and θ) instead of Cartesian coordinates (x and y for planar or R and Z for axisymmetric). By default, the polar coordinates are from the origin (0,0), but the polar origin can be changes with the [[#Origin Command|<tt>Origin</tt> command]]. | ||
==== Keypoints Command ==== | ==== Keypoints Command ==== | ||
Line 21: | Line 21: | ||
A key point can be used in more than one [[Path Command|path]]. 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>Keypoint</tt> command is to refer to a previous key point using the <tt>Keypoints</tt> command: | A key point can be used in more than one [[Path Command|path]]. 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>Keypoint</tt> command is to refer to a previous key point using the <tt>Keypoints</tt> command: | ||
Keypoints | Keypoints (id1),<(id2)>,... | ||
where | where <tt>(id1)</tt> (<tt>(id2)</tt>, ...) are the <tt>id</tt>s of previously defined key points to use consecutively in definition of a [[Path Command|path]]. This form of the <tt>Keypoint</tt> command must always be with a [[Path Command|path block]]. | ||
== XML Keypoints Block == | == XML Keypoints Block == | ||
In <tt>XML</tt> files, key points ar defined in a <tt><Keypoints></tt> block, whih must be within the single <tt><Mesh></tt> block and must be the first element in that block. The <tt>Keypoints</tt> block has the form: | |||
<pre> | <pre> | ||
Line 38: | Line 38: | ||
</pre> | </pre> | ||
It can define any number of key points. Each subordinate <tt><pt></tt> command defines a key point, provides its <tt>x</tt> and <tt>y</tt> coordinates and gives it an <tt>id</tt>. The <tt>id</tt>'s can be text or numbers and must all be unique among key points. | It can define any number of key points. Each subordinate <tt><pt></tt> command defines a key point, provides its <tt>x</tt> and <tt>y</tt> coordinates in [[ConsistentUnits Command#Legacy and Consistent Units|length units]] and gives it an <tt>id</tt>. The <tt>id</tt>'s can be text or numbers and must all be unique among key points. | ||
== Origin Command == | |||
When creating key points, the <tt>Origin</tt> command is used to set the coordinate system origin for entry of key point coordinates using polar coordinates. The format is | |||
Origin (x0),(y0) | |||
where: | |||
* (<tt>x0,y0</tt>) are the <tt>x</tt> and <tt>y</tt> coordinates of the new origin (or <tt>R</tt> and <tt>Z</tt> coordinates if axisymmetric) in [[ConsistentUnits Command#Legacy and Consistent Units|length units]]. | |||
This origin setting is used when defining key points by polar coordinates. For example, the command | |||
Keypoint (r),(θ),"polar" | |||
will define a keypoint at location | |||
| |||
<math>x = x0 + r \cos\theta \qquad {\rm and} \qquad y = y0 + r \sin\theta</math> | |||
The default origin (before any <tt>Origin</tt> command is (0,0). The origin options is not available to <tt>XML</tt> input files. | |||
== Notes == | == Notes == |
Latest revision as of 13:04, 2 June 2015
The Keypoint and Keypoints commands are used in FEA analyses to define key points that are used to define paths when generating a mesh.
Scripted Keypoints
In scripted input files, the Keypoint command has two forms.
Keypoint Command
The first form is to define a key point:
Keypoint (id),(x),(y),<(ispolar)>
where
- (id) is the id to give to the new keypoint. The id must be unique among all other key points.
- (x) and (y) are the x and y coordinates of the key point (or R and Z coordinates for axisymmetric analyses) in length units.
- Optional (ispolar) can be "polar" to indicate the coordinates are given in polar coordinates (r and θ) instead of Cartesian coordinates (x and y for planar or R and Z for axisymmetric). By default, the polar coordinates are from the origin (0,0), but the polar origin can be changes with the Origin command.
Keypoints Command
A key point can be used in more than one path. 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 Keypoint command is to refer to a previous key point using the Keypoints command:
Keypoints (id1),<(id2)>,...
where (id1) ((id2), ...) are the ids of previously defined key points to use consecutively in definition of a path. This form of the Keypoint command must always be with a path block.
XML Keypoints Block
In XML files, key points ar defined in a <Keypoints> block, whih must be within the single <Mesh> block and must be the first element in that block. The Keypoints block has the form:
<Keypoints> <pt x='0' y='0' id='lowerleft'/> <pt x='0' y='10' id='upperleft'/> <pt x='50' y='0' id='lowerright'/> <pt x='50' y='10' id='upperright'/> </Keypoints>
It can define any number of key points. Each subordinate <pt> command defines a key point, provides its x and y coordinates in length units and gives it an id. The id's can be text or numbers and must all be unique among key points.
Origin Command
When creating key points, the Origin command is used to set the coordinate system origin for entry of key point coordinates using polar coordinates. The format is
Origin (x0),(y0)
where:
- (x0,y0) are the x and y coordinates of the new origin (or R and Z coordinates if axisymmetric) in length units.
This origin setting is used when defining key points by polar coordinates. For example, the command
Keypoint (r),(θ),"polar"
will define a keypoint at location
[math]\displaystyle{ x = x0 + r \cos\theta \qquad {\rm and} \qquad y = y0 + r \sin\theta }[/math]
The default origin (before any Origin command is (0,0). The origin options is not available to XML input files.
Notes
- A Keypoint command to define a key point can appear by itself or within an Path block, but all Keypoints commands must be within a Path block.
- To programmatically access keypoint coordinates, you can use the "at" expressions @key.ID.x or @key.ID.y. Here ID is the defined key point id and these expressions return that key point's x or y coordinate.
- The Keypoint and Keypoints commands are only allowed for FEA analyses.