pw::Entity

Entity type

Derives From

pw::Object

Summary
pw::EntityEntity type
Static Actions
getByNameThis action gets an entity with the given name.
getExtents (static)This action gets the extents of the given entities.
getOrientedExtents (static)This action gets the oriented extents of the given entities.
sortThis action sorts the given entities.
cycleColorsThis action sets the list of entities to the next color in the cycle.
transformThis action transforms the given entities by the given matrix.
projectThis action projects the given entities onto database entities.
checkDeleteThis action checks the results of deleting the given entities, without actually deleting the entities.
deleteThis action deletes the given entities.
getBoundariesThis action returns a list of entities that form the boundary of the given entities.
getParentsThis action returns the topological parents of the given entities.
getChildrenThis action returns the topological children of the given entities.
Instance Attributes
NameThis attribute is the name of the entity.
ColorThis attribute is the color of the entity.
TransparencyThis attribute is the transparency of the entity.
EnabledThis attribute is the enabled status of the entity.
LayerThis attribute is the layer that the entity is in.
Instance Actions
toggleEnabledThis action toggles the Enabled attribute of the entity.
getExtentsThis action gets the extents of this entity.
getOrientedExtentsThis action gets the oriented extents of this entity.
getTimeStampThis action gets the timestamp of an entity.
getRenderAttributeThis action gets the named render attribute.
setRenderAttributeThis action sets the named render attribute.
getGroupsThis action gets the groups that this entity is an explicit member of.
getFrameworkThis action returns the pw::Framework to which this entity belongs.
Render Attributes
ColorModeThis attribute is the color mode for rendering an entity.
SecondaryColorThis attribute is the secondary color of the entity.
SecondaryColorModeThis attribute is the secondary color mode for rendering an entity.
PointModeThis attribute is the point mode for rendering an entity.
FillModeThis attribute is the fill mode for rendering an entity.
LineModeThis attribute is the line mode for rendering an entity.
IsolineCountThis attribute is the isoline count of the entity.
TriangleDensityThis attribute is the triangle density for entity rendering.
LineDensityThis attribute is the line density for entity rendering.
LineWidthThis attribute is the line width for entity rendering.

Static Actions

getByName

pw::Entity getByName ?-path path? name

This action gets an entity with the given name.

Parameters

nameThis parameter is a name string.
-path pathThis parameter and its argument specify the path to the framework in which the database entity resides.  The path argument must be a list of either pw::Framework objects or framework names.  The path must start at the root framework, start at the active framework, or start at a child of the active framework.  The active framework is used as the default if this parameter is not specified.

Returns

This action returns a pw::Entity object.

getExtents (static)

pw::Entity getExtents entities

This action gets the extents of the given entities.

Parameters

entitiesThis parameter is a list of pw::Entity objects to get the extents of.

Returns

This action returns a list of two vectors representing the min and max points of the extents.

Information

This command supports progress updates.

getOrientedExtents (static)

pw::Entity getOrientedExtents ?-frame widthDir heightDir? ?-tolerance tol? entities

This action gets the oriented extents of the given entities.

Parameters

-frame widthDir heightDirThis optional parameter specifies two direction vectors, one in the direction of the width and another in the direction of the height to get the oriented extents with respect to.  If the height vector is not orthogonal to the width vector, it will be adjusted so that it is.  If not given, the oriented extents with the minimum volume will be computed.
-tolerance tolThis optional parameter is the angle tolerance in degrees for determining the minimum volume oriented extents of the entities, with the default value being 1.0.
entitiesThis parameter is a list of pw::Entity objects to get the oriented extents of.

Returns

This action returns a list of four vectors representing min point, max point, width direction and height direction of the extents.  The width and height directions are unit vectors parallel to the width and height of the extents.  The length direction can be computed as the cross product of the width and height directions.

Information

This command supports progress updates.

sort

pw::Entity sort entities

This action sorts the given entities.

Parameters

entitiesThis parameter is a list of pw::Entity objects to sort.

Returns

This action returns a list of pw::Entity objects in sorted order.

Information

The sort order is based on the type of entity, the user specified sort order, and the creation order of the entities.  The first criterion is the type, with the order being pw::Block objects, pw::Domain objects, pw::Connector objects, and then pw::DatabaseEntity objects.  The second criterion is the user specified order, using the pw::Domain.setSortOrder and pw::Block.setSortOrder actions, with unspecified entities being listed after user specified entities.  The third and final criterion is the creation order, with older entities listed first.

See Also

pw::Domain.setSortOrder, pw::Block.setSortOrder

cycleColors

pw::Entity cycleColors entities

This action sets the list of entities to the next color in the cycle.

Parameters

entitiesThis parameter is the list of pw::Entity objects whose color attributes will be assigned from the current color cycle.

Returns

This action does not return anything.

Information

The color cycle is a static, predefined series of RGB color values.  The first color assigned by this action is the next in the cycle after the last color assigned by the most recent execution of this action.  That is, the color cycle does not reset after each execution.

transform

pw::Entity transform matrix entities

This action transforms the given entities by the given matrix.

Parameters

matrixThis parameter is the 4x4 transform matrix.
entitiesThis parameter is a list of pw::Entity objects to transform.

Returns

This action returns nothing.

project

pw::Entity project ?-type proj_type? ?-direction direction? ?-center center? ?-axis point normal? ?-fit tolerance? ?<-interior | -shape>? entities ?dbentities?

This action projects the given entities onto 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.
-shapeIf this optional flag is present, the shape of the underlying curve of the connectors will be projected to the database and the original distribution will be reapplied after the projection.  This option is only valid for connectors and/or structured domains.
entitiesThis parameter is a list of entities to project.  Only objects of the following type can be projected: pw::Connector, pw::Domain, pw::Point, pw::Curve, pw::SourcePoint, and pw::SourceCurve.  There may be further limitations based on how these objects are used, for instance edge curves cannot be 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.

Note

If the entities parameter contains any pw::Domain objects, it is an error to include any pw::Curve objects in the dbentities parameter.

checkDelete

pw::Entity checkDelete ?-freed freedVar? ?-unconstrained unconstrainedVar? ?-constraining constrainingVar? entities

This action checks the results of deleting the given entities, without actually deleting the entities.

Parameters

-freed freedVarThis parameter is a variable name to receive a list of the pw::Entity objects that the deleted entities depend on, that would be free of dependents after the deletion.
-unconstrained unconstrainedVarThis parameter is a variable name to receive a list of the pw::GridEntity objects that will become unconstrained after the deletion of the given entities and the freed entities if the -freed parameter is present.
-constraining constrainingVarThis parameter is a variable name to receive a list of the pw::DatabaseEntity objects that are given as entities but are constraining grid entities.
entitiesThis parameter is a list of pw::Entity objects to delete.

Returns

This action returns a list of the pw::Entity objects that would be deleted if the delete action was used with the given entities.

Information

This command supports progress updates.

delete

pw::Entity delete entities

This action deletes the given entities.

Parameters

entitiesThis parameter is a list of pw::Entity objects to delete.

Returns

This action returns nothing.

Information

This command supports progress updates.

getBoundaries

pw::Entity getBoundaries ?-enabledOnly? ?-visibleOnly? ?-quilt? entities

This action returns a list of entities that form the boundary of the given entities.

Parameters

-enabledOnlyThis optional flag, if present, filters the result to include only enabled entities.
-visibleOnlyThis optional flag, if present, filters the result to include only visible entities.
-quiltIf specified, this option indicates that model boundaries should be expressed using the underlying quilt boundary.  This option only applies to provided entities of type pw::Model.
entitiesThis parameter is a list of pw::Entity objects.

Returns

This action returns a list that represents the boundary of the given entity.

getParents

pw::Entity getParents ?-enabledOnly? ?-visibleOnly? ?-constrained? entities

This action returns the topological parents of the given entities.

Parameters

-enabledOnlyThis optional flag, if present, filters the results to include only enabled entities.
-visibleOnlyThis optional flag, if present, filters the results to include only visible entities.
  • constrained - This optional flag, if present, forces the command to return parent entities as determined by constraint instead of by topology.  That is, the command will return the entities that the provided entities are directly constrained to.
entitiesThis parameter is a list of pw::Entity objects.

Returns

This action returns a list of parent entities.

getChildren

pw::Entity getChildren ?-enabledOnly? ?-visibleOnly? ?-constrained? entities

This action returns the topological children of the given entities.

Parameters

-enabledOnlyThis optional flag, if present, filters the result to include only enabled entities.
-visibleOnlyThis optional flag, if present, filters the result to include only visible entities.
-constrainedThis optional flag, if present, forces the command to return child entities as determined by constraint instead of by topology.  That is, the command will return the entities that are directly constrained to the provided entities.
entitiesThis parameter is a list of pw::Entity objects.

Returns

This action returns a list of children entities.

Instance Attributes

Name

$entity get/setName name

This attribute is the name of the entity.

Type

string

Default

none

Color

$entity get/setColor color

This attribute is the color of the entity.

Type

colorThis value represents the color as an RGB triplet.  See the explanation of the color primitive for more information on the format.

Default

0x00000000

Transparency

$entity get/setTransparency value

This attribute is the transparency of the entity.

Type

transparencyThis value represents the transparency as float value with a range of [0,1].  A value of 0 (the default for most entities) indicates no transparency, while a value of 1 represents full transparency.

Default

0.0 (except for sources, which have a default value of 0.5)

Enabled

$entity get/setEnabled ?-parents? enable

This attribute is the enabled status of the entity.

Type

boolean

Parameters

-parentsThis optional parameter specifies that if this entity is a pw::Model or pw::Block, then the entity’s parents will have their Enabled attribute set as well.  It is only available when using setEnabled.

Default

true

Layer

$entity get/setLayer ?-parents? layer

This attribute is the layer that the entity is in.

Type

This attribute is an integer with the range [0, 1023].

Parameters

-parentsThis optional parameter specifies that if this entity is a pw::Model or pw::Block, then the entity’s parents will have their Layer attribute set as well.  It is only available when using setLayer.

Default

The current layer attribute of the display pw::Display.CurrentLayer

Instance Actions

toggleEnabled

$entity toggleEnabled ?-parents?

This action toggles the Enabled attribute of the entity.

Parameters

-parentsThis optional parameter specifies that if this entity is a pw::Model or pw::Block, then the entity’s parents will have their Enabled attribute toggled as well.

Returns

This action returns nothing.

getExtents

$entity getExtents

This action gets the extents of this entity.

Parameters

This action has no parameters.

Returns

This action returns a list of two vectors representing the min and max points of the extents.

getOrientedExtents

$entity getOrientedExtents ?-frame widthDir heightDir? ?-tolerance tol?

This action gets the oriented extents of this entity.

Parameters

-frame widthDir heightDirThis optional parameter specifies two direction vectors, one in the direction of the width and another in the direction of the height to get the oriented extents with respect to.  If the height vector is not orthogonal to the width vector, it will be adjusted so that it is.  If not given, the oriented extents with the minimum volume will be computed.
-tolerance tolThis optional parameter is the angle tolerance in degrees for determining the minimum volume oriented extents of the entities, with the default value being 1.0.

Returns

This action returns a list of four vectors representing min point, max point, width direction and height direction of the extents.  The width and height directions are unit vectors parallel to the width and height of the extents.  The length direction can be computed as the cross product of the width and height directions.

Information

This command supports progress updates.

getTimeStamp

$entity getTimeStamp

This action gets the timestamp of an entity.

Parameters

none

Returns

This action returns a string representing the time in WWW MMM DD YYYY hh:mm:ss.f.i format where WWW is the 3-letter abbreviated day of the week, MMM is the 3-letter abbreviated month, DD is the space padded day of the month (1-31), YYYY is the year, hh is the 24 hour count (0-23), mm is the minute count (00-59), ss is the second count (00-59), f is the fractional second, and i is the increment on the time for stamps that occurred during the same second (0-max int value).

getRenderAttribute

$entity getRenderAttribute att_name

This action gets the named render attribute.

Parameters

att_nameThis parameter is the name of the attribute to get.

Returns

This action returns the value of the attribute.

setRenderAttribute

$entity setRenderAttribute att_name att_value

This action sets the named render attribute.

Parameters

att_nameThis parameter is the name of the attribute to set.
att_valueThis parameter is the value to set the attribute.

Returns

This action returns nothing.

getGroups

$entity getGroups

This action gets the groups that this entity is an explicit member of.

Parameters

This action has no parameters.

Returns

This action returns a list of pw::Group objects.

getFramework

$entity getFramework

This action returns the pw::Framework to which this entity belongs.

Parameters

This action has no parameters.

Returns

This action returns a pw::Framework object.

Render Attributes

ColorMode

$entity get/setRenderAttribute ColorMode mode

This attribute is the color mode for rendering an entity.

Type

This attribute is a string with options < Automatic | Entity | Connectivity >.

Information

Automaticentities are automatically colored according to their type.
Entityuse the value of the entity’s Color attribute.
Connectivityentities are automatically colored according to their connection topology (free, lamina, manifold, or non-manifold).

The primary color is used for drawing lines when the <DisplayStyle> render attribute is set to Wireframe or Hiddenline.  The secondary color is not used for these display styles.

The primary color is used to fill polygons when the <DisplayStyle> render attribute is set to Solid, Shaded, SolidWireframe, or ShadedWireframe.  The secondary color is used for drawing lines in these display styles.

See Also

Color, SecondaryColorMode, SecondaryColor, setRenderAttribute, getRenderAttribute

SecondaryColor

$entity get/setRenderAttribute SecondaryColor color

This attribute is the secondary color of the entity.

Type

color

Default

0x00000000 between 0.0 and 1.0.  This will be converted into a proper hex color.

SecondaryColorMode

$entity get/setRenderAttribute SecondaryColorMode mode

This attribute is the secondary color mode for rendering an entity.

Type

This attribute is a string with options < Automatic | Entity | Connectivity >.

Information

The secondary color is used for drawing lines when the <DisplayStyle> render attribute is set to Solid, Shaded, SolidWireframe, or ShadedWireframe.

See ColorMode for additional mode value information.

See Also

ColorMode, <DisplayStyle>, setRenderAttribute, getRenderAttribute

PointMode

$entity get/setRenderAttribute PointMode mode

This attribute is the point mode for rendering an entity.

Type

This attribute is a string with options < None | All >.

Information

NoneThe points are not rendered.
AllAll of the points are rendered.

See Also

ColorMode, SecondaryColorMode, SecondaryColor, LineMode, FillMode, setRenderAttribute, getRenderAttribute

FillMode

$entity get/setRenderAttribute FillMode mode

This attribute is the fill mode for rendering an entity.

Type

This attribute is a string with options < None | Flat | Shaded | HiddenLine >.

Information

NoneThe polygon interior is unfilled and transparent (invisible).
FlatRender the polygon interior filled with a constant, non-gradient color.  This produces a flat, uncontoured apperance.
ShadedRender the polygon interior filled with a gradient color.  This produces a more realistic, contoured appearance.
HiddenLineSimilar to Flat except that the fill color is the average of the background colors.  This produces a hidden-line appearance.

Entities that do not have polygons ignore this render attribute.

See Also

ColorMode, SecondaryColorMode, SecondaryColor, LineMode, setRenderAttribute, getRenderAttribute

LineMode

$entity get/setRenderAttribute LineMode mode

This attribute is the line mode for rendering an entity.

Type

This attribute is a string with options < All | Boundary | None >.

Information

All renders the interior and boundary lines.  Boundary renders just the boundary lines.  None renders no lines.

See Also

ColorMode, SecondaryColorMode, SecondaryColor, IsolineCount, FillMode, setRenderAttribute, getRenderAttribute

IsolineCount

$entity get/setRenderAttribute IsolineCount ij

This attribute is the isoline count of the entity.

Type

This attribute is a two element integer list representing the count of u isolines and v isolines, where 3 refers to 1 interior isoline and 2 or less draws borders only.

Default

0 0

TriangleDensity

$entity get/setRenderAttribute TriangleDensity density

This attribute is the triangle density for entity rendering.

Type

integer for triangle render density, 1 is optimal

Default

1

LineDensity

$entity get/setRenderAttribute LineDensity ij

This attribute is the line density for entity rendering.

Type

ij count for number of points to render on lines in u, v directions, 1 is optimal

Default

1, 1

LineWidth

$entity get/setRenderAttribute LineWidth width

This attribute is the line width for entity rendering.

Type

integer

Default

1

pw::Entity getByName ?-path path? name
This action gets an entity with the given name.
pw::Entity getExtents entities
This action gets the extents of the given entities.
pw::Entity getOrientedExtents ?-frame widthDir heightDir? ?-tolerance tol? entities
This action gets the oriented extents of the given entities.
pw::Entity sort entities
This action sorts the given entities.
pw::Entity cycleColors entities
This action sets the list of entities to the next color in the cycle.
pw::Entity transform matrix entities
This action transforms the given entities by the given matrix.
pw::Entity project ?-type proj_type? ?-direction direction? ?-center center? ?-axis point normal? ?-fit tolerance? ?<-interior | -shape>? entities ?dbentities?
This action projects the given entities onto database entities.
pw::Entity checkDelete ?-freed freedVar? ?-unconstrained unconstrainedVar? ?-constraining constrainingVar? entities
This action checks the results of deleting the given entities, without actually deleting the entities.
pw::Entity delete entities
This action deletes the given entities.
pw::Entity getBoundaries ?-enabledOnly? ?-visibleOnly? ?-quilt? entities
This action returns a list of entities that form the boundary of the given entities.
pw::Entity getParents ?-enabledOnly? ?-visibleOnly? ?-constrained? entities
This action returns the topological parents of the given entities.
pw::Entity getChildren ?-enabledOnly? ?-visibleOnly? ?-constrained? entities
This action returns the topological children of the given entities.
$entity get/setName name
This attribute is the name of the entity.
$entity get/setColor color
This attribute is the color of the entity.
$entity get/setTransparency value
This attribute is the transparency of the entity.
$entity get/setEnabled ?-parents? enable
This attribute is the enabled status of the entity.
$entity get/setLayer ?-parents? layer
This attribute is the layer that the entity is in.
$entity toggleEnabled ?-parents?
This action toggles the Enabled attribute of the entity.
$entity getExtents
This action gets the extents of this entity.
$entity getOrientedExtents ?-frame widthDir heightDir? ?-tolerance tol?
This action gets the oriented extents of this entity.
$entity getTimeStamp
This action gets the timestamp of an entity.
$entity getRenderAttribute att_name
This action gets the named render attribute.
$entity setRenderAttribute att_name att_value
This action sets the named render attribute.
$entity getGroups
This action gets the groups that this entity is an explicit member of.
$entity getFramework
This action returns the pw::Framework to which this entity belongs.
Framework type
$entity get/setRenderAttribute ColorMode mode
This attribute is the color mode for rendering an entity.
$entity get/setRenderAttribute SecondaryColor color
This attribute is the secondary color of the entity.
$entity get/setRenderAttribute SecondaryColorMode mode
This attribute is the secondary color mode for rendering an entity.
$entity get/setRenderAttribute PointMode mode
This attribute is the point mode for rendering an entity.
$entity get/setRenderAttribute FillMode mode
This attribute is the fill mode for rendering an entity.
$entity get/setRenderAttribute LineMode mode
This attribute is the line mode for rendering an entity.
$entity get/setRenderAttribute IsolineCount ij
This attribute is the isoline count of the entity.
$entity get/setRenderAttribute TriangleDensity density
This attribute is the triangle density for entity rendering.
$entity get/setRenderAttribute LineDensity ij
This attribute is the line density for entity rendering.
$entity get/setRenderAttribute LineWidth width
This attribute is the line width for entity rendering.
Base type for all glyph types
A string is an array of characters.
Entity type
A vector is a list of float values.
A block is a volume grid bounded by one or more pw::Faces.
A domain is a computationally two-dimensional grid entity, bounded by one or more pw::Edges.
A connector is a computationally one-dimensional grid entity, defined in the parameter space of one or more end-connected curve segments.
Base type for all database entities
pw::Domain setSortOrder domains
This action sets the user specified sort order of domains.
pw::Block setSortOrder blocks
This action sets the user specified sort order of blocks.
Database point type
Database curve type
Source point type
SourceCurve type
Base type for all grid entities.
A boundary is reference to either a database curve or the edge of a database surface.
Database model type
A color is represented as a 32-bit hex value, 0x00RRBBGG.
A float is a fractional number.
A boolean is represented as a 0 or 1, with 0 being false and 1 being true.
An integer is a whole number.
pw::Display get/setCurrentLayer layer
This attribute is the current layer which is always visible and new entities are added to this layer.
Group type
Close