pw:: SourceEntity

Base type for all source entities

Derives From

pw::Object pw::Entity

Summary
Base type for all source entities
This action gets a source entity using the name.
This action gets a source entity using the sequence number.
This default is the begin spacing of a source when it is created.
This default is the begin decay of a source when it is created.
This default is the end spacing of a source when it is created.
This default is the end decay of a source when it is created.
This attribute is the specification type of the entity.
This attribute is the begin spacing of a source.
This attribute is the begin decay of a source.
This attribute is the end spacing of a source.
This attribute is the end decay of a source.
This action deletes this entity.
This action transforms this entity by the given matrix.
This action returns whether the given specification type is valid for this entity.
This action returns the valid specification types for this entity.
This action gets the representative xyz locations of specified spacing and decay values for this source
This action checks if this entity is defined.
This action gets the description of how this entity was defined.

Static Actions

getByName

pw::SourceEntity getByName name

This action gets a source entity using the name.

Parameters

nameThis parameter is a name string.

Returns

This action returns a pw::SourceEntity object.

Example

This example shows how to get a source entity named src-1 in order to find the begin spacing of the source

Code

set src(1) [pw::SourceEntity getByName "src-1"]
puts "[$src(1) getName] has begin spacing of [$src(1) getBeginSpacing]."

Output

src-1 has begin spacing of 0.1.

getBySequence

pw::SourceEntity getBySequence number

This action gets a source entity using the sequence number.

Parameters

numberThis parameter is the integer sequence number with the range [1, entity count].

Returns

This action returns a pw::SourceEntity object.

Notes

This function is extremely inefficient for querying the entire source system.  It is much more efficient to call pw::Source.getAll and simply index into the returned list.

Example

Code

set src [pw::SourceEntity getBySequence 11]
puts "[$src getName] is of the type [$src getType]."

Output

src-1 is of the type pw::SourcePoint.

Static Defaults

BeginSpacing

pw::SourceEntity get/setDefault BeginSpacing value

This default is the begin spacing of a source when it is created.

Type

float; (0.0, infinity)

Default

The default value is 0.1.

BeginDecay

pw::SourceEntity get/setDefault BeginDecay value

This default is the begin decay of a source when it is created.

Type

float; [0.0, 1.0]

Default

The default value is 0.5.

EndSpacing

pw::SourceEntity get/setDefault EndSpacing value

This default is the end spacing of a source when it is created.

Type

float; (0.0, infinity)

Default

The default value is 0.1.

EndDecay

pw::SourceEntity get/setDefault EndDecay value

This default is the end decay of a source when it is created.

Type

float; [0.0, 1.0]

Default

The default value is 0.5.

Instance Attributes

SpecificationType

$entity get/setSpecificationType type

This attribute is the specification type of the entity.

Type

string with options < Ignored | Constant | Parametric | AxisToPerimeter | CenterToPerimeter | PointDensity >.  Not all options are valid for all entities and setting this attribute to an invalid setting for these entities will have no effect.

Default

The default specification type differs depending on the type of source, but usually it is Parametric.  If that is not a valid type for the entity, then the default will be Constant.

Note

The current value of this attribute controls how the BeginSpacing, BeginDecay, EndSpacing and EndDecay attributes are used to control the size field produced by the source.

IgnoredThe begin and end values are ignored, with source information supplied through other means.
ConstantThe begin values will be used throughout the source.
ParametricThe begin values will be used at the minimum parametric limits and the end values will be used at the maximum parametric limits of the source.
AxisToPerimeterThe begin values will be used along the axis and the end values will be used at the perimeter of the source.
CenterToPerimeterThe begin values will be used at the center and the end values will be used at the perimeter of the source.
PointDensityThe begin values are used, with the begin spacing as a scalar of the point density.  The end values are ignored.

See Also

Use isValidSpecificationType to check if a specification type is valid for an entity.

BeginSpacing

$entity get/setBeginSpacing value

This attribute is the begin spacing of a source.

Type

float; (0.0, infinity)

Default

The default for this attribute is the value in the BeginSpacing default when the source was created.

BeginDecay

$entity get/setBeginDecay value

This attribute is the begin decay of a source.

Type

float; [0.0, 1.0]

Default

The default for this attribute is the value in the BeginDecay default when the source was created.

EndSpacing

$entity get/setEndSpacing value

This attribute is the end spacing of a source.

Type

float; (0.0, infinity)

Default

The default for this attribute is the value in the EndSpacing default when the source was created.

EndDecay

$entity get/setEndDecay value

This attribute is the end decay of a source.

Type

float; [0.0, 1.0]

Default

The default for this attribute is the value in the EndDecay default when the source was created.

Instance Actions

delete

$entity delete

This action deletes this entity.

Returns

This action returns nothing.

transform

$entity transform matrix

This action transforms this entity by the given matrix.  The matrix is a list of 16 values, but in practice, the utility functions for transform matrices are generally used instead.

Parameters

matrixThis parameter is the 4x4 transform matrix.

Returns

This action returns nothing.

See Also

pwu::Transform

isValidSpecificationType

$entity isValidSpecificationType type

This action returns whether the given specification type is valid for this entity.

Parameters

typeThis parameter is a string with options < Ignored | Constant | Parametric | AxisToPerimeter | CenterToPerimeter | PointDensity >

Returns

This action returns a boolean, which is True if the specification type is supported.

getValidSpecificationTypes

$entity getValidSpecificationTypes

This action returns the valid specification types for this entity.

Parameters

None

Returns

This action returns a list of strings, where the strings will be from among the list of Ignored, Constant, Parametric, AxisToPerimeter CenterToPerimeter, and PointDensity.

getSpecificationXYZs

$entity getSpecificationXYZs

This action gets the representative xyz locations of specified spacing and decay values for this source

Parameters

none

Returns

This action returns a list of xyz vector values.

isDefined

$entity isDefined

This action checks if this entity is defined.

Parameters

This action has no parameters.

Returns

This action returns a boolean, true if the entity is defined.

getDescription

$entity getDescription

This action gets the description of how this entity was defined.

Parameters

This action has no parameters.

Returns

This action returns a string description.

Information

All possible string returns: Point, Unknown.

pw::SourceEntity getByName name
This action gets a source entity using the name.
pw::SourceEntity getBySequence number
This action gets a source entity using the sequence number.
pw::SourceEntity get/setDefault BeginSpacing value
This default is the begin spacing of a source when it is created.
pw::SourceEntity get/setDefault BeginDecay value
This default is the begin decay of a source when it is created.
pw::SourceEntity get/setDefault EndSpacing value
This default is the end spacing of a source when it is created.
pw::SourceEntity get/setDefault EndDecay value
This default is the end decay of a source when it is created.
$entity get/setSpecificationType type
This attribute is the specification type of the entity.
$entity delete
This action deletes this entity.
$entity transform matrix
This action transforms this entity by the given matrix.
$entity isValidSpecificationType type
This action returns whether the given specification type is valid for this entity.
$entity getValidSpecificationTypes
This action returns the valid specification types for this entity.
$entity getSpecificationXYZs
This action gets the representative xyz locations of specified spacing and decay values for this source
$entity isDefined
This action checks if this entity is defined.
$entity getDescription
This action gets the description of how this entity was defined.
Base type for all glyph types
Entity type
A string is an array of characters.
Base type for all source entities
An integer is a whole number.
pw::Source getAll ?-grid entities?
This action gets a list of all source entities.
A float is a fractional number.
Utility functions for transform matrices, which are represented as a list of sixteen real values.
A boolean is represented as a 0 or 1, with 0 being false and 1 being true.
A vector is a list of float values.