pw::SourcePoint

Source point type

Derives From

pw::Object pw::Entity pw::SourceEntity

Summary
pw::SourcePointSource point type
Static Actions
createThis action creates a new source point object.
Instance Actions
setPointThis action sets the position of this source point.
setAveragePointThis action sets the position of this source point to the average of the given points in cartesian space.
getPointThis action gets the control point of this soiurce point.
getPositionThis action gets the position in the defining space of the point at the given parameter or index.
getXYZThis action gets the position of the point in model space at the given parameter or index
isConstrainedThis action checks to see if the point is database constrained.

Static Actions

create

pw::SourcePoint create

This action creates a new source point object.

Parameters

none

Returns

This action returns a new pw::SourcePoint object.

Instance Actions

setPoint

$point setPoint point

This action sets the position of this source point.

Parameters

pointThis parameter is the new position.

Returns

This action returns nothing.

setAveragePoint

$point setAveragePoint points

This action sets the position of this source point to the average of the given points in cartesian space.

Parameters

pointsThis parameter is a list of points.

Returns

This action returns nothing.

getPoint

$point getPoint

This action gets the control point of this soiurce point.

Parameters

none

Returns

This action returns the control point.

getPosition

$point getPosition ?< -parameter | -index > value?

This action gets the position in the defining space of the point at the given parameter or index.

Parameters

-parameterThis optional flag indicates that value is interpreted as a parameter.  The value is a float with the range [0.0, 1.0], or a uv vector with u and v both having the range [0.0, 1.0].
-indexThis optional flag indicates that value is interpreted as a control point index with the range [1, 1].
valueThis optional parameter indicates the position.

Returns

This action returns the same point for all valid values.  The returned point may be in the form “u v dbentity”.

Example

This example gets the point’s position.  $surface is referencing an existing database surface.

Code

set point [pw::SourcePoint create]
$point setPoint [list 0.5 0.6 $surface]
puts "\{ [$point getXYZ] \}"
puts "\{ [$point getXYZ -index 1] \}"
puts "\{ [$point getXYZ -parameter 0] \}"
puts "\{ [$point getXYZ -parameter {0 0}] \}"

Output

{ 0.5 0.6 ::pw::Surface_4 }
{ 0.5 0.6 ::pw::Surface_4 }
{ 0.5 0.6 ::pw::Surface_4 }
{ 0.5 0.6 ::pw::Surface_4 }

getXYZ

$point getXYZ ?< -parameter | -index > value?

This action gets the position of the point in model space at the given parameter or index

Parameters

-parameterThis optional flag indicates that value is interpreted as a parameter.  The value is a float with the range [0.0, 1.0], or a uv vector with u and v both having the range [0.0, 1.0].
-indexThis optional flag indicates that value is interpreted as a control point index with the range [1, 1].
valueThis optional parameter indicates the position.

Returns

This action returns the same XYZ vector for all valid values.

Example

This example gets the point’s XYZ location.  $surface is referencing an existing database surface.

Code

set point [pw::SourcePoint create]
$point setPoint [list 0.5 0.6 $surface]
puts "\{ [$point getXYZ] \}"
puts "\{ [$point getXYZ -index 1] \}"
puts "\{ [$point getXYZ -parameter 0] \}"
puts "\{ [$point getXYZ -parameter {1 1}] \}"

Output

{ -19.551259370339967 6.9502396184800865 -13.487247573541483 }
{ -19.551259370339967 6.9502396184800865 -13.487247573541483 }
{ -19.551259370339967 6.9502396184800865 -13.487247573541483 }
{ -19.551259370339967 6.9502396184800865 -13.487247573541483 }

isConstrained

$point isConstrained

This action checks to see if the point is database constrained.

Parameters

This action has no parameters.

Returns

This action returns a boolean.

Example

This example checks to see if the point is database constrained.  $surface is referencing an existing database surface.

Code

set point [pw::SourcePoint create]
$point setPoint [list 0.5 0.5 $surface]
puts [$point isConstrained]
$point setPoint {10.5 11.5 12.5}
puts [$point isConstrained]

Output

1
0
pw::SourcePoint create
This action creates a new source point object.
$point setPoint point
This action sets the position of this source point.
$point setAveragePoint points
This action sets the position of this source point to the average of the given points in cartesian space.
$point getPoint
This action gets the control point of this soiurce point.
$point getPosition ?< -parameter | -index > value?
This action gets the position in the defining space of the point at the given parameter or index.
$point getXYZ ?< -parameter | -index > value?
This action gets the position of the point in model space at the given parameter or index
$point isConstrained
This action checks to see if the point is database constrained.
Base type for all glyph types
Entity type
Base type for all source entities
Source point type
A float is a fractional number.
A vector is a list of float values.
A boolean is represented as a 0 or 1, with 0 being false and 1 being true.
Close