Source point type
pw::Object pw::Entity pw::SourceEntity
pw:: | Source point type |
Static Actions | |
create | This action creates a new source point object. |
Instance Actions | |
setPoint | This action sets the position of this source point. |
setAveragePoint | This action sets the position of this source point to the average of the given points in cartesian space. |
getPoint | This action gets the control point of this soiurce point. |
getPosition | This action gets the position in the defining space of the point at the given parameter or index. |
getXYZ | This action gets the position of the point in model space at the given parameter or index |
isConstrained | This action checks to see if the point is database constrained. |
pw::SourcePoint create
This action creates a new source point object.
none
This action returns a new pw::SourcePoint object.
$point getPosition ?< -parameter | -index > value?
This action gets the position in the defining space of the point at the given parameter or index.
-parameter | This 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]. |
-index | This optional flag indicates that value is interpreted as a control point index with the range [1, 1]. |
value | This optional parameter indicates the position. |
This action returns the same point for all valid values. The returned point may be in the form “u v dbentity”.
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 }
$point getXYZ ?< -parameter | -index > value?
This action gets the position of the point in model space at the given parameter or index
-parameter | This 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]. |
-index | This optional flag indicates that value is interpreted as a control point index with the range [1, 1]. |
value | This optional parameter indicates the position. |
This action returns the same XYZ vector for all valid values.
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 }
$point isConstrained
This action checks to see if the point is database constrained.
This action has no parameters.
This action returns a boolean.
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
This action creates a new source point object.
pw::SourcePoint create
This action sets the position of this source point.
$point setPoint point
This action sets the position of this source point to the average of the given points in cartesian space.
$point setAveragePoint points
This action gets the control point of this soiurce point.
$point getPoint
This action gets the position in the defining space of the point at the given parameter or index.
$point getPosition ?< -parameter | -index > value?
This action gets the position of the point in model space at the given parameter or index
$point getXYZ ?< -parameter | -index > value?
This action checks to see if the point is database constrained.
$point isConstrained