pw:: SegmentConnector and Curve segment type Derives Frompw::Object Summary | Connector and Curve segment type | | | | This action deletes the segment. | | This action gets the number of control points of this curve segment. | | This action gets the control point at the given index. | | This action gets all the control points. | | This action sets the control point at the given index. | | This action adds a control point to the end of the control points for this curve segment. | | This action inserts a control point before the given index. | | This action removes the control point at the given index. | | This action removes all of the interior control points. | | This action gets the position in the defining space of the segment at the given parameter, index, arc length, or constant value. | | This action gets the position of the segment in model space at the given parameter, index, arc length, constant value, or closest point. | | This action gets the parametric value of the segment at the given parameter, index, arc length, constant value, or closest point. | | This action gets the tangency vector on the segment at a location. | | 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. | | This actions gets the bay of the segment contained by the given parameter, index, arc length, constant value, or closest point | | This action gets the total length of the segment. | | This action gets the closest point on this segment to the given point or ray. | | This action checks if the segment is closed. | | This action checks if the segment is a pole. | | This action gets a list of points between two control points of a segment suitable for rendering. |
deleteThis 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. ParametersThis action has no parameters. ReturnsThis action does not return anything.
getPointCountThis action gets the number of control points of this curve segment. ParametersThis action has no parameters. ReturnsThis action returns the integer number of control points.
getPointThis action gets the control point at the given index. Parametersindex | This required parameter is the integer index of the point to get in the range [1, number of points]. |
ReturnsThis action returns the point at the given index.
getPointsThis action gets all the control points. ParametersThis action has no paramaters. ReturnsThis action returns a list of points.
setPoint$segment setPoint index point |
This action sets the control point at the given index. Parametersindex | This required parameter is the integer index of the point to set in the range [1, number of points]. | point | This required parameter is the point to set. |
ReturnsThis action does not return anything.
addPointThis action adds a control point to the end of the control points for this curve segment. Parameterspoint | This required parameter is the point to add. |
ReturnsThis action does not return anything.
insertPoint$segment insertPoint index point |
This action inserts a control point before the given index. Parametersindex | 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. |
ReturnsThis action does not return anything.
removePoint$segment removePoint index |
This action removes the control point at the given index. Parametersindex | This required parameter is the index of the point to remove in the range [1, number of points]. |
ReturnsThis action does not return anything.
removeInteriorPoints$segment removeInteriorPoints |
This action removes all of the interior control points. ParametersThis action has no parameters. ReturnsThis action returns a boolean which is true if there were any points removed and false otherwise.
getPosition$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. Parameters-parameter | This optional flag indicates to get the position at a specified parameteric 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. |
ReturnsThis 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”.)
getXYZ$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. Parameters-parameter | This optional flag indicates to get the xyz at a specified parameteric 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. |
ReturnsThis action returns an XYZ vector.
getParameter$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. Parameters-parameter | This optional flag indicates to get the parameter at a specified parameteric 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. |
ReturnsThis action returns the float parametric value at the specified location on the segment. InformationThe -parameter option only returns the given parameter, but is included for consistency with other commands
getTangent$segment getTangent ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value |
This action gets the tangency vector on the segment at a location. Parameters-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. |
ReturnsThis action returns a normalized XYZ vector representing the tangency direction. The vector will be aligned with the parametric direction of the segment. See Alsopw::Curve.getTangent
getLength$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. Parameters-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 sgement 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. |
ReturnsThis action returns the float length of the segment. InformationThe -arc option only converts from normalized to non-normalized length, but is included for consistency with other commands.
getBay$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 Parameters-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. |
ReturnsThis action returns the integer bay of the segment in the range [0, number of points]. InformationSpecial 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.
getTotalLengthThis action gets the total length of the segment. ParametersThis action has no parameters. ReturnsThis action returns the float length in the range [0.0, +infinity).
closestPoint$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. Parameters-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. |
ReturnsThis action returns an xyz vector. If there is no closest point this action will return the origin.
isClosedThis action checks if the segment is closed. ParametersThis action has no parameters. ReturnsThis action returns a boolean, which is true if the segment is closed.
isPoleThis action checks if the segment is a pole. ParametersThis action has no parameters. ReturnsThis action returns a boolean, which is true if the segment is a pole.
getXYZsOfBay$segment getXYZsOfBay index |
This action gets a list of points between two control points of a segment suitable for rendering. Parametersindex | This required parameter is the integer index of the bay in the range [1, number of points-1]. |
ReturnsThis action returns a list of xyz vectors.
|