Connector and Curve segment type
pw:: | Connector and Curve segment type |
Instance Actions | |
delete | This action deletes the segment. |
getPointCount | This action gets the number of control points of this curve segment. |
getPoint | This action gets the control point at the given index. |
getPoints | This action gets all the control points. |
setPoint | This action sets the control point at the given index. |
addPoint | This action adds a control point to the end of the control points for this curve segment. |
insertPoint | This action inserts a control point before the given index. |
removePoint | This action removes the control point at the given index. |
removeInteriorPoints | This action removes all of the interior control points. |
getPosition | This action gets the position in the defining space of the segment at the given parameter, index, arc length, or constant value. |
getXYZ | This action gets the position of the segment in model space at the given parameter, index, arc length, constant value, or closest point. |
getParameter | This action gets the parametric value of the segment at the given parameter, index, arc length, constant value, or closest point. |
getTangent | This action gets the tangency vector on the segment at a location. |
getLength | This action gets the length of the portion of the segment from the beginning to the given parameter, index, arc length, constant value, or closest point. |
getBay | This actions gets the bay of the segment contained by the given parameter, index, arc length, constant value, or closest point |
getTotalLength | This action gets the total length of the segment. |
closestPoint | This action gets the closest point on this segment to the given point or ray. |
isClosed | This action checks if the segment is closed. |
isPole | This action checks if the segment is a pole. |
getXYZsOfBay | This action gets a list of points between two control points of a segment suitable for rendering. |
$segment delete
This action deletes the segment. This is necessary if the segment has not been added to a pw::Curve or pw::Connector. Calling delete on a segment after it has been added, will generate an error.
This action has no parameters.
This action does not return anything.
$segment getPointCount
This action gets the number of control points of this curve segment.
This action has no parameters.
This action returns the integer number of control points.
$segment getPoints
This action gets all the control points.
This action has no parameters.
This action returns a list of points.
$segment addPoint point
This action adds a control point to the end of the control points for this curve segment.
point | This required parameter is the point to add. |
This action does not return anything.
$segment insertPoint index point
This action inserts a control point before the given index.
index | This required parameter is the integer index to insert the given point in the range [1, number of points + 1] |
point | This required parameter is the point to be inserted. |
This action does not return anything.
$segment removeInteriorPoints
This action removes all of the interior control points.
This action has no parameters.
This action returns a boolean which is true if there were any points removed and false otherwise.
$segment getPosition ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This action gets the position in the defining space of the segment at the given parameter, index, arc length, or constant value.
-parameter | This optional flag indicates to get the position at a specified parametric value. The value is a float parameter or a uv vector in the range [(0.0, 0.0), (1.0, 1.0)]. This is the default option. |
-control | This optional flag indicates to get the position at a control point. The value is an integer index in the range [1, number of points]. |
-arc | This optional flag indicates to get the position at an arc length. The value is the float normalized arc length from the start of the curve in the range [0.0, 1.0]. |
-X | This optional flag indicates to get the position at a constant X. The value is the float constant X Cartesian coordinate value in the range (-infinity, +infinity). |
-Y | This optional flag indicates to get the position at a constant Y. The value is the float constant Y Cartesian coordinate value in the range (-infinity, +infinity) |
-Z | This optional flag indicates to get the position at a constant Z. The value is the float constant Z Cartesian coordinate value in the range (-infinity, +infinity). |
-closest | This optional flag indicates to get the closest position. The value is an xyz vector, point, or grid coord. |
value | This required parameter is the value at which to get the position. |
This action returns a point at the position on the segment. (It will be in the form “u v dbentity” if the segment is database constrained and otherwise in the form “X Y Z”.)
$segment getXYZ ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This action gets the position of the segment in model space at the given parameter, index, arc length, constant value, or closest point.
-parameter | This optional flag indicates to get the xyz at a specified parametric value. The value is a float parameter or a uv vector in the range [(0.0, 0.0), (1.0, 1.0)]. This is the default option. |
-control | This optional flag indicates to get the xyz at a control point. The value is an integer index in the range [1, number of points]. |
-arc | This optional flag indicates to get the xyz at an arc length. The value is the float normalized arc length from the start of the curve in the range [0.0, 1.0]. |
-X | This optional flag indicates to get the xyz at a constant X. The value is the float constant X Cartesian coordinate value in the range (-infinity, +infinity). |
-Y | This optional flag indicates to get the xyz at a constant Y. The value is the float constant Y Cartesian coordinate value in the range (-infinity, +infinity) |
-Z | This optional flag indicates to get the xyz at a constant Z. The value is the float constant Z Cartesian coordinate value in the range (-infinity, +infinity). |
-closest | This optional flag indicates to get the closest xyz. The value is an xyz vector, point, or grid coord. |
value | This required parameter is the value at which to get the xyz. |
This action returns an XYZ vector.
$segment getParameter ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This action gets the parametric value of the segment at the given parameter, index, arc length, constant value, or closest point.
-parameter | This optional flag indicates to get the parameter at a specified parametric value. The value is a float parameter or a uv vector in the range [(0.0, 0.0), (1.0, 1.0)]. This is the default option. |
-control | This optional flag indicates to get the parameter at a control point. The value is an integer index in the range [1, number of points]. |
-arc | This optional flag indicates to get the parameter at an arc length. The value is the float normalized arc length from the start of the curve in the range [0.0, 1.0]. |
-X | This optional flag indicates to get the parameter at a constant X. The value is the float constant X Cartesian coordinate value in the range (-infinity, +infinity). |
-Y | This optional flag indicates to get the parameter at a constant Y. The value is the float constant Y Cartesian coordinate value in the range (-infinity, +infinity) |
-Z | This optional flag indicates to get the parameter at a constant Z. The value is the float constant Z Cartesian coordinate value in the range (-infinity, +infinity). |
-closest | This optional flag indicates to get the closest parameter. The value is an parameter vector, point, or grid coord. |
value | This required parameter is the value at which to get the parameter. |
This action returns the float parametric value at the specified location on the segment.
The -parameter option only returns the given parameter, but is included for consistency with other commands
$segment getTangent ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This action gets the tangency vector on the segment at a location.
-parameter | This optional flag is notification to get the tangent vector at a parameter. The value is a float with the range [0.0, 1.0], or a uv vector with u having the range [0.0, 1.0] and v ignored. |
-control | This optional flag denotes that value represents a control point index. value is an integer index in the range [1, number of control points]. See <getControlPointCount>. |
-arc | This optional flag designates value as the normalized arc length from the start of the segment. value is a float in the range [0.0, 1.0]. |
-X | This optional flag causes the routine to calculate the tangent vector at the singular point on the segment at X = value. An error is returned if there is not a unique point. |
-Y | This optional flag causes the routine to calculate the tangent vector at the singular point on the segment at Y = value. An error is returned if there is not a unique point. |
-Z | This optional flag causes the routine to calculate the tangent vector at the singular point on the segment at Z = value. An error is returned if there is not a unique point. |
-closest | This optional flag results in the routine calculating the tangent vector of the point on the segment closest to the specified value. value is an xyz vector, point, or grid coord. |
value | This required parameter is the float value at which to get the tangent vector. Its interpretation is determined by the above flags. The default mode is the -parameter flag. |
This action returns a normalized XYZ vector representing the tangency direction. The vector will be aligned with the parametric direction of the segment.
$segment getLength ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This action gets the length of the portion of the segment from the beginning to the given parameter, index, arc length, constant value, or closest point.
-parameter | This optional parameter indicates to get the length to a parametric value; the value is a parameter or a uv parameter in the range [(0,0), (1,1)]. This is the default option. |
-control | This optional parameter indicates to get the length to a control point. The value is an integer index in the range [1, number of points]. |
-arc | This optional parameter indicates to get the length to an arc length. The value is the float normalized arc length from the start of the curve in the range [0.0, 1.0]. |
-X | This optional parameter indicates to get the length to a constant X. The value is the float constant X Cartesian coordinate value in the range (-infinity, +infinity). |
-Y | This optional parameter indicates to get the length to a constant Y. The value is the float constant Y Cartesian coordinate value in the range (-infinity, +infinity). |
-Z | This optional parameter indicates to get the length to a constant Z. The value is the float constant Z Cartesian coordinate value in the range (-infinity, +infinity). |
-closest | This optional parameter indicates to get the length to the point on the segment that is closest to the specified point. The value is a xyz vector, point, or grid coord. |
value | This required parameter is the float value at which to get the length. |
This action returns the float length of the segment.
The -arc option only converts from normalized to non-normalized length, but is included for consistency with other commands.
$segment getBay ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This actions gets the bay of the segment contained by the given parameter, index, arc length, constant value, or closest point
-parameter | This optional parameter indicates to get the bay at a parametric value. The value is a float parameter or a uv vector in the range [(0.0, 0.0), (1.0, 1.0)]. This is the default option. |
-control | This parameter indicates to get the bay at a control point. The value is an integer index in the range [1, number of points]. |
-arc | This optional parameter indicates to get the bay at an arc length. The value is the float normalized arc length from the start of the curve. |
-X | This optional parameter indicates to get the bay at a constant X. The value is the float constant X Cartesian coordinate value in the range (-infinity, +infinity). |
-Y | This optional parameter indicates to get the bay at a constant Y. The value is the float constant Y Cartesian coordinate value in the range (-infinity, +infinity). |
-Z | This optional parameter indicates to get the bay at a constant Z. The value is the float constant Z Cartesian coordinate value in the range (-infinity, +infinity). |
-closest | This optional parameter indicates to get the bay containing the closest point on the segment. The value is a xyz vector, point, or grid coord. |
value | This required parameter is the float value at which to get the position. |
This action returns the integer bay of the segment in the range [0, number of points].
Special treatment is given to the ends of the segment. If the given value specifies the beginning of the segment, a bay of 0 is returned, if the given value specifies the end of the segment, a bay of the number of points is returned. For a segment with less than two control points, the result is always 0.
$segment getTotalLength
This action gets the total length of the segment.
This action has no parameters.
This action returns the float length in the range [0.0, +infinity).
$segment closestPoint ?-from fromVar? ?-distance distVar? ?-parameter paramVar? point ?dir?
This action gets the closest point on this segment to the given point or ray.
-from fromVar | This optional parameter is a string variable name to receive the xyz vector of the given point or the point along the ray that is closest to this segment. |
-distance distVar | This optional parameter is a string variable name to receive the float distance between the given point or ray and the point returned. |
-parameter paramVar | This optional parameter is a string variable name to receive the float parameter of the segment where the closest point occurs in the range [0.0, 1.0]. |
point | This required parameter is the point that is projected onto this segment. |
dir | This optional parameter is a direction vector for finding the closest point from a ray emanating from the specified point. |
This action returns an xyz vector. If there is no closest point this action will return the origin.
$segment isClosed
This action checks if the segment is closed.
This action has no parameters.
This action returns a boolean, which is true if the segment is closed.
$segment isPole
This action checks if the segment is a pole.
This action has no parameters.
This action returns a boolean, which is true if the segment is a pole.
This action deletes the segment.
$segment delete
This action gets the number of control points of this curve segment.
$segment getPointCount
This action gets the control point at the given index.
$segment getPoint index
This action gets all the control points.
$segment getPoints
This action sets the control point at the given index.
$segment setPoint index point
This action adds a control point to the end of the control points for this curve segment.
$segment addPoint point
This action inserts a control point before the given index.
$segment insertPoint index point
This action removes the control point at the given index.
$segment removePoint index
This action removes all of the interior control points.
$segment removeInteriorPoints
This action gets the position in the defining space of the segment at the given parameter, index, arc length, or constant value.
$segment getPosition ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This action gets the position of the segment in model space at the given parameter, index, arc length, constant value, or closest point.
$segment getXYZ ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This action gets the parametric value of the segment at the given parameter, index, arc length, constant value, or closest point.
$segment getParameter ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This action gets the tangency vector on the segment at a location.
$segment getTangent ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This action gets the length of the portion of the segment from the beginning to the given parameter, index, arc length, constant value, or closest point.
$segment getLength ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This actions gets the bay of the segment contained by the given parameter, index, arc length, constant value, or closest point
$segment getBay ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This action gets the total length of the segment.
$segment getTotalLength
This action gets the closest point on this segment to the given point or ray.
$segment closestPoint ?-from fromVar? ?-distance distVar? ?-parameter paramVar? point ?dir?
This action checks if the segment is closed.
$segment isClosed
This action checks if the segment is a pole.
$segment isPole
This action gets a list of points between two control points of a segment suitable for rendering.
$segment getXYZsOfBay index
This action gets the tangency vector on the curve at a location.
$curve getTangent ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value