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 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 checkis 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 number of control points.
getPointThis action gets the control point at the given index. Parametersindex | This parameter is the integer index of the point to get with 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 parameter is the integer index of the point to set with the range [1, number of points]. | point | This 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 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 parameter is the index to insert the given point at; [1, number of points + 1] | point | This 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 parameter is the index of the point to remove; [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 parameter indicates to get the position at a specified parameteric value; the value is a parameter or a uv parameter [(0,0), (1,1)]; this is the default option. | -control | This parameter indicates to get the position at a control point; the value is an index. [1, number of points] | -arc | This parameter indicates to get the position at an arc length; the value is the normalized arc length from the start of the curve. | -X | This parameter indicates to get the position at a constant x; the value is the constant x coordinate value (-infinity, +infinity) | -Y | This parameter indicates to get the position at a constant y; the value is the constant y coordinate value (-infinity, +infinity) | -Z | This parameter indicates to get the position at a constant z; the value is the constant z coordinate value (-infinity, +infinity) | -closest | This parameter indicates to get the closest position; the value is xyz, point, or grid coordinate | value | This 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 parameter indicates to get the xyz at a parameter; the value is a parameter or a uv parameter [(0,0), (1,1)]; this is the default option. | -control | This parameter indicates to get the xyz at a control point; the value is an index [1, number of points]. | -arc | This parameter indicates to get the xyz at an arc length; the value is the normalized arc length from the start of the curve. | -X | This parameter indicates to get the xyz at a constant x; the value is the constant x coordinate value (-infinity, +infinity). | -Y | This parameter indicates to get the xyz at a constant y; the value is the constant y coordinate value (-infinity, +infinity). | -Z | This parameter indicates to get the xyz at a constant z; the value is the constant z coordinate value (-infinity, +infinity). | -closest | This parameter indicates to get the closest xyz; the value is a xyz, point, or grid coordinate. | value | This 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 parameter indicates to get the parametric value at a parameter; the value is a parameter or a uv parameter [(0,0), (1,1)]; this is the default option. | -control | This parameter indicates to get the parametric value at a control point; the value is an index [1, number of points]. | -arc | This parameter indicates to get the parametric value at an arc length; the value is the normalized arc length from the start of the curve [0 , 1]. | -X | This parameter indicates to get the parametric value at a constant x; the value is the constant x coordinate value (-infinity, +infinity). | -Y | This parameter indicates to get the parametric value at a constant y; the value is the constant y coordinate value (-infinity, +infinity). | -Z | This parameter indicates to get the parametric value at a constant z; the value is the constant z coordinate value (-infinity, +infinity). | -closest | This parameter indicates to get the parametric value at the closest point on the segment; the value is a xyz, point, or grid coordinate. | value | This parameter is the value at which to get the parameter. |
ReturnsThis action returns the 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
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 parameter indicates to get the length to a parametric value; the value is a parameter or a uv parameter with [(0,0), (1,1)]; this is the default option. | -control | This parameter indicates to get the length to a control point; the value is an index [1, number of points]. | -arc | This parameter indicates to get the length to an arc length; the value is the normalized arc length from the start of the curve. | -X | This parameter indicates to get the length to a constant x; the value is the constant x coordinate value (-infinity, +infinity). | -Y | This parameter indicates to get the length to a constant y; the value is the constant y coordinate value (-infinity, +infinity). | -Z | This parameter indicates to get the length to a constant z; the value is the constant z coordinate value (-infinity, +infinity). | -closest | This parameter indicates to get the length to the point on the sgement that is closest to the specified point; the value is a xyz, point, or grid coordinate. | value | This parameter is the value at which to get the length. |
ReturnsThis action returns the 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 parameter indicates to get the bay at a parametric value; the value is a parameter or a uv parameter [(0,0), (1,1)]; this is the default option. | -control | This parameter indicates to get the bay at a control point; the value is an index [1, number of points]. | -arc | This parameter indicates to get the bay at an arc length; the value is the normalized arc length from the start of the curve. | -X | This parameter indicates to get the bay at a constant x; the value is the constant x coordinate value (-infinity, +infinity). | -Y | This parameter indicates to get the bay at a constant y; the value is the constant y coordinate value (-infinity, +infinity). | -Z | This parameter indicates to get the bay at a constant z; the value is the constant z coordinate value (-infinity, +infinity). | -closest | This parameter indicates to get the bay containing the closest point on the segment; the value is a xyz, point, or grid coordinate. | value | This parameter is the value at which to get the position. |
ReturnsThis action returns the bay of the segment, [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 length [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 variable name to receive the xyz of the given point or the point along the ray that is closest to this segment. | -distance distVar | This optional parameter is a variable name to receive the distance between the given point or ray and the point returned. | -parameter paramVar | This optional parameter is a variable name to receive the parameter of the segment where the closest point occurs; [0.0, 1.0]. | point | This 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 point; if there is no closest point this action will return the origin.
isClosedThis action checkis 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 parameter is the index of the bay; | [1, number of points | 1]. |
ReturnsThis action returns a list of the xyz points.
|