Glyph Version 7.22.2 |
pw:: SourceCurveSourceCurve type Derives Frompw::Object pw::Entity pw::SourceEntity Summary
create
This action creates a new source curve object. ParametersThis action has no parameters. ReturnsThis action returns a new pw::SourceCurve object. ExampleThis example shows how to create a source curve with two conic segments. Code set conic(1) [pw::SegmentConic create] join
This action joins as many of the given source curves together as possible. Parameters
ReturnsThis action returns a list of the pw::SourceCurve objects that were joined. InformationThis command supports progress updates. getBestSegment
This action, given two point-lists, returns a segment type, a start point, an end point, and a ProjectToCommon state that represent the best segment for a source curve between the given points. Parameters
ReturnsThis action returns a segment type string. ExampleThis example shows how to find the best segment between two end points. Code puts [pw::Curve getBestSegment -start st -end en \ Output pw::SegmentSpline getSegmentCount
This action gets the number of segments in this curve. ParametersThis action has no parameters. ReturnsThis action returns the integer number of segments. ExampleThis example shows how to get the number of segments in a curve. $srcCrv(1) is referencing an existing source curve. Code puts [$srcCrv(1) getSegmentCount] Output 2 getSegment
This action gets the segment at the given index. Parameters
ReturnsThis action returns a pw::Segment object. ExampleThis example shows how to get the number of control points for a certain segment in a curve. $srcCrv(3) is referencing an existing source curve. Code puts "This segment has [[$srcCrv(3) getSegment 2] getPointCount] \ Output This segment has 5 control points. getSegments
This action gets the list of segments. Parameters
ReturnsThis action returns a pw::Segment object list. ExampleThis example shows how to get the number of control points for a certain segment in a curve. $srcCrv(3) is referencing an existing source curve. Code puts "This segment has [[lindex [$srcCrv(3) getSegments] 1] getPointCount] \ Output This segment has 5 control points. setSegment
This action sets the segment at the given index. Parameters
ReturnsThis action returns nothing. ExampleThis example shows how to set a segment at a certain index in a curve. $srcCrv(1) is referencing an existing source curve. Code set seg(1) [pw::SegmentSpline create] addSegment
This action adds the segment to the end of the segments in the curve. Parameters
ReturnsThis action returns nothing. InformationAn error will be raised if the segment already belongs to another curve or connector. ExampleThis example shows how to add a segment to the end of a curve. $srcCrv(1) is referencing an existing source curve. Code set seg(1) [pw::SegmentSpline create] insertSegment
This action inserts the segment at the given index. Parameters
ReturnsThis action returns nothing. InformationAn error will be raised if the segment already belongs to another curve or connector. Inserting at an index of (number-of-segments + 1) will append the segment. ExampleThis example shows how to insert a segment at the second index of a curve. $srcCrv(1) is referencing an existing source curve. Code set seg(1) [pw::SegmentSpline create] removeSegment
This action removes a segment from the curve. Parameters
ReturnsThis action returns nothing. ExampleThis example shows how to remove a segment from a curve according to its index. $srcCrv(1) is referencing an existing source curve. Code $srcCrv(1) removeSegment 3 removeAllSegments
This action removes all of the segments from the curve. ParametersThis action has no parameters. ReturnsThis action returns nothing. ExampleThis example shows how to remove all segments from a curve. $srcCrv(1) is referencing an existing source curve. Code $srcCrv(1) removeAllSegments replaceAllSegments
This action replaces all of the segments in the curve. Parameters
ReturnsThis action returns nothing. ExampleThis example shows how to replace all the existing segments in a curve with new ones. $srcCrv(1) is referencing an existing source curve. $seg(1) and $seg(2) are referencing existing segments. Code $srcCrv(1) replaceAllSegments [list $seg(1) $seg(2)] getPosition
This action gets a position on a curve in the defining space of the curve. Parameters
ReturnsThis action returns a point giving the position on the curve which may be in the form “u v dbentity”. InformationIf the curve is defined in model space, an xyz vector will be returned. If the curve is defined by a database, the position will be returned in database parameter space. ExampleThis example shows how to get the position at a constant X value on a curve. This curve was created on a database entity. $srcCrv(1) is referencing an existing source curve. Code puts [pw::Application getDescription \ Output curve-1 (0.6,0) getXYZ
This action gets the model space position on a curve. Parameters
ReturnsThis action returns an XYZ vector. ExampleThis example shows how to get the model space position at 3/4 the the length of a curve. $srcCrv(1) is referencing an existing source curve. Code puts [$srcCrv(1) getXYZ -parameter [list 0.75]] Output 3.75 2.0 0.0 getParameter
This action gets a parameter value on a curve. Parameters
ReturnsThis action returns the float parameter of the curve. InformationThe -parameter value option only returns the given value clamped to [0.0, 1.0]. It is included for consistency with other commands. ExampleThis example shows how to get the parameter value of a grid point on a curve. $srcCrv(1) is referencing an existing source curve. Code puts [$srcCrv(1) getParameter -grid 2] Output 0.25 getTangent
This action gets the tangency vector on the source curve at a location. Parameters
ReturnsThis action returns a normalized XYZ vector representing the tangency vector. The vector will be aligned with the parametric direction of the source curve. getLength
This action gets the curve length from the beginning to a given location. Parameters
ReturnsThis action returns the float curve length. InformationThe -arc value option converts value from a normalized to a non-normalized length. It is included for consistency with other commands. ExampleThis example shows how to get the length along a curve from the the point on the curve closest to the given point. $srcCrv(1) is referencing an existing source curve. Code puts [$srcCrv(1) getLength -closest "4.5 1 0"] Output 6.985033540042618 getParameters
This action gets the parameters at which the curve intersects the value. Parameters
ReturnsThis action returns an array of parameters. ExampleThis example shows how to get parameters where this curve crosses Y-axis at 0.5. $srcCrv(1) is referencing an existing source curve. Code puts [$srcCrv(1) getParameters -Y .5] Output 0.17637560670204108 0.2778605205775764 0.692205316990254 getTotalLength
This action gets the total length of the curve. Parameters
ReturnsThis action returns float length with the range [0.0, infinity). ExampleThis example shows how to get the total length of a connecter, plus the length of the part constrained to a database entity. $srcCrv(1) is referencing an existing source curve. Code puts [$srcCrv(1) getTotalLength -constrained onDB] Output 10.012756135615804 spline
This action sets this source curve to a smooth interpolation of the control points of the given source curve. Parameters
ReturnsThis action returns nothing. InformationIf the given source curve is database constrained to a single parameter space, this action will set this source curve to a smooth interpolation in that parameter space, otherwise the curve will be unconstrained. fitLSQ
This action sets this source curve to a least squares fit approximation of the control points of the given source curve. Parameters
ReturnsThis action returns nothing. InformationIf the given source curve is database constrained to a single parameter space, this action will set this source curve to a smooth interpolation in that parameter space, otherwise the source curve will be unconstrained. smoothC1
This action sets this source curve to a C1 continuous approximation of the shape of the given source curve. Parameters
ReturnsThis action returns nothing. InformationIf the given source curve is database constrained to a single parameter space, this action will set this source curve to a smooth interpolation in that parameter space, otherwise the source curve will be unconstrained. split
This action splits the source curve at a given parameter value. Parameters
ReturnsThis action returns a list of the new pw::SourceCurve objects. InformationAny duplicate parameters will be ignored, as well as parameters at the limits of the source curve. project
This action projects this source curve onto one or more database entities. Parameters
ReturnsThis action returns nothing. getDefaultProjectDirection
This action gets the default projection direction for this source curve. ParametersThis action has no parameters. ReturnsThis action returns a vector. setOrientation
This action sets the source curve orientation. Parameters
ReturnsThis action returns nothing. InformationUMinimum and 1 are the same. UMaximum and 2 are the same. alignOrientation
This action aligns the U orientation of the given source curves with this source curve. Parameters
ReturnsThis action returns nothing. InformationAny curves in the given list that are not connected (within tol) to this source curve will be ignored. isClosed
This action checks if the source curve is closed. ParametersThis action has no parameters. ReturnsThis action returns boolean, true if the source curve is closed. isPole
This action check if the source curve is a pole. ParametersThis action has no parameters. ReturnsThis action returns a boolean, true if the source curve is a pole. getDiscontinuities
This action returns a list of parameters at discontinuities with a bend angle greater than the given angle. Parameters
ReturnsThis action returns a list of parameters at discontinuities. closestPoint
This action gets the closest point on this source curve to the given point or ray. Parameters
ReturnsThis action returns a point giving the closest point position and this may be in the form “u v dbentity”. If there is no closest point, the origin (0, 0, 0) will be returned. InformationIf the source curve is defined in model space, an xyz vector will be returned. If the source curve is defined by a database, the position will be returned in database parameter space. closestControlPoint
This action gets the control point on this source curve closest to the given point. Parameters
ReturnsThis action returns a point in model space or the origin (0,0,0) if there is no closest point. getControlPointCount
This action gets the number of control points on this source curve. ParametersThis action has no parameters. ReturnsThis action returns the integer number of control points for this source curve. removeInteriorControlPoints
This action removes the interior control points of each segment of this source curve. ParametersThis action has no parameters. ReturnsThis action returns a boolean which is true if there were any control points removed and false otherwise. |
This action creates a new source curve object.
pw::SourceCurve create
This action joins as many of the given source curves together as possible.
pw::SourceCurve join ?-reject rejectVar? ?-tolerance tol? curves
This action, given two point-lists, returns a segment type, a start point, an end point, and a ProjectToCommon state that represent the best segment for a source curve between the given points.
pw::SourceCurve getBestSegment ?-start startVar? ?-end endVar? ?-projectToCommon projectToCommonVar? start_points end_points
This action gets the number of segments in this curve.
$srcCrv getSegmentCount
This action gets the segment at the given index.
$srcCrv getSegment ?-copy? index
This action gets the list of segments.
$srcCrv getSegments ?-copy?
This action sets the segment at the given index.
$srcCrv setSegment index segment
This action adds the segment to the end of the segments in the curve.
$srcCrv addSegment segment
This action inserts the segment at the given index.
$srcCrv insertSegment index segment
This action removes a segment from the curve.
$srcCrv removeSegment < index | segment >
This action removes all of the segments from the curve.
$srcCrv removeAllSegments
This action replaces all of the segments in the curve.
$srcCrv replaceAllSegments segments
This action gets a position on a curve in the defining space of the curve.
$srcCrv getPosition ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This action gets the model space position on a curve.
$srcCrv getXYZ ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This action gets a parameter value on a curve.
$srcCrv getParameter ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This action gets the tangency vector on the source curve at a location.
$curve getTangent ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This action gets the curve length from the beginning to a given location.
$srcCrv getLength ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This action gets the parameters at which the curve intersects the value.
$srcCrv getParameters ?< -X | -Y | -Z >? value
This action gets the total length of the curve.
$srcCrv getTotalLength ?-constrained constrainedVar?
This action sets this source curve to a smooth interpolation of the control points of the given source curve.
$srcCrv spline ?curve?
This action sets this source curve to a least squares fit approximation of the control points of the given source curve.
$srcCrv fitLSQ ?-tolerance tol? ?curve?
This action sets this source curve to a C1 continuous approximation of the shape of the given source curve.
$srcCrv smoothC1 ?-tolerance tol? ?curve?
This action splits the source curve at a given parameter value.
$srcCrv split parameters
This action projects this source curve onto one or more database entities.
$srcCrv project ?-type proj_type? ?-direction direction? ?-center center? ?-axis point normal? ?-fit tolerance? ?-interior? ?dbentities?
This action gets the default projection direction for this source curve.
$srcCrv getDefaultProjectDirection
This action sets the source curve orientation.
$srcCrv setOrientation umin_end
This action aligns the U orientation of the given source curves with this source curve.
$srcCrv alignOrientation ?-tolerance tol? curves
This action checks if the source curve is closed.
$srcCrv isClosed
This action check if the source curve is a pole.
$srcCrv isPole
This action returns a list of parameters at discontinuities with a bend angle greater than the given angle.
$srcCrv getDiscontinuities ?angle?
This action gets the closest point on this source curve to the given point or ray.
$srcCrv closestPoint ?-from fromVar? ?-distance distVar? ?-parameter paramVar? point ?dir?
This action gets the control point on this source curve closest to the given point.
$srcCrv closestControlPoint ?-from fromVar? ?-distance distVar? ?-parameter paramVar? ?-index indexVar? point ?dir?
This action gets the number of control points on this source curve.
$srcCrv getControlPointCount
This action removes the interior control points of each segment of this source curve.
$srcCrv removeInteriorControlPoints