pw:: Entity

Entity type

Derives From

pw::Object

Summary
Entity type
This action gets an entity with the given name.
This action sorts the given entities.
This action sets the list of entities to the next color in the cycle.
This action transforms the given entities by the given matrix.
This action projects the given entities onto database entities.
This action checks the results of deleting the given entities, without actually deleting the entities.
This action deletes the given entities.
This attribute is the name of the entity.
This attribute is the color of the entity.
This attribute is the enabled status of the entity.
This attribute is the layer that the entity is in.
This action toggles the Enabled attribute of the entity.
This action gets the extents of this entity.
This action gets the timestamp of an entity.
This action gets the named render attribute.
This action sets the named render attribute.
This action gets the groups that this entity is an explicit member of.
This attribute is the color mode for rendering an entity.
This attribute is the secondary color of the entity.
This attribute is the secondary color mode for rendering an entity.
This attribute is the point mode for rendering an entity.
This attribute is the fill mode for rendering an entity.
This attribute is the line mode for rendering an entity.
This attribute is the isoline count of the entity.
This attribute is the triangle density for entity rendering.
This attribute is the line density for entity rendering.
This attribute is the line width for entity rendering.

Static Actions

getByName

pw::Entity getByName name

This action gets an entity with the given name.

Parameters

nameThis parameter is a name string.

Returns

This action returns a pw::Entity object.

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? ?<-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).
-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 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 pw::Connector, pw::Domain, and pw::Curve objects can be projected.
dbentitiesThis parameter is the optional list of database enitities to project onto.  If none are given, project to any currently enabled, visible database entities.

Returns

This action returns nothing.

checkDelete

pw::Entity checkDelete ?-freed freedVar? ?-unconstrained unconstrainedVar? 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 recieve 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 recieve 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.
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.

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

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

pw::Layer

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

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.

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.

Render Attributes

ColorMode

$entity get/setRenderAttribute ColorMode mode

This attribute is the color mode for rendering an entity.

Type

string; < 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

string; < 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

string; < 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

string; < 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 apperance.
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

string; < 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

ij 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 name
This action gets an entity with the given name.
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? ?<-interior | -shape>? entities ?dbentities?
This action projects the given entities onto database entities.
pw::Entity checkDelete ?-freed freedVar? ?-unconstrained unconstrainedVar? 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.
$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/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 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 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
Entity type
Block type
Domain type
Connector type
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.
A string is an array of characters.
A vector is a list of float values.
Database curve type
A color is represented as a 32-bit hex value, 0x00RRBBGG.
A boolean is represented as a 0 or 1, with 0 being false and 1 being true.
Database model type
Global actions for layers
Group type