Glyph2 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.
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:
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:
The following color values are equivalent.
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.
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. Examples of these three different possibilities are as follows:
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 or quilt, it will be a list of the pw::Shell object, pw::SurfaceTrim object, or pw::Quilt object and the boundary index. Examples of the different types are as follows:
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.
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:
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
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.
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:
A type is the class name of a Glyph2 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.