pw:: Grid

Global actions for grid entities

Derives From

pw::Object

Summary
Global actions for grid entities
This action gets a list of file types that can export all of the given entities.
This action checks if a list of entities are valid for the given settings.
This action exports the list of entities to the given file.
This action checks if importing the given file would result in missing references.
This action imports a file into the grid.
This action saves the entire grid in the native file format.
This action merges connectors within a tolerance.
This action automatically merges two connectors.
This action gets the 3D position of the given grid coordinate.
This action gets the position of the given grid coordinates.
This action gets the grid entity at the given grid coordinates
This action maps the given grid coordinate to all coords that are immediately higher than the specified coord.
This action maps the given grid coordinate to all coords that are immediately lower than the specified coord.
This action offsets the ijk coordinates of the given grid coordinate.
This action calculates the offset from the given grid coordinate in the direction of the normal at the coordinate.
This action gets a list of all grid entities.
This action gets the number of grid entities.
This action gets a grid entity using the name.
This action gets the extents of the grid entities.
This action gets the number of elements of the given type in the entire grid.
This action gets the number of points in the entire grid.
Determines if a grid mirror plane is defined.
Undefines the grid mirror plane.
Processes entity_list for the given plane.
This attribute is the grid point tolerance of grid entities and operations.
This attribute is the node tolerance of grid entities and operations.
This attribute is the connector tolerance of grid entities and operations.
This attribute is the bending angle at which unstructured domains are split on import.
This attribute is the flag for whether unstructured domains with more than one edge are split on import so that they will only made up of a single edge.
This attribute is the mirroring plane applied to the grid at export.

Static Actions

getExportFileTypes

pw::Grid getExportFileTypes ?-facesOnly? entity_list

This action gets a list of file types that can export all of the given entities.

Parameters

-facesOnlyIf this flag is present only the faces of blocks will be exported.
entity_listThis parameter is a list of pw::GridEntity objects, or a single pw::GridEntity Object.

Returns

This action returns a list containing file type names that can be used in the export command.

checkForInvalidEntities

pw::Grid checkForInvalidEntities -type file_type ?-facesOnly? ?-invalid invalid_var? entity_list

This action checks if a list of entities are valid for the given settings.

Parameters

-type file_typeThis parameter is the file type of the exported file; < Gridgen | IGES | STL | GridPro | VRML | VRML97 | PLOT3D | Segment | Patran | Nastran | UCD | Xpatch | FVUNS | CGNS | CGNS-STRUCT | CGNS-UNSTR >.
-facesOnlyThis flag if present, indicates only the faces of blocks will be exported.
-invalid invalid_varThis parameter is a string name of the variable to receive a list of invalid pw::GridEntity objects.
entity_listThis parameter is a list of pw::GridEntity objects, or a single pw::GridEntity Object.

Returns

This action returns a boolean, true if all entities are valid for given file type.

Information

The export function has more information about file types.

See Also

export

export

pw::Grid export ?-type file_type? ?-format file_format? ?-precision fp_precision? ?-surfaces surface_style? ?-facesOnly? ?-noOverwrite? ?-report report_var? entity_list filename

This action exports the list of entities to the given file.

Parameters

-type file_typeThis parameter is the file type of the exported file; < Automatic | Gridgen | IGES | STL | GridPro | VRML | VRML97 | PLOT3D | Segment | Patran | Nastran | UCD | Xpatch | FVUNS | CGNS | CGNS-STRUCT | CGNS-UNSTR >.
-format file_formatThis parameter is the file format of the exported file; < ASCII | Binary | Unformatted >.
-precision fp_precisionThis parameter is the floating point precision of the exported file; < Single | Double >.
-surfaces surface_styleThis parameter is the exported surface style; < Bilinear | Continuous >.
-facesOnlyIf this flag is present only the faces of blocks will be exported.
-noOverwriteIf this flag is present and the file already exists, do not export the file.
-report report_varThis parameter is a string variable name to recieve the low-level export details as a pre-formatted report string.
entity_listThis parameter is a list of pw::GridEntity objects, or a single pw::GridEntity object.
filenameThis parameter is the full path and name of the file to export.

Returns

This action returns nothing.

Information

This command supports progress updates.

File Types

Automaticdetermine the file type based on the filename extension
GridgenGridgen grid file format
IGESInitial Graphics Exchange Specification v5.3
STLStereo Lithography file format
GridProGridPro’s surface patch files
VRMLVRML 1.0 format
VRML97VRML 2.0/97 format
PLOT3D3D, multi-grid format with no i-blanking
SegmentGridgen connector and line file format
PatranPatran version 2.5 Neutral file format
NastranNastran version 69 format, Double precision refers to the “large” Nastran format (using 16 character fields)
UCDAdvanced Visual Systems’ unstructured cell data file format
XpatchXpatch unstructured data file format
FVUNSFIELDVIEW unstructured data file format
CGNSCFD General Notation System data file format
CGNS-STRUCTCFD General Notation System data file format (structured)
CGNS-UNSTRCFD General Notation System data file format (unstructured)
For file_format A = ASCII, B = Binary, U = Unformatted

file_type extension file_format fp_precision valid entity types
============= =========== =========== ================ ==================
Gridgen gg B Double any
IGES igs,iges A Double structured 2D
STL stl A|B Single unstructured 2D
GridPro dat A Single|Double 2D
VRML wrl,vrml A Single 2D
VRML97 wrl,vrml A Single 2D
PLOT3D x,xyz,p3d A|B|U Double|Single structured 2D/3D
Segment dat A Double|Single 1D
Patran pat A Single* 2D/3D
Nastran nas A Double|Single** 2D/3D
UCD ucd A Double|Single 2D/3D
Xpatch facet A Double|Single 2D
FVUNS uns A|B|U Single 3D
CGNS cgns B Double|Single 3D
CGNS-STRUCT cgns B Double|Single structured 3D
CGNS-UNSTR cgns B Double|Single 3D

* The Patran format uses a fixed width field giving 10 digits of precision
(single = 7 digits, double = 16 digits).

** The Nastran format uses a fixed width field giving 10 digits of precision
(single = 7 digits, double = 16 digits), however the precision field is
used to specify the style of Nastran export, where Single will generate
the small Nastran format and Double will generate the large field
Nastran-L format (using 16 character fields).

checkForMissingReferences

pw::Grid checkForMissingReferences ?-type file_type? ?-format file_format? ?-precision fp_precision? ?-missing missingVar? filename

This action checks if importing the given file would result in missing references.

Parameters

-type file_typeThis parameter is the file type of the imported file; < Automatic | Gridgen | IGES | STL | GridPro | VRML | VRML97 | PLOT3D | Network | Segment | Patran | Nastran | UCD | Xpatch | FVUNS | CGNS | CGNS-STRUCT | CGNS-UNSTR | UGRID >
-format file_formatThis parameter is the file format of the imported file; < ASCII | Binary | Unformatted >.
-precision fp_precisionThis parameter is the floating point precision of the imported file; < Single | Double >.
-missing missingVarThis parameter is a variable name to recieve a list of names that are the missing references, if any.
filenameThis parameter is the full path and name of the file to import.

Returns

This action returns a boolean, which is true if there are no missing references.

Information

This command supports progress updates.

File Types

See import for information on file types.

import

pw::Grid import ?-type file_type? ?-format file_format? ?-precision fp_precision? ?-report report_var? filename

This action imports a file into the grid.

Parameters

-type file_typeThis parameter is the file type of the exported file; < Automatic | Gridgen | IGES | STL | GridPro | VRML | PLOT3D | Network | Segment | Patran | Nastran | UCD | Xpatch | FVUNS | CGNS | CGNS-STRUCT | CGNS-UNSTR | UGRID >.
-format file_formatThis parameter is the file format of the imported file; < ASCII | Binary | Unformatted >.
-precision fp_precisionThis parameter is the floating point precision of the imported file; < Single | Double >.
-report report_varThis parameter is a string variable name to receive the low-level import details as a pre-formatted report string.
filenameThis parameter is the full path and name of the file to import.

Returns

This action returns a list of the imported GridEntity objects.  Only entities explicitly defined are returned.  For example, when importing a 2D PLOT3D file, the necessary connectors will be created, but only the domain will be returned.  When importing a Gridgen file, all grid entities imported will be returned since they are all explicitly defined in the file.

Information

This command supports progress updates.

File Types

Automaticdetermine the file type based on the filename extension
GridgenGridgen grid file format
STLStereo Lithography file format
GridProGridPro’s volume grid files
VRMLVRML 1.0 or 97 format
PLOT3D3D, multi-grid format with no i-blanking
NetworkGridgen structured grid and network surface file format
SegmentGridgen connector and line file format
PatranPatran version 2.5 Neutral file format
NastranNastran version 69 format, Double precision refers to the “large” Nastran format (using 16 character fields)
UCDAdvanced Visual Systems’ unstructured cell data file format
XpatchXpatch unstructured data file format
FVUNSFIELDVIEW unstructured data file format
CGNSCFD General Notation System data file format
CGNS-STRUCTCFD General Notation System data file format (structured)
CGNS-UNSTRCFD General Notation System data file format (unstructured)
UGRID2D/3D unstructured grid format
For file_format A = ASCII, B = Binary, U = Unformatted

file_type extension file_format fp_precision valid entity types
============= =========== =========== ================ ==================
Gridgen gg B Double any
IGES igs,iges A Double structured 2D
STL stl A|B Single unstructured 2D
GridPro grd A Single|Double structured 3D
VRML wrl,vrml A Single 2D
PLOT3D x,xyz,p3d A|B|U Double|Single structured 2D/3D
Network grd,net A|B|U Double|Single structured 2D/3D
Segment dat A Double|Single 1D
Patran pat A Single* 2D/3D
Nastran nas A Double|Single** 2D/3D
UCD ucd A Double|Single 2D/3D
Xpatch facet A Double|Single 2D
FVUNS uns A|B|U Single 3D
CGNS cgns B Double|Single 3D
CGNS-STRUCT cgns B Double|Single structured 3D
CGNS-UNSTR cgns B Double|Single 3D
UGRID ugrid A|B|U Double|Single unstructured 2D/3D

* The Patran format uses a fixed width field giving 10 digits of precision
(single = 7 digits, double = 16 digits).

** The Nastran format uses a fixed width field giving 10 digits of precision
(single = 7 digits, double = 16 digits), however the precision field is
used to specify the style of Nastran import, where Single will generate
the small Nastran format and Double will generate the large field
Nastran-L format (using 16 character fields).

save

pw::Grid save ?-compress level? ?-noOverwrite? filename

This action saves the entire grid in the native file format.

Parameters

-compress levelThis action is the level of compression to save the file with; [0, 9] where 0 = no compression, 1 = minimum, 9 = maximum; default is 0.
-noOverwriteIf this flag is present and the file already exists, do not save the file.
filenameThis parameter is the full path and name of the file to save.

Returns

This action returns nothing.

Information

This command supports progress updates.

For “-compress level”, 0 = no compression, 1 = minimum, and 9 = maximum.  Higher levels of compression take longer to save.

mergeConnectors

pw::Grid mergeConnectors ?-exclude topology? ?-visibleOnly? -tolerance tol

This action merges connectors within a tolerance.

Parameters

-exclude topologyThis optional parameter is the topology to exclude from merging; None | Manifold | NonFree.
-visibleOnlyThis flag causes only visible connectors to be considered for merging.  All hidden connectors are ignored.
-tolerance tolThis parameter is the tolerance that connectors and nodes must be within for merging to take place.

Returns

This action returns nothing.

mergeConnectorPair

pw::Grid mergeConnectorPair con1 con2

This action automatically merges two connectors.

Parameters

con1This parameter is a pw::Connector object to merge.
con2This parameter is a pw::Connector object to merge.

Returns

This action returns nothing.

getXYZ

pw::Grid getXYZ coord

This action gets the 3D position of the given grid coordinate.

Parameters

coordThis parameter is a grid coord.

Returns

This action returns an xyz vector.

getPoint

pw::Grid getPoint coord

This action gets the position of the given grid coordinates.

Parameters

coordThis parameter is a grid coord.

Returns

This action returns a point giving the position of the grid coordinate It may be in the form “u v dbentity”.

getEntity

pw::Grid getEntity coord

This action gets the grid entity at the given grid coordinates

Parameters

coordThis parameter is a grid coord.

Returns

This action returns a pw::GridEntity object.

Information

If the given coord is not valid, an error will occur.

mapHigher

pw::Grid mapHigher coord

This action maps the given grid coordinate to all coords that are immediately higher than the specified coord.  That is, a node based grid coord will be mapped to all connector based coords at that point (and similarly; connectors to domains, and domains to blocks).

Parameters

coordThis parameter is a grid coord.

Returns

This action returns a list of grid coords based on higher level grid entities that represent the same point.  An empty list is returned if coord does not map to any higher level entities.

Example

This example starts with $nod (an existing node entity) and maps it up to all unique higher level entities.

Code

puts "***********************************************"
puts "Dumping higher coords for \{1 $nod\}"
puts "***********************************************"
puts ""

# prime coords array with {nodeName nodeCoord}
array set coords [list [$nod getName] [list 1 $nod]]
set indent ""

# keep processing as long as coords array is not empty
while { [array size coords] > 0 } {
array unset higherCoords ;# clear this out

# process each name coord pair in the coords array
foreach { name coord } [array get coords] {
set xyz [pw::Grid getXYZ $coord]
puts [format "%-20.20s | %-30.30s | %-s" \
"$indent$name" "\{$coord\}" "($xyz)"]

foreach higherCoord [pw::Grid mapHigher $coord] {
set higherEnt [lindex $higherCoord end] ;# get coord's entity
set higherEntName [$higherEnt getName] ;# get entity name

# if higherEntName is NOT in higherCoords array
if { {} == [array get higherCoords $higherEntName] } {
# Use higherEntName as key to store higherCoord in the
# higherCoords array
set higherCoords($higherEntName) $higherCoord
}
}
}
array unset coords ;# All done with coords

# reload coords with any lower coordinates found above.
array set coords [array get higherCoords]

append indent ".." ;# increase indent level string for next pass
}

Output

***********************************************
Dumping higher coords for {1 ::pw::Node_1}
***********************************************

Node_1 | {1 ::pw::Node_1} | (-11.0 0.0 9.0)
..conBlkLeft-12 | {3 ::pw::Connector_27} | (-11.0 0.0 9.0)
..conBlkLeft-13 | {3 ::pw::Connector_31} | (-11.0 0.0 9.0)
..conBlkLeft-15 | {1 ::pw::Connector_25} | (-11.0 0.0 9.0)
....domBlkLeft-7 | {3 3 ::pw::DomainStructured_2} | (-11.0 0.0 9.0)
....domBlkLeft-8 | {1 3 ::pw::DomainStructured_1} | (-11.0 0.0 9.0)
....domBlkLeft-10 | {1 1 ::pw::DomainStructured_3} | (-11.0 0.0 9.0)
......blk-1 | {13 ::pw::BlockUnstructured_1} | (-11.0 0.0 9.0)

mapLower

pw::Grid mapLower ?-includeNodes? coord

This action maps the given grid coordinate to all coords that are immediately lower than the specified coord.  That is, a block based grid coord will be mapped to all domain based coords at that point (and similarly; domains to connectors and connectors to nodes).

Parameters

coordThis parameter is a grid coord.
-includeNodesIf this flag is present, connector endpoint grid coordinates will map down to their associated pw::Node objects.  By default, mapLower will only map down to connector entities.

Returns

This action returns a list of grid coords based on lower level grid entities that represent the same point.  An empty list is returned if coord does not map to any lower level entities.

Example

This example starts with $blk (an existing block entity) and maps a corner coord down to all unique lower level entities.

Code

puts "***********************************************"
puts "Dumping lower coords for \{1 1 1 $blk\}"
puts "***********************************************"
puts ""

# prime coords array with {blockName blockCornerCoord}
array set coords [list [$blk getName] [list 1 1 1 $blk]]
set indent ""

# keep processing as long as coords array is not empty
while { [array size coords] > 0 } {
array unset lwrCoords ;# clear this out

# process each name coord pair in the coords array
foreach { name coord } [array get coords] {
set xyz [pw::Grid getXYZ $coord]
puts [format "%-20.20s | %-30.30s | %-s" \
"$indent$name" "\{$coord\}" "($xyz)"]

foreach lwrCoord [pw::Grid mapLower -includeNodes $coord] {
set lowerEnt [lindex $lwrCoord end] ;# get coord's entity
set lowerEntName [$lowerEnt getName] ;# get entity name

# if lowerEntName is NOT in lwrCoords array
if { {} == [array get lwrCoords $lowerEntName] } {
# Use lowerEntName as key to store lwrCoord in the
# lwrCoords array
set lwrCoords($lowerEntName) $lwrCoord
}
}
}
array unset coords ;# All done with coords

# reload coords with any lower coordinates found above.
array set coords [array get lwrCoords]

append indent ".." ;# increase indent level string for next pass
}

Output

***********************************************
Dumping lower coords for {1 1 1 ::pw::BlockExtruded_1}
***********************************************

blk-3 | {1 1 1 ::pw::BlockExtruded_1} | (0.0 0.0 -6.0)
..dom-13 | {1 1 ::pw::DomainStructured_5} | (0.0 0.0 -6.0)
..dom-9 | {1 ::pw::DomainUnstructured_1} | (0.0 0.0 -6.0)
..dom-11 | {3 1 ::pw::DomainStructured_4} | (0.0 0.0 -6.0)
....con-13 | {1 ::pw::Connector_6} | (0.0 0.0 -6.0)
....con-15 | {4 ::pw::Connector_4} | (0.0 0.0 -6.0)
....con-19 | {1 ::pw::Connector_5} | (0.0 0.0 -6.0)
......Node_1 | {1 ::pw::Node_1} | (0.0 0.0 -6.0)

offsetIJK

pw::Grid offsetIJK coord < i | ij | ijk >

This action offsets the ijk coordinates of the given grid coordinate.

Parameters

coordThis parameter is a grid coord.
iThis parameter is the i amount to offset.
ijThis parameter is list with the i and j amounts to offset.
ijkThis parameter is with the i, j, and k amounts to offset.

Returns

This action returns a grid coord.

offsetNormal

pw::Grid offsetNormal coord distance

This action calculates the offset from the given grid coordinate in the direction of the normal at the coordinate.

Parameters

coordThis parameter is a grid coord.
distanceThis parameter is the distance to offset.

Returns

This action returns an xyz vector.

Information

If the normal is not defined for the given grid coordinate, an error will occur.

getAll

pw::Grid getAll ?-type type_string? ?-gridgenCompatible?

This action gets a list of all grid entities.

Parameters

-type type_stringIf specified, this option filters the result to include only entities of the specified type.  Only types derived from pw::GridEntity are valid.
-gridgenCompatibleIf specified, this option filters the result to include only entities that can be exported to the Gridgen format.

Returns

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

getCount

pw::Grid getCount ?-type type_string? ?-gridgenCompatible?

This action gets the number of grid entities.

Parameters

-type type_string If specified, this option filters the result to include only entities of the specified type.  Only types derived from pw::GridEntity are valid.  -gridgenCompatible If specified, this option filters the result to include only entities that can be exported to the Gridgen format.

Returns

This action returns an integer value.

getByName

pw::Grid getByName name

This action gets a grid entity using the name.

Parameters

nameThis parameter is a name string.

Returns

This action returns a pw::GridEntity object.

getExtents

pw::Grid getExtents ?-enabledOnly? ?-visibleOnly?

This action gets the extents of the grid entities.

Parameters

-enabledOnlyThis flag, if present, restricts the calculations to only enabled entities, regardless of their visibility.  Enabled entities in off layers are included, for example.
-visibleOnlyThis flag, if present, restricts the calculations to only visible entities.

Returns

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

getElementCount

pw::Grid getElementCount type ?entity_list?

This action gets the number of elements of the given type in the entire grid.

Parameters

typeThis parameter is an element type: < Triangle | Quad | Tet | Pyramid | Prism | Hex >.
entity_listoptional list of entites to retrieve counts from

Returns

This action returns an integer value.

getPointCount

pw::Grid getPointCount ?<Connector | Domain | Block>?

This action gets the number of points in the entire grid.

Parameters

typeOptional parameter to the get point count for a specific entity type.  Possible values are: <Connector | Domain | Block>

Returns

This action returns an integer value.

isMirrored

pw::Grid isMirrored

Determines if a grid mirror plane is defined.

Parameters

none

Returns

This action returns a boolean, true if a mirror plane is defined.

See Also

MirrorPlane, clearMirrorPlane, getMirrorPlaneEntities

clearMirrorPlane

pw::Grid clearMirrorPlane

Undefines the grid mirror plane.

Parameters

none

Returns

This action returns nothing.

See Also

MirrorPlane, isMirrored, getMirrorPlaneEntities

getMirrorPlaneEntities

pw::Grid getMirrorPlaneEntities ?-partial partial_var? ?-other other_var? ?-plane plane? mirrored_var unmirrored_var ?entity_list?

Processes entity_list for the given plane.

Parameters

-partial partial_varThis parameter is a string name of the variable to receive a list of pw::GridEntity objects.  The owned points of these entities lie partially in and partially out of the mirror plane.  For a valid export, this list should be empty.
-other other_varThis parameter is a string name of the variable to receive a list of pw::GridEntity objects.  The owned points of these entities lie completely out of the mirror plane.  This list will contain the top-level entities from entity_list and their appropriate lower-level entities.
-plane planeThis parameter is a mirror plane.  If not specified, the current grid mirror plane is used.
mirrored_varThis parameter is a string name of the variable to receive a list of pw::GridEntity objects.  These entities lie in the mirror plane and are mirrored.
unmirrored_varThis parameter is a string name of the variable to receive a list of pw::GridEntity objects.  These entities lie in the mirror plane and are not mirrored.
entity_listThis optional parameter is a list of pw::GridEntity objects, or a single pw::GridEntity Object.  These entities must be of type pw::Block in 3D or pw::Domain in 2D.  If missing, all visible, type appropriate entities will be used.

Returns

This action returns a list of lower-level entities.  The owned points of these entities all lie on the plane.

Information

In 3D, the returned list contains only domains, connectors and nodes.

In 2D, the returned list contains only connectors and nodes.

The returned list will be empty if no entities lie on the plane or if the mirror plane is undefined.

See Also

MirrorPlane, isMirrored, clearMirrorPlane

Static Attributes

GridPointTolerance

pw::Grid get/setGridPointTolerance tolerance

This attribute is the grid point tolerance of grid entities and operations.

Type

float (0, infinity)

Default

0.0000001

NodeTolerance

pw::Grid get/setNodeTolerance tolerance

This attribute is the node tolerance of grid entities and operations.

Type

float (0, infinity)

Default

0.0001

ConnectorTolerance

pw::Grid get/setConnectorTolerance tolerance

This attribute is the connector tolerance of grid entities and operations.

Type

float (0, infinity)

Default

0.0001

ImportSplitAngle

pw::Grid get/setImportSplitAngle angle

This attribute is the bending angle at which unstructured domains are split on import.

Type

float [0, 180)

Default

0

ImportSplitMultipleEdges

pw::Grid get/setImportSplitMultipleEdges split

This attribute is the flag for whether unstructured domains with more than one edge are split on import so that they will only made up of a single edge.

Type

boolean

Default

false

MirrorPlane

pw::Grid get/setMirrorPlane plane

This attribute is the mirroring plane applied to the grid at export.

Type

plane

Default

none

Information

Setting to an invalid plane value generates a glyph error.

Getting the plane generates a glyph error if the plane is not defined.

Use Use pw::Grid isMirrored to determine if calling getMirrorPlane is allowed.

Example

Code

# plnDef is in the plane in coefficent form {A B C D}
set plnDef [pwu::Plane set {1 0 0} {0 0 0}]

# A glyph error is generated if plnDef is invalid
pw::Grid setMirrorPlane $plnDef

See Also

isMirrored, clearMirrorPlane, getMirrorPlaneEntities

pw::Grid getExportFileTypes ?-facesOnly? entity_list
This action gets a list of file types that can export all of the given entities.
pw::Grid checkForInvalidEntities -type file_type ?-facesOnly? ?-invalid invalid_var? entity_list
This action checks if a list of entities are valid for the given settings.
pw::Grid export ?-type file_type? ?-format file_format? ?-precision fp_precision? ?-surfaces surface_style? ?-facesOnly? ?-noOverwrite? ?-report report_var? entity_list filename
This action exports the list of entities to the given file.
pw::Grid checkForMissingReferences ?-type file_type? ?-format file_format? ?-precision fp_precision? ?-missing missingVar? filename
This action checks if importing the given file would result in missing references.
pw::Grid import ?-type file_type? ?-format file_format? ?-precision fp_precision? ?-report report_var? filename
This action imports a file into the grid.
pw::Grid save ?-compress level? ?-noOverwrite? filename
This action saves the entire grid in the native file format.
pw::Grid mergeConnectors ?-exclude topology? ?-visibleOnly? -tolerance tol
This action merges connectors within a tolerance.
pw::Grid mergeConnectorPair con1 con2
This action automatically merges two connectors.
pw::Grid getXYZ coord
This action gets the 3D position of the given grid coordinate.
pw::Grid getPoint coord
This action gets the position of the given grid coordinates.
pw::Grid getEntity coord
This action gets the grid entity at the given grid coordinates
pw::Grid mapHigher coord
This action maps the given grid coordinate to all coords that are immediately higher than the specified coord.
pw::Grid mapLower ?-includeNodes? coord
This action maps the given grid coordinate to all coords that are immediately lower than the specified coord.
pw::Grid offsetIJK coord < i | ij | ijk >
This action offsets the ijk coordinates of the given grid coordinate.
pw::Grid offsetNormal coord distance
This action calculates the offset from the given grid coordinate in the direction of the normal at the coordinate.
pw::Grid getAll ?-type type_string? ?-gridgenCompatible?
This action gets a list of all grid entities.
pw::Grid getCount ?-type type_string? ?-gridgenCompatible?
This action gets the number of grid entities.
pw::Grid getByName name
This action gets a grid entity using the name.
pw::Grid getExtents ?-enabledOnly? ?-visibleOnly?
This action gets the extents of the grid entities.
pw::Grid getElementCount type ?entity_list?
This action gets the number of elements of the given type in the entire grid.
pw::Grid getPointCount ?<Connector | Domain | Block>?
This action gets the number of points in the entire grid.
pw::Grid isMirrored
Determines if a grid mirror plane is defined.
pw::Grid clearMirrorPlane
Undefines the grid mirror plane.
pw::Grid getMirrorPlaneEntities ?-partial partial_var? ?-other other_var? ?-plane plane? mirrored_var unmirrored_var ?entity_list?
Processes entity_list for the given plane.
pw::Grid get/setGridPointTolerance tolerance
This attribute is the grid point tolerance of grid entities and operations.
pw::Grid get/setNodeTolerance tolerance
This attribute is the node tolerance of grid entities and operations.
pw::Grid get/setConnectorTolerance tolerance
This attribute is the connector tolerance of grid entities and operations.
pw::Grid get/setImportSplitAngle angle
This attribute is the bending angle at which unstructured domains are split on import.
pw::Grid get/setImportSplitMultipleEdges split
This attribute is the flag for whether unstructured domains with more than one edge are split on import so that they will only made up of a single edge.
pw::Grid get/setMirrorPlane plane
This attribute is the mirroring plane applied to the grid at export.
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.
Connector type
A coord is a position in grid space.
A vector is a list of float values.
A point is a position either in model space or database parameter space.
A type is the class name of a Glyph2 object.
An integer is a whole number.
A plane is a list of four float values representing the geometric plane coefficients A, B, C and D.
Block type
Domain type
A float is a fractional number.