Glyph

Glyph is the scripting language for Pointwise.  It is an extension to the tcl programming language that allows access to the commands and entities of the Pointwise application.

Summary
GlyphGlyph is the scripting language for Pointwise.
Primitives
stringA string is an array of characters.
integerAn integer is a whole number.
floatA float is a fractional number.
booleanA boolean is represented as a 0 or 1, with 0 being false and 1 being true.
colorA color is represented as a 32-bit hex value, 0x00RRBBGG.
vectorA vector is a list of float values.
pointA point is a position either in model space or database parameter space.
planeA plane is a list of four float values representing the geometric plane coefficients A, B, C and D.
boundaryA boundary is reference to either a database curve or the edge of a database surface.
indexAn index is a list of integer values.
coordA coord is a position in grid space.
registerA register is the usage of a lower level entity in a higher level entity.
framework_pathA framework_path is a reference to a specific framework.
framework_entityA framework_entity is a reference to an entity in a pw::Framework.
typeA type is the class name of a Glyph object.

Primitives

string

A string is an array of characters.  They are represented as tcl strings.

integer

An integer is a whole number.  They are represented as tcl integers.

float

A float is a fractional number.  They are represented as tcl floating point numbers, which follows the ANSI-compliant C compiler specification, which includes representing floating point numbers in scientific format (e.g.  1.23e+4)

boolean

A boolean is represented as a 0 or 1, with 0 being false and 1 being true.  Commands that return a boolean will always return the value as a 0 or 1.  Commands that take a boolean as a parameter will accept the following representations:

  • integer, 0 is false and anything else is true
  • the strings true and false
  • the strings yes and no

color

A color is represented as a 32-bit hex value, 0x00RRBBGG.  Commands that return a color will always return the color in the 32-bit hex value form.  Commands that take a color as a parameter will accept the following representations:

  • 32-bit hex value, 0x00RRBBGG
  • html hex form, #RRGGBB
  • list of three values [0.0,1.0], a normalized real value for each color component

Examples

The following color values are equivalent.

  • 0x00FF7F3F
  • #FF7F3F
  • [1.0 0.5 0.25]

vector

A vector is a list of float values.  These are typically lists of three values for representing xyz coordinates, or two values for representing uv coordinates.

point

A point is a position either in model space or database parameter space.  If the point is referring to model space it will be in the form of an xyz vector.  If the point is referring to parameter space it will be in the form of a uv vector followed by a pw::DatabaseEntity object that is parametric or a face index and a pw::Quilt or pw::Shell.  If the point is constrained to a Compressed Shell, it will be of the form xyz vector followed by pw::Shell

Examples of these four different possibilities are as follows

  • [list 1.0 2.0 3.0]
  • [list 0.1 0.2 $surf]
  • [list 0.3 0.4 5 $shell]
  • [list 1.1 2.2 3.3 $cshell]

plane

A plane is a list of four float values representing the geometric plane coefficients A, B, C and D.  You can use pwu::Plane to construct a plane.  The following plane definitions are equivalent:

  • {1 0 0 0} ;# explicit plane definition
  • pwu::Plane set {1 0 0 0} ;# set with coefficients list
  • pwu::Plane set 1 0 0 0 ;# set with coefficient values
  • pwu::Plane set {1 0 0} {0 0 0} ;# set with normal and origin
  • pwu::Plane set {0 0 0} {0 10 0} {0 0 10} ;# set with three points

boundary

A boundary is reference to either a database curve or the edge of a database surface.  When referring to a database curve, it will be simply the pw::Curve.  If the boundary is the edge of a parametric surface, it will be a list comprised of the pw::Surface, either U or V to indicate the constant parameter, and the constant value of the parameter.  If the boundary is a trimmed curve, it will be a list comprised of the pw::Curve followed by the minimum parameter value and the maximum parameter value.  If the boundary is the edge of a shell, trim surface, quilt, or model, it will be a list of the pw::Shell object, pw::SurfaceTrim object, pw::Quilt object, or pw::Model object and the boundary index.  Examples of the different types are as follows:

  • [list $curve]
  • [list $surf U 1.0]
  • [list $curve 0.2 0.8]
  • [list $shell 2]
  • [list $tsurf 3]
  • [list $quilt 5]
  • [list $model 1]

index

An index is a list of integer values.  These are typically lists of three values for representing ijk coordinates, or two values for representing ij coordinates.

coord

A coord is a position in grid space.  The coord is specified as a list with the last element being a pw::GridEntity object.  The first elements of the list can be 1, 2, or 3 integers specifying the i, ij, or ijk of the coord.  Any missing j or k values are considered to be 1, and if the grid entity does not have j or k computational space, those values are ignored.  Examples of the three different possibilities are as follows:

  • [list 1 $con]
  • [list 5 10 $dom]
  • [list 10 15 20 $blk]

register

A register is the usage of a lower level entity in a higher level entity.

For the usage of a connector in a domain, it is represented as a list with two or three elements, the first being a pw::Domain object, the second a pw::Connector object, and the (optional) third is the orientation of the connector in the domain’s edge represented by the string Same or Opposite.  The orientation is optional when the connector is used only once in the domain.  If the orientation is not specified and the connector is used more than once in the domain, Same is assumed.

For the usage of a domain in a block, it is represented as a list with two or three elements, the first being a pw::Block object, the second a pw::Domain object, and the (optional) third is the orientation of the domain in the block’s face represented by the string Same or Opposite.  The orientation is optional when the domain is used only once in the block.  If the orientation is not specified and the domain is used more than once in the block, Same is assumed.

Examples of the different possibilities are as follows

  • [list $dom $con]
  • [list $dom $con Opposite]
  • [list $blk $dom]
  • [list $blk $dom Same]

framework_path

A framework_path is a reference to a specific framework.  It can be represented either as an ordered sequence (list) of pw::Framework objects or an ordered sequence (list) of framework names.

Examples

  • [list $fw1 $fw2 $fw3] where $fw1, $fw2 and $fw3 are pw::Framework objects and $fw1 is the root framework and $fw2 is a child framework of $fw1, and $fw3 is a child framework of $fw2
  • [list root A B] or {root A B} where root is the name of the root pw::Framework, A is the name of a child of root, and B is the name of a child of A.

framework_entity

A framework_entity is a reference to an entity in a pw::Framework.  Framework entities can be represented in any of the following ways:

Further, commands that accept lists of framework_entity may accept any of the above, or a list of any combination of the above.  For example:

type

A type is the class name of a Glyph object.  The type of an object is the string shown at the top of its relevant page in this manual, and always starts with the namespace qualifier “pw::”.  Valid types are any that derive from pw::Object, which includes all general, entity, mode, segment and support types.  For full type inheritance, see the Derives From section at the top of any page in this manual.

A float is a fractional number.
An integer is a whole number.
Framework type
A vector is a list of float values.
Base type for all database entities
Database quilt type
Database shell type
Utility functions for planes, which are represented as a list of four real values (the A, B, C and D coeffecients).
Database curve type
Database surface type
Database trim surface type
Database model type
Base type for all grid entities.
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.
A block is a volume grid bounded by one or more pw::Faces.
Entity type
A framework_path is a reference to a specific framework.
A framework_entity is a reference to an entity in a pw::Framework.
A string is an array of characters.
Base type for all glyph types
Close