pw::Point

Database point type

Derives From

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

Summary
pw::PointDatabase point type
Static Actions
createThis action creates a new database point object.
Instance Actions
setPointThis action sets the position of this database point.
setAveragePointThis action sets the position of this database point to the average of the given points in cartesian space.
getPointThis action gets the control point of this database 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
getDefaultProjectDirectionThis action gets the default projection direction for this point.
isConstrainedThis action checks to see if the point is database constrained.

Static Actions

create

pw::Point create

This action creates a new database point object.

Parameters

none

Returns

This action returns a new pw::Point object.

Instance Actions

setPoint

$point setPoint point

This action sets the position of this database point.

Parameters

pointThis parameter is the new position.

Returns

This action returns nothing.

setAveragePoint

$point setAveragePoint points

This action sets the position of this database 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 database 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::Point 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::Point 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 }

getDefaultProjectDirection

$point getDefaultProjectDirection

This action gets the default projection direction for this point.

Parameters

This action has no parameters.

Returns

This action always returns the vector {0 0 1}.

Example

This example gets the point’s default projection direction.  $point is referencing an existing database point.

Code

puts "\{ [$point getDefaultProjectDirection] \}"

Output

{ 0.0 0.0 1.0 }

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::Point 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::Point create
This action creates a new database point object.
$point setPoint point
This action sets the position of this database point.
$point setAveragePoint points
This action sets the position of this database point to the average of the given points in cartesian space.
$point getPoint
This action gets the control point of this database 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 getDefaultProjectDirection
This action gets the default projection direction for this point.
$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 database entities
Database 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