pw::Display

Global actions for the current graphical display

Derives From

pw::Object

Summary
pw::DisplayGlobal actions for the current graphical display
Static Attributes
ProjectionThis attribute is the type of projection of the display.
ShowBodyAxesThis attribute controls showing the rotation point axes in the display.
ShowXYZAxesThis attribute controls showing the XYZ axes in the display centered at the origin.
ShowDatabaseThis attribute controls showing database entities in the display.
ShowSourcesThis attribute controls showing source entities in the display.
ShowNodesThis attribute controls showing node entities in the display.
ShowConnectorsThis attribute is the status of showing connector entities in the display.
ShowDomainsThis attribute is the status of showing domain entities in the display.
ShowOversetThis attribute is the status of showing overset data in the display.
ShowDisabledEntitiesThis attribute is the status of showing disabled entities in the display.
ShowDrawingGuideThis attribute is the status of showing the drawing guide in the display.
ShowViewManipulatorThis attribute is the status of showing the view manipulator in the display.
DoublePrecisionThis attribute controls the floating point precision used in the display.
AutomaticPrecisionThis attribute controls whether the display switches between single and double precision graphics modes as needed.
CurrentLayerThis attribute is the current layer which is always visible and new entities are added to this layer.
Static Actions
updateThis action updates the graphics in the display to their current setting.
resetViewThis action resets the view so that the entire system is visible and centered in the display.
resetRotationPointThis action resets the view rotation point to the center of visible objects.
setRotationPointThis action sets the view rotation point to the position specified.
getCurrentViewThis action gets the current view of the display.
setCurrentViewThis action updates the display to the current view.
calculateViewThis action computes the view to center the specified extents in the display with the given view angle.
saveViewThis action saves a view into a slot.
recallViewThis action restores the view specified by slot or name.
clearViewThis action clears the view specified by slot or name.
isSavedViewThis action checks to see if a view is saved in a slot or has the given name.
getViewNameThis action returns the name of the saved view.
setViewNameThis action sets the name of the view in the given slot.
isLayerVisibleThis action checks if the given layer is visible.
isolateLayerThis action isolates the given layer by hiding all other layers, showing this layer and setting it as the current layer.
showLayerThis action sets the given layers to be shown in the current display.
showAllLayersThis action sets all of the layers to be shown in the current display.
hideLayerThis action sets the given layers to be hidden in the current display.
hideAllLayersThis action sets all of the layers to be hidden in the current display.
toggleLayerThis action toggles the visibility of the given layers in the current display.
toggleAllLayersThis action toggles all of the layers in the current display.
selectEntitiesThis action allows the user to interactively select entities.
getSelectedEntitiesThis action allows the user to query the display for the current set of selected entities.
setSelectedEntitiesThis action allows the specification of entities that will be selected when the script ends.
createSelectionMaskThis action creates a selection mask for use with selectEntities.
selectPointThis action enters an interactive mode where the user can select a single point.
setLightDirectionThis action controls the display’s lighting direction and whether the lighting is fixed with the view or with the scene.
getLightDirectionThis action returns the display’s lighting direction.
getSizeThis action returns the size of the current display window.
getImageFormatsThis action returns a list of available image format options for the saveImage command.
saveImageThis action saves an image of the current display to a file.
zoomToEntitiesThis action changes the zoom level and pans to center the display around the list of given entities.
zoomToFitThis action changes the zoom level and pans to center the display around all currently visible entities.

Static Attributes

Projection

pw::Display get/setProjection < Perspective | *Orthonormal* >

This attribute is the type of projection of the display.

Type

This attribute is a string with options < Perspective | Orthonormal >.

Default

The default for this attribute is Orthonormal.

ShowBodyAxes

pw::Display get/setShowBodyAxes true

This attribute controls showing the rotation point axes in the display.

Type

This attribute is a boolean with true = show, false = hide.

Default

The default for this attribute is true.

ShowXYZAxes

pw::Display get/setShowXYZAxes true

This attribute controls showing the XYZ axes in the display centered at the origin.

Type

This attribute is a boolean with true = show, false = hide.

Default

The default for this attribute is false.

ShowDatabase

pw::Display get/setShowDatabase show

This attribute controls showing database entities in the display.

Type

This attribute is a boolean with true = show, false = hide.

Default

The default for this attribute is true.

ShowSources

pw::Display get/setShowSources show

This attribute controls showing source entities in the display.

Type

This attribute is a boolean with true = show, false = hide.

Default

The default for this attribute is true.

ShowNodes

pw::Display get/setShowNodes show

This attribute controls showing node entities in the display.

Type

This attribute is a boolean with true = show, false = hide.

Default

The default for this attribute is true.

ShowConnectors

pw::Display get/setShowConnectors show

This attribute is the status of showing connector entities in the display.

Type

This attribute is a boolean with true = show, false = hide.

Default

The default for this attribute is true.

ShowDomains

pw::Display get/setShowDomains show

This attribute is the status of showing domain entities in the display.

Type

This attribute is a boolean with true = show, false = hide.

Default

The default for this attribute is true.

ShowOverset

pw::Display get/setShowOverset show

This attribute is the status of showing overset data in the display.

Type

This attribute is a boolean with true = show, false = hide.

Default

The default for this attribute is true.

ShowDisabledEntities

pw::Display get/setShowDisabledEntities show

This attribute is the status of showing disabled entities in the display.

Type

This attribute is a boolean with true = show, false = hide.

Default

The default for this attribute is false.

ShowDrawingGuide

pw::Display get/setShowDrawingGuide show

This attribute is the status of showing the drawing guide in the display.

Type

This attribute is a boolean with true = show, false = hide.

Default

The default for this attribute is false.

ShowViewManipulator

pw::Display get/setShowViewManipulator show

This attribute is the status of showing the view manipulator in the display.

Type

This attribute is a boolean with true = show, false = hide.

Default

The default for this attribute is false.

DoublePrecision

pw::Display get/setDoublePrecision bool

This attribute controls the floating point precision used in the display.  If set to true, the display will be drawn with a higher precision but at the cost of rendering speed.  If set to false, the display will be drawn quicker but with some loss in precision.

Type

This attribute is a boolean with true = double precision and false = single precision.

Default

The default for this attribute is true.

AutomaticPrecision

pw::Display get/setAutomaticPrecision bool

This attribute controls whether the display switches between single and double precision graphics modes as needed.  If set to true, the display will switch to double precision mode when the view is extremely magnified for better fidelity.  Otherwise, the display will be drawn with single precision accuracy for better rendering performance.

Type

This attribute is a boolean.  When true, the precision will be switched between double and single precision as needed.  When false, the mode specified with pw::Display.DoublePrecision will be honored.

Default

The default for this attribute is false.

CurrentLayer

pw::Display get/setCurrentLayer layer

This attribute is the current layer which is always visible and new entities are added to this layer.

Type

This attribute is an integer with the range [0, number of layers].

Default

The default for this attribute is 0.

Static Actions

update

pw::Display update

This action updates the graphics in the display to their current setting.

Parameters

There are no parameters.

Returns

This action returns nothing.

resetView

pw::Display resetView ?< +X | -X | +Y | -Y | +Z | -Z >?

This action resets the view so that the entire system is visible and centered in the display.

Parameters

+XThis optional flag is a notification to reset the direction of view to +X axis.
-XThis optional flag is a notification to reset the direction of view to -X axis.
+YThis optional flag is a notification to reset the direction of view to +Y axis.
-YThis optional flag is a notification to reset the direction of view to -Y axis.
+ZThis optional flag is a notification to reset the direction of view to +Z axis.
-ZThis optional flag is a notification to reset the direction of view to -Z axis.  This is the default when no flag is set.

Returns

This action returns nothing.

Information

The rotation center point is not changed.

resetRotationPoint

pw::Display resetRotationPoint

This action resets the view rotation point to the center of visible objects.

Parameters

This action has no parameters.

Returns

This action returns nothing.

setRotationPoint

pw::Display setRotationPoint position

This action sets the view rotation point to the position specified.

Parameters

positionThe specified vector value is used to set the new position of the rotation point.

Returns

This action returns nothing.

getCurrentView

pw::Display getCurrentView

This action gets the current view of the display.

Parameters

This action has no parameters.

Returns

This action returns the current view as a list of three vectors (center, translation, and rotation axis) and two floats (rotation angle and zoom).

setCurrentView

pw::Display setCurrentView ?-animate seconds? view

This action updates the display to the current view.

Parameters

-animateThis specifies that the view transition should be animated over the specified number of seconds.
viewThis parameter is the view to save which includes the list of three vectors (center, translation, and rotation axis) and two floats (rotation angle and zoom).

Returns

This action returns a boolean indicating whether or not the view was updated to the requested view.  This will only return false if an animation was requested and the user halted the animation before it completed.

calculateView

pw::Display calculateView ?-center? ?-view direction? ?-up direction? extent_minimum extent_maximum

This action computes the view to center the specified extents in the display with the given view angle.

Parameters

-centerIf specified, the rotation point will be moved to the center of the bounding box.
-viewThe specified vector value is interpreted as the viewing direction.  If absent, the negative Z vector is used.
-upThe specified vector value is interpreted as the direction to be aligned with the screen Y direction.  If not specified, the current “up” vector is used to determine a suitable value.
extent_minimumThis represents the minimum XYZ value of the bounding box of the volume to be viewed.  It is a vector.
extent_maximumThis represents the maximum XYZ value of the bounding box of the volume to be viewed.  It is a vector.

Returns

This action returns the calculated view as a list of three vectors (center, translation, and rotation axis) and two floats (rotation angle and zoom).

saveView

pw::Display saveView slot view ?name?

This action saves a view into a slot.

Parameters

slotThis parameter is the saved view integer slot with the range [1, 6].
viewThis parameter is the view to save which includes the list of three vectors (center, translation, and rotation axis) and two floats (rotation angle and zoom).
nameThis parameter is the new view name string.

Returns

This action returns nothing.

recallView

pw::Display recallView < slot | name >

This action restores the view specified by slot or name.

Parameters

slotThis parameter is the saved view integer slot with the range [1, 6].
nameThis parameter is the saved view name string.

Returns

This action returns nothing.

clearView

pw::Display clearView < slot | name >

This action clears the view specified by slot or name.

Parameters

slotThis parameter is the saved view integer slot with the range [1, 6].
nameThis parameter is the saved view name string.

Returns

This action returns nothing.

isSavedView

pw::Display isSavedView < slot | name >

This action checks to see if a view is saved in a slot or has the given name.

Parameters

slotThis parameter is the saved view integer slot with the range [1, 6].
nameThis parameter is the saved view name string.

Returns

This action returns true if the view is saved.

getViewName

pw::Display getViewName slot

This action returns the name of the saved view.

Parameters

slotThis parameter is the saved view integer slot with the range [1, 6].

Returns

This action returns the name string or an empty string if the view has not been saved or named.

setViewName

pw::Display setViewName slot name

This action sets the name of the view in the given slot.

Parameters

slotThis parameter is the saved view integer slot with the range [1, 6].
nameThis parameter is the new view name string.

Returns

This action returns nothing.

isLayerVisible

pw::Display isLayerVisible layer

This action checks if the given layer is visible.

Parameters

layerThis parameter is the integer layer number with the range [0, 1023].

Returns

This action returns a boolean, true if the layer is visible.

isolateLayer

pw::Display isolateLayer layer

This action isolates the given layer by hiding all other layers, showing this layer and setting it as the current layer.

Parameters

layerThis parameter is the integer layer number with the range [0, 1023].

Returns

This action returns nothing.

showLayer

pw::Display showLayer < layer | layer_list >

This action sets the given layers to be shown in the current display.

Parameters

layerThis parameter is the integer layer number with the range [0, 1023].
layer_listThis parameter is a list of layer number integers.

Returns

This action returns nothing.

showAllLayers

pw::Display showAllLayers

This action sets all of the layers to be shown in the current display.

Parameters

This action has no parameters.

Returns

This action returns nothing.

hideLayer

pw::Display hideLayer < layer | layer_list >

This action sets the given layers to be hidden in the current display.

Parameters

layerThis parameter is the integer layer number with the range [0, 1023].
layer_listThis parameter is a list of layer number integers.

Returns

This action returns nothing.

hideAllLayers

pw::Display hideAllLayers

This action sets all of the layers to be hidden in the current display.

Parameters

This action has no parameters.

Returns

This action returns nothing.

toggleLayer

pw::Display toggleLayer < layer | layer_list >

This action toggles the visibility of the given layers in the current display.

Parameters

layerThis parameter is the integer layer number with the range [0, 1023].
layer_listThis parameter is a list of layer number integers.

Returns

This action returns nothing.

toggleAllLayers

pw::Display toggleAllLayers

This action toggles all of the layers in the current display.

Parameters

This action has no parameters.

Returns

This action returns nothing.

selectEntities

pw::Display selectEntities ?-description desc? ?-selectionmask mask? ?-single? ?-preselect ents? ?<-exclude ents | -pool ents>? resultVar

This action allows the user to interactively select entities.

Parameters

resultVarThis option specifies the name of an array variable to receive the results.  The array indices and the values are listed below.  The array will be cleared prior to setting any new values.
-description descThis option causes the text string represented by desc to be displayed in the GUI panel.  It should provide some sort of guidance to the user as to what should be picked.
-selectionmask maskThis options controls what types of entities can be selected.  It takes the output of the createSelectionMask command.
-singleThis flag, if present, specifies that only one entity can be selected.  If the flag is not present, multiple entities can be selected.
-preselect entsThis flag, if present, specifies which entities should be preselected for the user.  If not present, nothing will be selected initially.  This option is not valid when using the single pick option.  The entities will only be preselected if they are visible at the start of the function.
-exclude entsThis flag, if present, specifies which entities should be excluded from picking.  If not present, no entities are explicitly excluded.  This option cannot be specified with the -pool flag.  The base entities for excluded database boundaries and subconnector spacings will be shown regardless of their hidden or layer status.
-pool entsThis flag, if present, specifies the pool of entities which can be picked.  Only entities specified by the ents argument can be selected.  This flag cannot be specified with the -exclude flag.  The pool entities will be highlighted on the display to indicate what can be selected.  All entities specified will be forced into being visible for the duration of the command regardless of the entity’s hidden or layer status.

Returns

This action returns a boolean value of true if entities were picked.  An error is raised if this command is called from a non-interactive script.

Results Array

The array is divided into the following elements.

ConnectorsThis element is comprised of a list of the pw::Connector objects selected by the user.
DomainsThis element is comprised of a list of the pw::Domain objects selected by the user.
BlocksThis element is comprised of a list of the pw::Block objects selected by the user.
DatabasesThis element is comprised of a list of the pw::DatabaseEntity objects selected by the user.
SpacingsThis element is comprised of a list of subconnector spacing descriptions selected by the user.  Each entry in the list is a list of three values.  The first value of the entry is the connector.  The second value is the subconnector index, starting from 1.  The third value is the string “Begin” or “End” indicating which side of the subconnector the spacing object represents.
BoundariesThis element is comprised of a list of the database boundary descriptions selected by the user.  Each entry in the list is a two- or three-element list and can be used as input to any function that takes boundaries as arguments.  Parametric surfaces are represented as three values: the database surface, either “U” or “V” indicating the constant parameter, and the constant value of the parameter (either 0.0 or 1.0).  Other surface boundaries are represented as two values: the database surface and the boundary index, starting with 1.

getSelectedEntities

pw::Display getSelectedEntities ?-selectionmask mask? resultVar

This action allows the user to query the display for the current set of selected entities.  An error is raised if this command is called from a non-interactive script.

Parameters

resultVarThis option specifies the name of an array variable to receive the results.  The array indices and the values are listed below.  The array will be cleared prior to setting any new values.
-selectionmask maskThis options controls what types of entities can be selected.  It takes the output of the createSelectionMask command.

Returns

This action returns a boolean value of true if one or more entities were selected.

Results Array

The array is divided into the following elements.

ConnectorsThis element is comprised of a list of the pw::Connector objects selected by the user.
DomainsThis element is comprised of a list of the pw::Domain objects selected by the user.
BlocksThis element is comprised of a list of the pw::Block objects selected by the user.
DatabasesThis element is comprised of a list of the pw::DatabaseEntity objects selected by the user.
SourcesThis element is comprised of a list of the pw::SourceEntity objects selected by the user.
SpacingsThis element is comprised of a list of subconnector spacing descriptions selected by the user.  Each entry in the list is a list of three values.  The first value of the entry is the connector.  The second value is the subconnector index, starting from 1.  The third value is the string “Begin” or “End” indicating which side of the subconnector the spacing object represents.
BoundariesThis element is comprised of a list of the database boundary descriptions selected by the user.  Each entry in the list is a two- or three-element list and can be used as input to any function that takes boundaries as arguments.  Parametric surfaces are represented as three values: the database surface, either “U” or “V” indicating the constant parameter, and the constant value of the parameter (either 0.0 or 1.0).  Other surface boundaries are represented as two values: the database surface and the boundary index, starting with 1.

setSelectedEntities

pw::Display setSelectedEntities entities

This action allows the specification of entities that will be selected when the script ends.  This also affects what subsequent calls to getSelectedEntities return.  Use an empty list to clear the selection.  Note that only visible entities will be selected.  An error is raised if this command is called from a non-interactive script.

Parameters

entitiesThis specifies the entities that will be selected.

Returns

This action returns nothing.

Information

The list of entities can be comprised of connectors, domains, blocks, database entities, subconnector spacings, and database boundaries.  Connectors, domains, blocks, and database entities are specified via their pw::Connector, pw::Domain, pw::Block, and pw::DatabaseEntity objects, respectively.  Subconnector spacings are specified as a list of three values.  The first value of the entry is the connector.  The second value is the subconnector index, starting from 1.  The third value is the string “Begin” or “End” indicating which side of the subconnector the spacing object represents.  Database boundaries are specified as a two- or three-element list.  Parametric surface boundaries are represented as three values: the database surface, either “U” or “V” indicating the constant parameter, and the constant value of the parameter (either 0.0 or 1.0).  Other surface boundaries are represented as two values: the database surface and the boundary index, starting with 1.

createSelectionMask

pw::Display createSelectionMask ?-requireConnector filters? ?-requireDomain filters? ?-requireBlock filters? ?-requireDatabase filters? ?-requireDatabaseBoundary filters? ?-requireSpacing filters? ?-requireSource filters? ?-blockConnector filters? ?-blockDomain filters? ?-blockBlock filters? ?-blockDatabase filters? ?-blockSpacing filters? ?-blockSource filters?

This action creates a selection mask for use with selectEntities.

Parameters

-requireConnector filtersThis flag allows connectors to be selected.  The filters argument is described below along with the valid options.
-requireDomain filtersThis flag allows domains to be selected.  The filters argument is described below along with the valid options.
-requireBlock filtersThis flag allows blocks to be selected.  The filters argument is described below along with the valid options.
-requireDatabase filtersThis flag allows database entities to be selected.  The filters argument is described below along with the valid options.
-requireDatabaseBoundary filtersThis flag allows database boundaries to be selected.  The filters argument is described below along with the valid options.
-requireSpacing filtersThis flag allows subconnector spacing objects to be selected.  The filters argument is described below along with the valid options.
-requireSource filtersThis flag allows sources to be selected.  The filters argument is described below along with the valid options.
-blockConnector filtersThis flag provides a method of preventing any connectors with the specified features from being selected as described below.
-blockDomain filtersThis flag provides a method of preventing any domains with the specified features from being selected as described below.
-blockBlock filtersThis flag provides a method of preventing any blocks with the specified features from being selected as described below.
-blockDatabase filtersThis flag provides a method of preventing any database entities with the specified features from being selected as described below.
-blockSpacing filtersThis flag provides a method of preventing any subconnector spacing objects with the specified features from being selected as described below.
-blockSource filtersThis flag provides a method of preventing any sources with the specified features from being selected as described below.

Returns

This action returns a pick mask object.

Information

require flagParameters that start with -require (such as -requireConnector or -requireDomain) turn on selection for that entity type.  The filters argument is a list of string values describing attributes that an entity is required to possess in order to be selected.  Each entity type has a different set of filter options as listed below.  If no filters are specified, then no explicit attributes are required of entities in order to be selected.  Note that one should not list exclusive values here, or nothing will be selectable.  For example, creating a mask for selecting any prism or structured blocks should not list Prism and Structured in the -requireBlocks list, since all attributes in the require flag must be met and no block will satisfy both the Prism and Structured requirement.  Instead, use an empty -requireBlock list and set the -blockBlock list to Unstructured.
block flagParameters that start with -block (such as -blockDatabase or -blockConnector) provide a means of disqualifying entities for selection.  The filters argument is a list of string values describing attributes that an entity cannot possess in order to be selected.  If an entity has any attribute listed as a block attribute, then the user will not be able to select it.  Each entity type has a different set of filter options as listed below.  Specifying an empty filters argument is equivalent to not specifying the -block parameter.

Connector Filter Options

The options for filtering connector selection are listed below.  If the options are used with the -requireConnector parameter, then connectors must match all options listed in order to be eligible for selection.  If the options are used with the -blockConnector parameter, then only connectors that do not possess any of the specified options will be eligible for selection.

DimensionedThis option specifies connectors that have been dimensioned.
ConstrainedThis option applies to domains that have at least one point constrained by a database entity.
PeriodicThis option specifies connectors that have a periodic link with another connector.
PoleThis option specifies pole connectors (connectors whose shape is a single point).
InDomainThis option specifies connectors that belong to one or more domains.
InBlockThis option specifies connectors that belong to one or more blocks.
FreeThis option describes connectors that are not used by any domains.
LaminaThis option describes connectors that are used by exactly one domain.
ManifoldThis option describes connectors that are used by exactly two domains.
NonManifoldThis option describes connectors that are used by three or more domains.
HiddenThis option specifies connectors that are hidden.

Domain Filter Options

The options for filtering domain selection are listed below.  If the options are used with the -requireDomain parameter, then domains must match all options listed in order to be eligible for selection.  If the options are used with the -blockDomain parameter, then only domains that do not possess any of the specified options will be eligible for selection.

StructuredThis option specifies structured domains.
UnstructuredThis option specifies unstructured domains.
TRexThis option specifies T-Rex domains.
DefinedThe option specifies domains that have internal grid points.  For structured domains, this means domains that have balanced dimensions.  For unstructured domains, this means domains that have been successfully initialized.
SolvedThis option specifies domains which have been refined.
ConstrainedThis option applies to domains that have at least one point constrained by a database entity.
PeriodicThis option specifies domains that have a periodic link with another domain.
InBlockThis option specifies domains that belong to one or more blocks.
FreeThis option describes domains that are not used by any blocks.
LaminaThis option describes domains that are used by exactly one block.
ManifoldThis option describes domains that are used by exactly two blocks.
NonManifoldThis option describes domains that are used by three or more blocks.
HiddenThis option specifies domains that are hidden.

Block Filter Options

The options for filtering block selection are listed below.  If the options are used with the -requireBlock parameter, then blocks must match all options listed in order to be eligible for selection.  If the options are used with the -blockBlock parameter, then only blocks that do not possess any of the specified options will be eligible for selection.

StructuredThis option specifies structured blocks.
UnstructuredThis option specifies unstructured blocks.
PrismThis option specifies a prism block (a block extruded from unstructured domains).
TRexThis option specifies T-Rex blocks.
DefinedThis option describes a block with defined interior grid points.  For a structured block, this means that the faces are dimensionally balanced.  For unstructured blocks, this means that the interior has been initialized.  For prism blocks, this means blocks that have preserved their interior points from the extrusion.
SolvedThis option specifies blocks which have been refined.
HiddenThis option specifies blocks that are hidden.

Database Filter Options

The options for filtering database selection are listed below.  If the options are used with the -requireDatabase parameter, then databases must match all options listed in order to be eligible for selection.  If the options are used with the -blockDatabase parameter, then only databases that do not possess any of the specified options will be eligible for selection.

ModelsThis option specifies model entities.
QuiltsThis option specifies quilt entities.
TrimSurfacesThis option specifies trimmed surface entities.
ShellsThis option specifies shell entities.
SurfacesThis option specifies all surface entities
PlanesThis option specifies plane entities.
CurvesThis option specifies curve entities.
PointsThis option specifies point entities.
NotesThis option specifies note entities.
GroupsThis option specifies group entities.
HiddenThis option specifies database entities that are hidden.
BaseForProjectionThis option specifies database entities that are suitable for grid point projection.
BaseForConnectorThis option specifies database entities that are capable of supporting connectors.
BaseForDomainStructuredThis option specifies database entities that can be used for creating structured domains.
BaseForDomainUnstructuredThis option specifies database entities that can be used for creating unstructured domains.
CanIntersectThis option specifies database entities that can be intersected with other database entities.
DatabaseSupportThis option specifies database entities that are currently in use as support for other database entities (such as a parametric surface supporting a trimmed surface).
EditableThis option specifies database entities that can be edited at the point level.
ParametricThis option specifies database entities that are defined parametrically.

Subconnector Spacing Filter Options

The options for filtering subconnector end spacing selection are listed below.  If the options are used with the -requireSpacing parameter, then subconnector spacing objects must match all options listed in order to be eligible for selection.  If the options are used with the -blockSpacing parameter, then only subconnector spacing objects that do not possess any of the specified options will be eligible for selection.

BeginThis option specifies subconnector spacing objects that are at the beginning of a subconnector.
EndThis option specifies subconnector spacing objects that are at the end of a subconnector.
InteriorThis option specifies subconnector spacing objects that are on interior breakpoints.
ConstrainedThis option specifies subconnector spacing objects that have been given a value other than 0.0.

Database Boundary Filter Options

There are no options for database boundary filtering currently.  The only valid argument to the -requireDatabaseBoundary parameter is an empty list.  Future releases may add options, so requiring an empty list will allow the scripts to continue to work with future versions of Glyph.  Since there are no options for filtering database boundaries, there is no need for a -blockDatabaseBoundary parameter.

Source Filter Options

The options for filtering source selection are listed below.  If the options are used with the -requireSource parameter, then sources must match all options listed in order to be eligible for selection.  If the options are used with the -blockSource parameter, then only sources that do not possess any of the specified options will be eligible for selection.

ShapesThis option specifies shape-defined sources.
CurvesThis option specifies curve-defined sources.
PointsThis option specifies single point and point cloud sources.

Example

Code

# Create a filter for selecting any domains
set sm [pw::Display createSelectionMask -requireDomain {}]

# Create a filter for selecting dimensioned connectors
set sm [pw::Display createSelectionMask \
  -requireConnector {Dimensioned}]

# Create a filter for selecting undimensioned connectors
set sm [pw::Display createSelectionMask \
  -blockConnector {Dimensioned}]

# Create a filter for selecting dimensioned, non-pole connectors
set sm [pw::Display createSelectionMask \
  -requireConnector {Dimensioned} -blockConnector {Pole}]

# Create a filter for selecting unstructured, non-T-Rex domains
set sm [pw::Display createSelectionMask \
  -requireDomain {Unstructured} -blockDomain {TRex}]

# Create a filter for selecting unstructured, T-Rex domains
set sm [pw::Display createSelectionMask \
  -requireDomain [list Unstructured TRex]]

selectPoint

pw::Display selectPoint ?-description message? ?<-controlPoint conList | -connector conList | -domain domList | -database dbList | -source srcList>? ?-details varName?

This action enters an interactive mode where the user can select a single point.

Parameters

-description descThis option causes the text string represented by desc to be displayed in the GUI panel.  It should provide some sort of guidance to the user as to what should be selected.
-controlPoint conListThis option limits point selection to the control points of the connectors specified in conList.  The entities in conList will be made visible and highlighted regardless of their visibility or layer attributes.  It is an error if conList is empty.
-connector conListThis option limits point selection to the connectors specified in conList.  The entities in conList will be made visible and highlighted regardless of their visibility or layer attributes.  If conList is empty, all visible connectors will be eligible for point selection and no highlighting will occur.
-domain domListThis option limits point selection to the domains specified in domList.  The entities in domList will be made visible and highlighted regardless of their visibility or layer attributes.  If domList is empty, all visible domains will be eligible for point selection and no highlighting will occur.
-database dbListThis option limits point selection to the databases specified in dbList.  The entities in dbList will be made visible and highlighted regardless of their visibility or layer attributes.  If dbList is empty, all visible databases will be eligible for point selection and no highlighting will occur.
-source srcListThis option limits point selection to the sources specified in srcList.  The entities in srcList will be made visible and highlighted regardless of their visibility or layer attributes.  If srcList is empty, all visible sources will be eligible for point selection and no highlighting will occur.
-details varThis option specifies the name of an array variable to receive additional information about the point selected.  The array will be cleared prior to setting any new values.

Returns

This action returns a vector representing the XYZ value of the selected point.  It is an error if this action is issued from a non-interactive script or if the user cancels the selection.

Entity Lists

Only zero or one of the entity list options (-controlPoint, -connector, -domain, -database, -source) may be specified for this action.

If a single entity list option with a non-empty list is specified, the entities in the list will be made visible and highlighted regardless of their hidden or layer attributes.

If a single entity list option with an empty list is specified, all visible entities of the specified type will be eligible for point selection and no highlighting will occur.

If zero entity list options are specified, all visible entities of any type are eligible for point selection and no highlighting will occur.

Details Array

After a successful point selection, the details array variable will contain one or more of the following elements:

EntityThis element is always present.  It contains the entity on which the point was selected.  It may be a connector, domain, database, source, or node entity.  This will be a node only if the user selected the end point of an undimensioned connector.
IndexThis element is only present if Entity is a connector or domain.  If Entity is a connector selected using -controlPoint, Index will be a list of 2 integer values consisting of the segment index followed by the control point for that segment.  If Entity is a connector selected using -connector, Index will be a single integer value representing the connector point index.  If Entity is a domain, the Index will be a list of two integer values representing the domain point index.
UVThis element will be set if the selected point is database constrained.  It will be in the point format.

Example

Code

proc dump { xyz detailsArrVar } {
  upvar $detailsArrVar details
  set fmt "%-6.6s = %s"
  puts "--"
  puts [format $fmt "xyz" $xyz]
  foreach {key val} [array get details] {
      puts [format $fmt $key [list $val]]
  }
}

set xyz [pw::Display selectPoint -connector {} -details details]
dump $xyz details

set xyz [pw::Display selectPoint -connector {} -details details]
dump $xyz details

set xyz [pw::Display selectPoint -domain {} -details details]
dump $xyz details

set strDoms [pw::Grid getAll -type pw::DomainStructured]
set xyz [pw::Display selectPoint -domain $strDoms -details details]
dump $xyz details

set xyz [pw::Display selectPoint -database {} -details details]
dump $xyz details

set xyz [pw::Display selectPoint -source {} -details details]
dump $xyz details

Output

--
xyz    = 47.8444898809553 7.53188256823589 -8.97280185214966
Entity = ::pw::Node_2
--
xyz    = 55.59498148541687 -1.0131755687871173 -4.997621035413054
Index  = 2
Entity = ::pw::Connector_6
UV     = {0.5277972127705808 0.5005065827185664 ::pw::Plane_1}
--
xyz    = 55.59498148541687 3.9868244312096994 -4.997621035413054
Index  = {2 2}
Entity = ::pw::DomainStructured_6
UV     = {0.5277972127705808 0.49800660771831795 ::pw::Plane_1}
--
xyz    = 55.59498148541719 8.986824431211442 -9.997621035413054
Index  = {2 2}
Entity = ::pw::DomainStructured_4
--
xyz      = 11.1167905722305 -14.6824061106718 -0.442818802832527
Entity   = ::pw::Curve_1
UV       = {1.0 0.0 ::pw::Curve_1}
--
xyz      = 12.0 12.0 12.0
Entity   = ::pw::SourcePointCloud_1

setLightDirection

pw::Display setLightDirection ?-scene boolean? direction

This action controls the display’s lighting direction and whether the lighting is fixed with the view or with the scene.  When the lighting is fixed relative to the scene, the light direction is in the grid coordinate system and will move with the scene as the viewing angle is rotated.  When the lighting is fixed relative to the view, the direciton coordinate system is defined with the X-axis to the right, the Y-axis up, and the Z-axis out of the screen.  The default lighting direction is view-based with a direction of (0, 0, -1) (ie, into the screen).

Parameters

-sceneThis option takes a boolean value and controls whether the direction is to be locked relative to the grid system’s coordinates (a true value) or locked relative to the viewing direction (a false value, which is also the default value).
directionThis parameter is the lighting direction, either in the viewing or scene coordinates.  It should be a vector of 3 floating point values.  The default direction is (0, 0, -1) in the viewing coordinates.

Returns

This action returns nothing.

getLightDirection

pw::Display getLightDirection ?sceneVar?

This action returns the display’s lighting direction.  Optionally, it will also return whether the display’s light is fixed with the view or with the scene.

Parameters

sceneVarThis option should define a variable that will receive a boolean value.  A value of true indicates that the light is fixed with the scene.  A value of false indicates that the light direction is fixed with the view direction (the view direction is considered to be along the negative Z axis in view coordinates).

Returns

This command returns a vector representing the current lighting direction.

getSize

pw::Display getSize

This action returns the size of the current display window.

Returns

This command returns the display size as a list of 2 integer values representing the width and the height, respectively, in pixels of the display window.  If there is no display window, zero is returned for both dimensions.

getImageFormats

pw::Display getImageFormats

This action returns a list of available image format options for the saveImage command.

Returns

This command returns a list of string values.  Each entry is a valid option for the saveImage command’s -format option.  If there is no display, an empty list will be returned.

saveImage

pw::Display saveImage ?-foreground fgOption? ?-background bgOption? ?-dpi dpi? ?-size size? ?-format option? filename

This action saves an image of the current display to a file.  This automatically causes an update of the display first to make sure the display is current.

Parameters

-foreground fgOptionThis option takes a string value representing the foreground color option.  The available options are: Color, Grayscale, White, and Black.  This controls how the color of all non-background objects are treated.  The default Color option preserves the existing colors.  The Grayscale option converts the colors to the corresponding gray values.  The White option converts all colors to white, and the Black option converts all colors to Black.
-background bgOptionThe option takes a string value representing the background color option.  The available options are: Color, Grayscale, White, Black, and Transparent.  This controls how the background is represented in the image.  The default Color option preserves the existing background colors.  The Grayscale option converts the background colors to gray values.  The White option converts the background to white (an error is raised if this is selected and the foreground option is also set to White).  The Black option converts the background to black (an error is raised if the foreground is also set to Black).  The Transparent option saves the image with a transparent background if the graphics hardware supports it and the PNG format is specified (either explicitly or implicitly through the filename’s extension).  Otherwise the Color option is used.
-dpi dpiThis option expects a positive non-zero integer value representing the dots-per-inch value saved in the image.  The default value is 72.
-size sizeThis option specifies the image size in inches.  It is represented as a list of 2 real numbers denoting the width and height of the image.  This value, along with the dots-per-inch setting are used to determine the pixel size of the image.  If not specified, the image size in pixels will be the same as the current display.
-format optionThis should be a string value of the form PNG, BMP, or TIFF.  Note that not all values are supported on all platforms.  Use the getImageFormats command to see a list of supported values.  The default format is determined by the extension of the filename if possible, or PNG if a non-standard extension is used.
filenameThis string value should contain the name of a writable file to which the image will be saved.  If the format is not specified with the -format option, the format will be determined from the filename extension if possible.  Recognized extensions are “.bmp”, “.png”, “.tif”, and “.tiff”.  The format should be explicitly declared if a different extension is specified.

Returns

This command returns a boolean value of true if the image was saved and false if the image was not saved.

zoomToEntities

pw::Display zoomToEntities ?-animate seconds? entities

This action changes the zoom level and pans to center the display around the list of given entities.

Parameters

-animateThis option specifies that the view transition should be animated over the specified number of seconds.
entitiesThis parameter is a list of entities, database boundaries, or connector end spacings.  The display will be panned and zoomed to fit these entities.

Notes

Connector end spacings are represented as a list consisting of the connector, an optional sub-connector index, and either “Begin” or “End” to specify which spacing.  If the sub-connector index is omitted, the “Begin” and “End” values refer to the beginning and ending spacings of the entire connector.

Returns

This action returns a boolean indicating whether or not the view was updated to the requested view.  This will only return false if an animation was requested and the user halted the animation before it completed.

zoomToFit

pw::Display zoomToFit ?-animate seconds?

This action changes the zoom level and pans to center the display around all currently visible entities.

Parameters

-animateThis option specifies that the view transition should be animated over the specified number of seconds.

Returns

This action returns a boolean indicating whether or not the view was updated to the requested view.  This will only return false if an animation was requested and the user halted the animation before it completed.

pw::Display get/setProjection < Perspective | *Orthonormal* >
This attribute is the type of projection of the display.
pw::Display get/setShowBodyAxes true
This attribute controls showing the rotation point axes in the display.
pw::Display get/setShowXYZAxes true
This attribute controls showing the XYZ axes in the display centered at the origin.
pw::Display get/setShowDatabase show
This attribute controls showing database entities in the display.
pw::Display get/setShowSources show
This attribute controls showing source entities in the display.
pw::Display get/setShowNodes show
This attribute controls showing node entities in the display.
pw::Display get/setShowConnectors show
This attribute is the status of showing connector entities in the display.
pw::Display get/setShowDomains show
This attribute is the status of showing domain entities in the display.
pw::Display get/setShowOverset show
This attribute is the status of showing overset data in the display.
pw::Display get/setShowDisabledEntities show
This attribute is the status of showing disabled entities in the display.
pw::Display get/setShowDrawingGuide show
This attribute is the status of showing the drawing guide in the display.
pw::Display get/setShowViewManipulator show
This attribute is the status of showing the view manipulator in the display.
pw::Display get/setDoublePrecision bool
This attribute controls the floating point precision used in the display.
pw::Display get/setAutomaticPrecision bool
This attribute controls whether the display switches between single and double precision graphics modes as needed.
pw::Display get/setCurrentLayer layer
This attribute is the current layer which is always visible and new entities are added to this layer.
pw::Display update
This action updates the graphics in the display to their current setting.
pw::Display resetView ?< +X | -X | +Y | -Y | +Z | -Z >?
This action resets the view so that the entire system is visible and centered in the display.
pw::Display resetRotationPoint
This action resets the view rotation point to the center of visible objects.
pw::Display setRotationPoint position
This action sets the view rotation point to the position specified.
pw::Display getCurrentView
This action gets the current view of the display.
pw::Display setCurrentView ?-animate seconds? view
This action updates the display to the current view.
pw::Display calculateView ?-center? ?-view direction? ?-up direction? extent_minimum extent_maximum
This action computes the view to center the specified extents in the display with the given view angle.
pw::Display saveView slot view ?name?
This action saves a view into a slot.
pw::Display recallView < slot | name >
This action restores the view specified by slot or name.
pw::Display clearView < slot | name >
This action clears the view specified by slot or name.
pw::Display isSavedView < slot | name >
This action checks to see if a view is saved in a slot or has the given name.
pw::Display getViewName slot
This action returns the name of the saved view.
pw::Display setViewName slot name
This action sets the name of the view in the given slot.
pw::Display isLayerVisible layer
This action checks if the given layer is visible.
pw::Display isolateLayer layer
This action isolates the given layer by hiding all other layers, showing this layer and setting it as the current layer.
pw::Display showLayer < layer | layer_list >
This action sets the given layers to be shown in the current display.
pw::Display showAllLayers
This action sets all of the layers to be shown in the current display.
pw::Display hideLayer < layer | layer_list >
This action sets the given layers to be hidden in the current display.
pw::Display hideAllLayers
This action sets all of the layers to be hidden in the current display.
pw::Display toggleLayer < layer | layer_list >
This action toggles the visibility of the given layers in the current display.
pw::Display toggleAllLayers
This action toggles all of the layers in the current display.
pw::Display selectEntities ?-description desc? ?-selectionmask mask? ?-single? ?-preselect ents? ?<-exclude ents | -pool ents>? resultVar
This action allows the user to interactively select entities.
pw::Display getSelectedEntities ?-selectionmask mask? resultVar
This action allows the user to query the display for the current set of selected entities.
pw::Display setSelectedEntities entities
This action allows the specification of entities that will be selected when the script ends.
pw::Display createSelectionMask ?-requireConnector filters? ?-requireDomain filters? ?-requireBlock filters? ?-requireDatabase filters? ?-requireDatabaseBoundary filters? ?-requireSpacing filters? ?-requireSource filters? ?-blockConnector filters? ?-blockDomain filters? ?-blockBlock filters? ?-blockDatabase filters? ?-blockSpacing filters? ?-blockSource filters?
This action creates a selection mask for use with selectEntities.
pw::Display selectPoint ?-description message? ?<-controlPoint conList | -connector conList | -domain domList | -database dbList | -source srcList>? ?-details varName?
This action enters an interactive mode where the user can select a single point.
pw::Display setLightDirection ?-scene boolean? direction
This action controls the display’s lighting direction and whether the lighting is fixed with the view or with the scene.
pw::Display getLightDirection ?sceneVar?
This action returns the display’s lighting direction.
pw::Display getSize
This action returns the size of the current display window.
pw::Display getImageFormats
This action returns a list of available image format options for the saveImage command.
pw::Display saveImage ?-foreground fgOption? ?-background bgOption? ?-dpi dpi? ?-size size? ?-format option? filename
This action saves an image of the current display to a file.
pw::Display zoomToEntities ?-animate seconds? entities
This action changes the zoom level and pans to center the display around the list of given entities.
pw::Display zoomToFit ?-animate seconds?
This action changes the zoom level and pans to center the display around all currently visible entities.
Base type for all glyph types
A string is an array of characters.
A boolean is represented as a 0 or 1, with 0 being false and 1 being true.
An integer is a whole number.
A vector is a list of float values.
A float is a fractional number.
A connector is a computationally one-dimensional grid entity, defined in the parameter space of one or more end-connected curve segments.
A domain is a computationally two-dimensional grid entity, bounded by one or more pw::Edges.
A block is a volume grid bounded by one or more pw::Faces.
Base type for all database entities
A boundary is reference to either a database curve or the edge of a database surface.
Base type for all source entities
A point is a position either in model space or database parameter space.
Close