pw::Curve

Database curve type

Derives From

pw::Object pw::Entity pw::DatabaseEntity

Summary
pw::CurveDatabase curve type
Static Actions
createThis action creates a new curve object.
joinThis action joins as many of the given curves together as possible.
getBestSegmentThis 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 database curve between the given points.
getOffsetPointThis action gets the best offset point for the given curve.
getOffsetNormalThis action finds the best offset normal vector from this curve to a point.
Instance Actions
getSegmentCountThis action gets the number of segments in this curve.
getSegmentThis action gets the segment at the given index.
getSegmentsThis action gets all the segments.
setSegmentThis action sets the segment at the given index.
addSegmentThis action adds the segment to the end of the segments in the curve.
insertSegmentThis action inserts the segment at the given index.
removeSegmentThis action removes a segment from the curve.
removeAllSegmentsThis action removes all of the segments from the curve.
replaceAllSegmentsThis action replaces all of the segments in the curve.
getPositionThis action gets a position on a curve in the defining space of the curve.
getXYZThis action gets a position on the curve in model space.
getParameterThis action gets a normalized parameter value on a curve.
getRadiusOfCurvatureThis action returns the radius of curvature at the specified position on this curve.
getTangentThis action gets the tangency vector on the curve at a location.
getGeometricPropertiesThis action calculates the geometric properties at the specified position on the curve.
getLengthThis action gets the curve length from the beginning to a given location.
getParametersThis action gets the parameters at which the curve intersect the value.
getTotalLengthThis action gets the total length of the curve.
offsetThis action sets this curve as an offset from the given curve.
getOffsetPointThis action gets the best offset point for the given curve.
getOffsetNormalThis action finds the best offset normal vector from this curve to a point.
extractThis action sets this curve as a constant paramater curve of the given surface.
splineThis action sets this curve to a smooth interpolation of the control points of the given curve.
fitLSQThis action sets this curve to a least squares fit approximation of the control points of the given curve.
smoothC1This action sets this curve to a C1 continuous approximation of the shape of the given curve.
splitThis action splits the curve at a given parameter value.
projectThis action projects this curve onto one or more database entities.
getDefaultProjectDirectionThis action gets the default projection direction for this curve.
setOrientationThis action sets the curve orientation.
alignOrientationThis action aligns the U orientation of the given curves with this curve.
getAssembleToleranceThis action returns the maximum tolerance used to close the model along the curve.
isClosedThis action checks if the curve is closed.
isPoleThis action check if the curve is a pole.
getDiscontinuitiesThis action returns a list of parameters at discontinuities with a bend angle greater than the given angle.
closestControlPointThis action gets the control point on this curve closest to the given point or ray.
getControlPointCountThis action gets the number of control points on this curve.
getControlPointsThis action gets the control point array of this curve.
removeInteriorControlPointsThis action removes the interior control points of each segment of this curve.

Static Actions

create

pw::Curve create

This action creates a new curve object.

Parameters

This action has no parameters.

Returns

This action returns a new pw::Curve object.

join

pw::Curve join ?-reject rejectVar? ?-tolerance tol? curves

This action joins as many of the given curves together as possible.

Parameters

-reject rejectVarThis optional parameter is the string name of a variable to receive a list of pw::Curve objects that were not used in joining.
-tolerance tolThis optional parameter is the join tolerance, with the default value being the current fit tolerance.
curvesThis parameter is a list of pw::Curve objects to join.

Returns

This action returns a list of the pw::Curve objects that were joined.

Information

This command supports progress updates.

getBestSegment

pw::Curve getBestSegment ?-start startVar? ?-end endVar? ?-projectToCommon projectToCommonVar? start_points end_points

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 database curve between the given points.

Parameters

-start startVarThis optional parameter is the string name of a variable to receive the best start integer index or point.
-end endVarThis optional parameter is the string name of a variable to receive the best end integer index or point.
-projectToCommon projectToCommonVarThis optional parameter is the string name of a variable to receive the ProjectToCommon <bool> state for the best segment.
start_pointsThis parameter is a list of points for the start of the segment.
end_pointsThis parameter is a list of points for the end of the segment.

Returns

This action returns a segment type string.

Example

This example shows how to find the best segment between two end points.

Code

puts [pw::Curve getBestSegment -start st -end en \
    [list {0 10 0} {10 10 0}]
puts $st; puts $en

Output

pw::SegmentSpline
0
0

getOffsetPoint

pw::Curve getOffsetPoint ?-flip? curve target_point ?dir?

This action gets the best offset point for the given curve.

Parameters

-flipThis optional falg is the notification that the offset point will be flipped to the opposite side of the curve.
curveThis parameter is a pw::Curve object or a boundary to offset from
target_pointThis parameter finds the offset point closest to point target_point.
dirThis parameter is a direction vector that is used to find the closest offset point to a ray.

Returns

This action returns the offset point.

getOffsetNormal

pw::Curve getOffsetNormal ?-flip? curve point ?dir?

This action finds the best offset normal vector from this curve to a point.

Parameters

-flipThis optional flag is the notification that the offset normal will be flipped to the opposite side of the curve.
curveThis parameter is a pw::Curve object or a boundary to offset from
target_pointThis parameter finds the offset vector closest to point target_point.
dirThis parameter is a direction vector and is used to find the best offset normal vector to a ray.

Returns

This action returns the best normal vector.

Instance Actions

getSegmentCount

$curve getSegmentCount

This action gets the number of segments in this curve.

Parameters

This action has no parameters.

Returns

This action returns the integer number of segments.

getSegment

$curve getSegment ?-copy? index

This action gets the segment at the given index.

Parameters

-copyThis optional flag is a notification that a copy of the segment is returned.
indexThis parameter is the integer index of the segment to get with the range [1, number of segments].

Returns

This action returns a pw::Segment object.

getSegments

$curve getSegments ?-copy?

This action gets all the segments.

Parameters

-copyThis optional flag is a notification that a copy of the segments are returned.

Returns

This action returns a pw::Segment object list.

setSegment

$curve setSegment index segment

This action sets the segment at the given index.

Parameters

indexThis parameter is the integer index of the segment to set with the range [1, number of segments].
segmentThis parameter is the pw::Segment object to set.

Returns

This action returns nothing.

addSegment

$curve addSegment segment

This action adds the segment to the end of the segments in the curve.

Parameters

segmentThis parameter is the pw::Segment object to add.

Returns

This action returns nothing.

Information

An error will be raised if the segment already belongs to another curve.

insertSegment

$curve insertSegment index segment

This action inserts the segment at the given index.

Parameters

indexThis parameter is the integer index to insert the given segment at with the range [1, number of segments + 1].
segmentThis parameter is the pw::Segment object to insert.

Returns

This action returns nothing.

Information

An error will be raised if the segment already belongs to another curve.

removeSegment

$curve removeSegment < index | segment >

This action removes a segment from the curve.

Parameters

indexThis parameter is the integer index of the segment to remove with the range [1, number of segments].
segmentThis parameter is a pw::Segment object to remove.

Returns

This action returns nothing.

removeAllSegments

$curve removeAllSegments

This action removes all of the segments from the curve.

Parameters

This action has no parameters.

Returns

This action returns nothing.

replaceAllSegments

$curve replaceAllSegments segments

This action replaces all of the segments in the curve.

Parameters

segmentsThis parameter is a list of pw::Segment objects that will be the new segments of this curve.

Returns

This action returns nothing.

getPosition

$curve getPosition ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value

This action gets a position on a curve in the defining space of the curve.

Parameters

-parameterThis optional flag is notification to get the position 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.
-controlThis optional flag denotes that value represents a control point index.  value is an integer index with the range [1, number of control points].  See getControlPointCount.
-arcThis optional flag designates value as the normalized arc length from the start of the curve.  value is a float with the range [0.0, 1.0].
-XThis optional flag causes the routine to calculate the position at the singular point on the curve at X = value.  An error is returned if there is not a unique point.
-YThis optional flag causes the routine to calculate the position at the singular point on the curve at Y = value.  An error is returned if there is not a unique point.
-ZThis optional flag causes the routine to calculate the position at the singular point on the curve at Z = value.  An error is returned if there is not a unique point.
-closestThis optional flag results in the routine calculating the position of the point on the curve closest to the specified valuevalue is an xyz point, or grid coord.
valueThis parameter is the value at which to get the position.  Its interpretation is determined by the above flags.  The default mode is the -parameter flag.

Returns

This action returns a point giving the position on the curve (may be in the form “u v dbentity”).

getXYZ

$curve getXYZ ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value

This action gets a position on the curve in model space.

Parameters

-parameterThis optional flag is notification to get the XYZ value 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.
-controlThis optional flag denotes that value represents a control point index.  value is an integer index with the range [1, number of control points].  See getControlPointCount.
-arcThis optional flag designates value as the normalized arc length from the start of the curve.  value is a float with the range [0.0, 1.0].
-XThis optional flag causes the routine to calculate the XYZ value at the singular point on the curve at X = value.  An error is returned if there is not a unique point.
-YThis optional flag causes the routine to calculate the XYZ value at the singular point on the curve at Y = value.  An error is returned if there is not a unique point.
-ZThis optional flag causes the routine to calculate the XYZ value at the singular point on the curve at Z = value.  An error is returned if there is not a unique point.
-closestThis optional flag results in the routine calculating the XYZ value of the point on the curve closest to the specified valuevalue is an xyz point, or grid coord.
valueThis parameter is the value at which to get the XYZ value.  Its interpretation is determined by the above flags.  The default mode is the -parameter flag.

Returns

This action returns an XYZ vector.

getParameter

$curve getParameter ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value

This action gets a normalized parameter value on a curve.

Parameters

-parameterThis optional flag is notification to get the position 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.
-controlThis optional flag denotes that value represents a control point index.  value is an integer index with the range [1, number of control points].  See getControlPointCount.
-arcThis optional flag designates value as the normalized arc length from the start of the curve.  value is a float with the range [0.0, 1.0].
-XThis optional flag causes the routine to calculate the parameter at the singular point on the curve at X = value.  An error is returned if there is not a unique point.
-YThis optional flag causes the routine to calculate the parameter at the singular point on the curve at Y = value.  An error is returned if there is not a unique point.
-ZThis optional flag causes the routine to calculate the parameter at the singular point on the curve at Z = value.  An error is returned if there is not a unique point.
-closestThis optional flag results in the routine calculating the parameter of the point on the curve closest to the specified valuevalue is an xyz point, or grid coord.
valueThis parameter is the value at which to get the parameter.  Its interpretation is determined by the above flags.  The default mode is the -parameter flag.

Returns

This action returns the float parameter of the curve.

Information

The -parameter value option only returns the given value clamped to [0.0, 1.0].  It is included for consistency with other commands.

getRadiusOfCurvature

$curve getRadiusOfCurvature ?-surface? ?< -control | -parameter | -arc | -X | -Y | -Z | -closest >? value

This action returns the radius of curvature at the specified position on this curve.

Parameters

-surfaceThis optional flag is the notification to return the surface curvature, rather than the curve curvature, if the specified position lies on a curve that is constrained to a surface.
-parameterThis optional flag is notification to get the radius 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.
-controlThis optional flag denotes that value represents a control point index.  value is an integer index with the range [1, number of control points].  See getControlPointCount.
-arcThis optional flag designates value as the normalized arc length from the start of the curve.  value is a float with the range [0.0, 1.0].
-XThis optional flag causes the routine to calculate the position at the singular point on the curve at X = value.  An error is returned if there is not a unique point.
-YThis optional flag causes the routine to calculate the position at the singular point on the curve at Y = value.  An error is returned if there is not a unique point.
-ZThis optional flag causes the routine to calculate the position at the singular point on the curve at Z = value.  An error is returned if there is not a unique point.
-closestThis optional flag results in the routine calculating the position of the point on the curve closest to the specified valuevalue is an xyz point, or grid coord.
valueThis parameter is the value at which to get the position.  Its interpretation is determined by the above flags.  The default mode is the -parameter flag.

Returns

This action returns a float radius of curvature.

Information

If there is no curvature, a radius of zero will be returned.

getTangent

$curve getTangent ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value

This action gets the tangency vector on the curve at a location.

Parameters

-parameterThis 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.
-controlThis optional flag denotes that value represents a control point index.  value is an integer index with the range [1, number of control points].  See getControlPointCount.
-arcThis optional flag designates value as the normalized arc length from the start of the curve.  value is a float with the range [0.0, 1.0].
-XThis optional flag causes the routine to calculate the tangent vector at the singular point on the curve at X = value.  An error is returned if there is not a unique point.
-YThis optional flag causes the routine to calculate the tangent vector at the singular point on the curve at Y = value.  An error is returned if there is not a unique point.
-ZThis optional flag causes the routine to calculate the tangent vector at the singular point on the curve at Z = value.  An error is returned if there is not a unique point.
-closestThis optional flag results in the routine calculating the tangent vector of the point on the curve closest to the specified valuevalue is an xyz point, or grid coord.
valueThis parameter is the value at which to get the tangent vector.  Its interpretation is determined by the above flags.  The default mode is the -parameter flag.

Returns

This action returns a normalized XYZ vector representing the tangency vector.  The vector will be aligned with the parametric direction of the curve.

See Also

pw::Curve.getGeometricProperties

getGeometricProperties

$curve getGeometricProperties ?-curve curveVar? ?-surface surfaceVar? ?-directional directionalVar? ?-orthogonal orthogonalVar? ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value

This action calculates the geometric properties at the specified position on the curve.

Parameters

-curve curveVarThis optional parameter is the string name of a variable to receive an array of curve-based geometric properties.  The array indices and the values are listed below.
-surface surfaceVarThis optional parameter is the string name of a variable to receive an array of surface-based geometric properties, if the specified position is constrained to a surface.  The array indices and the values are listed below.
-directional directionalVarThis optional parameter is the string name of a variable to receive an array of surface-based geometric properties in the direction of the curve, if the specified position is constrained to a surface.  The array indices and the values are listed below.
-orthogonal orthogonalVarThis optional parameter is the string name of a variable to receive an array of surface-based geometric properties in the direction orthogonal to the curve, if the specified position is constrained to a surface.  The array indices and the values are listed below.
-gridThis optional flag is the notification to get the geometric properties at a grid point. value is an integer index [1, number of grid points].  This is the default option.
-controlThis optional flag is the notification to get the geometric properties at a control point.  The value is an integer index with the range [1, number of control points].
-parameterThis optional flag is the notification to get the geometric properties at a parameter.  The value is a float with the range [0.0, 1.0] or a uv vector with v ignored.
-arcThis optional flag is the notification to get the geometric properties at an arc length.  The value is a normalized float arc length from the start of the curve with the range [0.0, 1.0].
-XThis optional flag is the notification to get the geometric properties at a constant x; value is a float constant x coordinate value.
-YThis optional flag is the notification to get the geometric properties at a constant y; value is a float constant y coordinate value.
-ZThis optional flag is the notification to get the geometric properties at a constant z; value is a float constant z coordinate value.
-closestThis optional flag is the notification to get geometric properties at the closest position; the value is an xyz point, or grid coord.
valueThis parameter is the position value.

Returns

This action returns nothing.

Curve-based Geometry Properties Array

This array is divided into the following elements.

PointThis element is the point location of the curve that these geometric properties are for.
UVThis is the vector non-normalized UV parameter of the curve.
LimitsUThis is the vector non-normalized parameter limits in U of the curve.
LimitsVThis is the vector non-normalized parameter limits in V of the curve.
RadiusOfCurvatureThis element is the float radius of curvature of the curve.
NormalThis element is the vector normal of the curve.
TangentThis element is the vector tangent of the curve.
AssembleToleranceThis element is the assembly tolerance if the curve is an edge curve.
CurveToleranceThis element is the tolerance of the surface curve if the curve is an edge curve.

Surface-based Geometry Properties Array

This array is divided into the following elements.  If the curve is not constrained to a surface, the elements will be set to 0.  If the curve is constrained to multiple surfaces, the surface with the smallest minimum radius of curvature will be used for all properties.

PointThis element is the point on the surface that the curve is constrained to and these surface geometric properties are for.
UVThis is the vector non-normalized UV parameter of the surface that the curve is constrained to.
LimitsUThis is the vector non-normalized parameter limits in U of the surface that the curve is constrained to.
LimitsVThis is the vector non-normalized parameter limits in V of the surface that the curve is constrained to.
RadiusOfCurvatureThis element is the float minimum radius of curvature.
GaussianCurvatureThis element is the float gaussian curvature in radians per unit length.
AverageCurvatureThis element is the float average curvature in radians per unit length.
MinimumCurvatureThis element is the float minimum curvature in radians per unit length.
MaximumCurvatureThis element is the float maximum curvature in radians per unit length.
NormalThis element is the vector normal of the surface.
PrincipalThis element is the vector principal tangent of the surface, which points in the direction of minimum curvature.
dPdUThis element is the vector first partial derivative in U.
dPdVThis element is the vector first partial derivative in V.
d2PdU2This element is the vector second partial derivative in U.
d2PdUdVThis element is the vector second partial derivative in UV.
d2PdV2This element is the vector second partial derivative in V.

Directional and Orthogonal Surface-based Geometry Properties Array

This array is divided into the following elements.  If the curve is not constrained to a surface, the elements will be set to 0.  If the curve is constrained to multiple surfaces, the surface with the smallest minimum radius of curvature will be used for all properties.

RadiusOfCurvatureThis element is the float radius of curvature in the direction of (or orthogonal to) the curve.
DirectionThis element is the vector derivative of (or orthogonal to) the curve.
DirectionUVThis element is the vector derivative of (or orthogonal to) the curve in the UV parameter space of the surface.
dPdDThis element is the vector first derivative of the surface in the direction given by the DirectionUV element.
d2PdD2This element is the vector second derivative of the surface in the direction given by the DirectionUV element.

getLength

$curve getLength ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value

This action gets the curve length from the beginning to a given location.

Parameters

-parameterThis optional flag indicates that the specified value should be interpreted as a normalized parametric value.  value is expected to be 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.  This is the default mode.
-controlThis optional flag denotes that value represents a control point index.  value is an integer index with the range [1, number of control points].  See getControlPointCount.
-arcThis optional flag designates value as the normalized arc length from the start of the curve.  value is a float with the range [0.0, 1.0].  A value of 1 will return the total length of the curve.
-XThis optional flag causes the routine to calculate the length of the curve from the beginning to the singular point on the curve at X = value.  An error is returned if there is not a unique point.
-YThis optional flag causes the routine to calculate the length of the curve from the beginning to the singular point on the curve at Y = value.  An error is returned if there is not a unique point.
-ZThis optional flag causes the routine to calculate the length of the curve from the beginning to the singular point on the curve at Z = value.  An error is returned if there is not a unique point.
-closestThis optional flag results in the routine calculating the length from the beginning to the point on the curve closest to the specified valuevalue is an xyz point, or grid coord.
valueThis parameter is the value at which to get the length.  Its interpretation is determined by the above flags.  The default mode is the -parameter flag.

Returns

This action returns the float curve length.

Information

The -arc value option converts value from a normalized to a non-normalized length.  It is included for consistency with other commands.

See also the getTotalLength command.

getParameters

$curve getParameters ?< -X | -Y | -Z >? value

This action gets the parameters at which the curve intersect the value.

Parameters

-XThis optional flag is the notification to get the position at a constant x. value is a float constant x coordinate value.
-YThis optional flag is the notification to get the position at a constant y; value is a float constant y coordinate value.
-ZThis optional flag is the notification to get the position at a constant z; value is a float constant z coordinate value.
valueThis parameter is the value to get the position.

Returns

This action returns an array of parameters.

getTotalLength

$curve getTotalLength ?-constrained constrainedVar?

This action gets the total length of the curve.

Parameters

-constrained constrainedVarThis optional parameter is the string name of a variable to receive the length of the this entity, that is constrained to database entities.

Returns

This action returns the float length which has the range [0.0, infinity).

offset

$curve offset ?-normal vec? ?-tolerance tol? ?-flip? ?-computedDistance computedDistanceVar? < distance | point > curve

This action sets this curve as an offset from the given curve.

Parameters

-normal vecThis optional parameter is the normal vector of the plane in which the curve will be offset with default (0, 0, 1).
-tolerance tolThis optional parameter is the float tolerance used to create the offset curve with defaults to the fit tolerance.
-flipThis optional flag is the notification to reverse the offest curve.
-computedDistance computedDistanceVarThis optional parameter is the string name of a variable to receive the computed offset distance.
distanceThis parameter is the float distance to offset the curve.
pointThis parameter is the point to offset to.
curveThis parameter is a pw::Curve object to offset from.

Returns

This action returns the float offset distance.

Information

The returned distance is calculated if using an offset point.  Otherwise the return is the provided input distance.

If the offset curve cannot be created then the curve will be empty.

getOffsetPoint

$curve getOffsetPoint ?-flip? target_point ?dir?

This action gets the best offset point for the given curve.

Parameters

-flipThis optional falg is the notification that the offset point will be flipped to the opposite side of the curve.
target_pointThis parameter finds the offset point closest to point target_point.
dirThis parameter is a direction vector that is used to find the closest offset point to a ray.

Returns

This action returns the offset point.

getOffsetNormal

$curve getOffsetNormal ?-flip? point ?dir?

This action finds the best offset normal vector from this curve to a point.

Parameters

-flipThis optional flag is the notification that the offset normal will be flipped to the opposite side of the curve.
target_pointThis parameter finds the offset vector closest to point target_point.
dirThis parameter is a direction vector and is used to find the best offset normal vector to a ray.

Returns

This action returns the best normal vector.

extract

$curve extract ?< -U | -V >? parameter surface

This action sets this curve as a constant paramater curve of the given surface.

Parameters

-UThis optional flag is the notification to extract at a constant u parameter.  This is the default.
-VThis optional flag is the notification to extract at a constant v parameter.
parameterThis parameter is the float parameter to extract with the range [0.0, 1.0].
surfaceThis parameter is the pw:: Surface to extract the curve from.

Returns

This action returns nothing.

spline

$curve spline ?curve?

This action sets this curve to a smooth interpolation of the control points of the given curve.

Parameters

curveThis optional parameter is a pw::Curve object or boundary whose control points will be interpolated.  If not given the spline action will interpolate this curve’s own control points.

Returns

This action returns nothing.

Information

If the given curve is database constrained to a single parameter space, this action will set this curve to a smooth interpolation in that parameter space, otherwise the curve will be unconstrained.

fitLSQ

$curve fitLSQ ?-tolerance tol? ?curve?

This action sets this curve to a least squares fit approximation of the control points of the given curve.

Parameters

-tolerance tolThis optional parameter is the float approximation tolerance with the range [0, infinity).  The default is the current tolerance returned from <getFitTolerance>.
curveThis optional parameter is a pw::Curve object or boundary whose control points will be fitted to.  If not given the fitLSQ action will be fitted to this curve’s own control points.

Returns

This action returns nothing.

Information

If the given curve is database constrained to a single parameter space, this action will set this curve to a fitted curve in that parameter space, otherwise the curve will be unconstrained.

smoothC1

$curve smoothC1 ?-tolerance tol? ?curve?

This action sets this curve to a C1 continuous approximation of the shape of the given curve.

Parameters

-tolerance tolThis optional parameter is the float approximation tolerance with the range [0, infinity).  The default is the current tolerance returned from <getFitTolerance>.
curveThis optional parameter is a pw::Curve object or boundary whose shape will be approximated.  If not given the smoothC1 action will approximate this curve’s own shape.

Returns

This action returns nothing.

Information

If the given curve is database constrained to a single parameter space, this action will set this curve to a smooth interpolation in that parameter space, otherwise the curve will be unconstrained.

split

$curve split parameters

This action splits the curve at a given parameter value.

Parameters

parametersThis parameter is a list of float parameters to split at with the range [0, 1].

Returns

This action returns a list of the new pw::Curve objects.

Information

Any duplicate parameters will be ignored, as well as parameters at the limits of the curve.

project

$curve project ?-type proj_type? ?-direction direction? ?-center center? ?-axis point normal? ?-fit tolerance? ?-interior? ?dbentities?

This action projects this curve onto one or more database entities.

Parameters

-type proj_typeThis optional parameter is the string projection type to perform with options < ClosestPoint | Linear | SphericalIn | SphericalOut | CylindricalIn | CylindricalOut >.
-direction directionThis optional parameter is the projection vector for linear projection.  The default is determined by the entity and can be queried using getDefaultProjectDirection.
-center centerThis optional parameter is the center point vector for spherical projection.  The default is (0, 0, 0).
-axis point normalThis optional parameter is the axis defined by a point vector and normal vector used by cylindrical projection; The default point is (0, 0, 0) and the default normal is (1, 0, 0).
-fit toleranceThis is an optional parameter that is used to fit any curve-like entities.  The default for this is 0 which means there is no fitting applied onto the projected curve.  The valid range for this parameter is [0,infinity)
-interiorIf this optional flag is present, only the interior of the entities are projected.
dbentitiesThis parameter is the optional list of database curve and surface-like entities to project onto.  If none are given, project to any currently enabled, visible database surface-like entities.

Returns

This action returns nothing.

getDefaultProjectDirection

$curve getDefaultProjectDirection

This action gets the default projection direction for this curve.

Parameters

This action has no parameters.

Returns

This action returns a vector.

setOrientation

$curve setOrientation umin_end

This action sets the curve orientation.

Parameters

umin_endThis parameter is the integer id of the Umin end with options < UMinimum | 1 | UMaximum | 2 >.

Returns

This action returns nothing.

Information

UMinimum and 1 are the same.  UMaximum and 2 are the same.

alignOrientation

$curve alignOrientation ?-tolerance tol? curves

This action aligns the U orientation of the given curves with this curve.

Parameters

-tolerance tolThis optional parameter is the float tolerance used to consider curves adjacent.  The default is fit tolerance.
curvesThis parameter is a list of pw::Curve objects to align with.

Returns

This action returns nothing.

Information

Any curves in the given list that are not connected (within tol) to this curve will be ignored.

getAssembleTolerance

$curve getAssembleTolerance

This action returns the maximum tolerance used to close the model along the curve.

Parameters

This action has no parameters.

Returns

This action returns the maximimum tolerance required to close the model along the curve.  If the curve is not used to close a model, the return value is zero.

isClosed

$curve isClosed

This action checks if the curve is closed.

Parameters

This action has no parameters.

Returns

This action returns boolean, true if the curve is closed.

isPole

$curve isPole

This action check if the curve is a pole.

Parameters

This action has no parameters.

Returns

This action returns a boolean, true if the curve is a pole.

getDiscontinuities

$curve getDiscontinuities ?angle?

This action returns a list of parameters at discontinuities with a bend angle greater than the given angle.

Parameters

angleAll discontinuies with a bend angle greater than this given angle will be returned; the default is 0.0 which will return all discontinuities.

Returns

This action returns a list of parameters at discontinuities.

closestControlPoint

$curve closestControlPoint ?-from fromVar? ?-distance distVar? ?-index indexVar? point ?dir?

This action gets the control point on this curve closest to the given point or ray.

Parameters

-from fromVarThis optional parameter is the string name of a variable to receive the xyz of the given point or the point along the ray that is closest to this curve.
-distance distVarThis optional parameter is the string name of a variable to receive the float distance between the given point or ray and the point returned.
-index indexVarThis optional parameter is the string name of a variable to receive the control point index of the closest control point.
pointThis parameter is the point to project onto this database curve.
dirThis optional parameter is a direction vector for finding the closest point from a ray.

Returns

This action returns a point in the parameter space of this database curve or the origin (0,0,0) if there is no closest point.

getControlPointCount

$curve getControlPointCount

This action gets the number of control points on this curve.

Parameters

This action has no parameters.

Returns

This action returns the integer number of control points for this curve.

getControlPoints

$curve getControlPoints

This action gets the control point array of this curve.

Parameters

This action has no parameters.

Returns

This action returns the control points for this curve.

removeInteriorControlPoints

$curve removeInteriorControlPoints

This action removes the interior control points of each segment of this curve.

Parameters

This action has no parameters.

Returns

This action returns a boolean which is true if there were any control points removed and false otherwise.

pw::Curve create
This action creates a new curve object.
pw::Curve join ?-reject rejectVar? ?-tolerance tol? curves
This action joins as many of the given curves together as possible.
pw::Curve getBestSegment ?-start startVar? ?-end endVar? ?-projectToCommon projectToCommonVar? start_points end_points
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 database curve between the given points.
pw::Curve getOffsetPoint ?-flip? curve target_point ?dir?
This action gets the best offset point for the given curve.
A point is a position either in model space or database parameter space.
pw::Curve getOffsetNormal ?-flip? curve point ?dir?
This action finds the best offset normal vector from this curve to a point.
$curve getSegmentCount
This action gets the number of segments in this curve.
$curve getSegment ?-copy? index
This action gets the segment at the given index.
$curve getSegments ?-copy?
This action gets all the segments.
$curve setSegment index segment
This action sets the segment at the given index.
$curve addSegment segment
This action adds the segment to the end of the segments in the curve.
$curve insertSegment index segment
This action inserts the segment at the given index.
$curve removeSegment < index | segment >
This action removes a segment from the curve.
$curve removeAllSegments
This action removes all of the segments from the curve.
$curve replaceAllSegments segments
This action replaces all of the segments in the curve.
$curve getPosition ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This action gets a position on a curve in the defining space of the curve.
$curve getXYZ ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This action gets a position on the curve in model space.
$curve getParameter ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This action gets a normalized parameter value on a curve.
$curve getRadiusOfCurvature ?-surface? ?< -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action returns the radius of curvature at the specified position on this curve.
$curve getTangent ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This action gets the tangency vector on the curve at a location.
$curve getGeometricProperties ?-curve curveVar? ?-surface surfaceVar? ?-directional directionalVar? ?-orthogonal orthogonalVar? ?< -grid | -control | -parameter | -arc | -X | -Y | -Z | -closest >? value
This action calculates the geometric properties at the specified position on the curve.
$curve getLength ?< -parameter | -control | -arc | -X | -Y | -Z | -closest >? value
This action gets the curve length from the beginning to a given location.
$curve getParameters ?< -X | -Y | -Z >? value
This action gets the parameters at which the curve intersect the value.
$curve getTotalLength ?-constrained constrainedVar?
This action gets the total length of the curve.
$curve offset ?-normal vec? ?-tolerance tol? ?-flip? ?-computedDistance computedDistanceVar? < distance | point > curve
This action sets this curve as an offset from the given curve.
$curve extract ?< -U | -V >? parameter surface
This action sets this curve as a constant paramater curve of the given surface.
$curve spline ?curve?
This action sets this curve to a smooth interpolation of the control points of the given curve.
$curve fitLSQ ?-tolerance tol? ?curve?
This action sets this curve to a least squares fit approximation of the control points of the given curve.
$curve smoothC1 ?-tolerance tol? ?curve?
This action sets this curve to a C1 continuous approximation of the shape of the given curve.
$curve split parameters
This action splits the curve at a given parameter value.
$curve project ?-type proj_type? ?-direction direction? ?-center center? ?-axis point normal? ?-fit tolerance? ?-interior? ?dbentities?
This action projects this curve onto one or more database entities.
$curve getDefaultProjectDirection
This action gets the default projection direction for this curve.
$curve setOrientation umin_end
This action sets the curve orientation.
$curve alignOrientation ?-tolerance tol? curves
This action aligns the U orientation of the given curves with this curve.
$curve getAssembleTolerance
This action returns the maximum tolerance used to close the model along the curve.
$curve isClosed
This action checks if the curve is closed.
$curve isPole
This action check if the curve is a pole.
$curve getDiscontinuities ?angle?
This action returns a list of parameters at discontinuities with a bend angle greater than the given angle.
$curve closestControlPoint ?-from fromVar? ?-distance distVar? ?-index indexVar? point ?dir?
This action gets the control point on this curve closest to the given point or ray.
$curve getControlPointCount
This action gets the number of control points on this curve.
$curve getControlPoints
This action gets the control point array of this curve.
$curve removeInteriorControlPoints
This action removes the interior control points of each segment of this curve.
Base type for all glyph types
Entity type
Base type for all database entities
Database curve type
A string is an array of characters.
An integer is a whole number.
A boundary is reference to either a database curve or the edge of a database surface.
A vector is a list of float values.
Connector and Curve segment type
A float is a fractional number.
A coord is a position in grid space.
Database surface type
A boolean is represented as a 0 or 1, with 0 being false and 1 being true.
Close