pw:: GridShape

Grid shape type

Derives From

pw::Object

Summary
Grid shape type
This action creates a new grid shape object.
This attribute is the geometric transform of the shape.
This attribute is the location of the transform pivot on the shape.
This attribute is the sectional minimum angle in degrees of the shape, for shapes that support a sectional representation.
This attribute is the sectional maximum angle in degrees of the shape, for shapes that support a sectional representation.
This attribute is the type of cap used at the base of the shape.
This attribute is the type of cap used at the top of the shape.
This attribute is the type of cap used at the sides of the shape when it is a partial shape (e.g.
This attribute is the type of grid that is generated from the shape.
This attribute is the boundary mode that determines the dimension and distribution of connectors and domains that are generated from the shape.
This attribute is a flag that controls whether the influence of sources should be ignored when a size field is generated for this entity.
This attribute is a flag that controls whether the influence of explicitly included entities should be ignored when a size field is generated for this entity.
This attribute is the size field decay factor used as the decay when a size field is generated for this entity.
This attribute is the size background spacing when a size field is generated for this entity.
This attribute is a string that controls how spacing is calculated for size field point primitives.
This attribute controls whether the boundary of the entity should be ignored when the size field is generated for this entity.
This attribute controls whether the block generated from this shape should use the enclosing entities in the block’s face definition.
This attribute is the tolerance to use when determining which connectors of the enclosed domains should be included in the symmetry plane domains constructed by this grid shape.
This action checks if this shape is defined.
This action checks if this shape is solid
This action returns whether the given face is valid for the current configuration of the shape.
This action gets the position in the defining space of the shape at the given parameter.
This action gets the position of the surface in model space at the given parameter.
This action gets the center of the shape in model space.
This action gets the base of the shape in model space.
This action gets the top of the shape in model space.
This action gets the position of the surface in object space at the given parameter.
This action gets the normal of the surface in model space at the given parameter.
This action sets the section minimum and maximum angles of the shape to either 1, 2, 3 or 4 quadrants.
This action modifies the transform so that the minimum scale factor is set to one, and at the same time update the dimensions so the shape of the object remains unchanged.
This action clears the shape.
This action sets the shape to a sphere.
This action sets the shape to a cylinder, cone or disk.
This action sets the shape to a box, frustum or rectangle.
This action sets the shape to a polygon.
This action gets the current primitive type string of this shape with values being < None | Sphere | Cylinder | Box | Polygon >
This action gets the length parameter used to set the shape.
This action gets the base angle parameter used to set the shape.
This action gets the top angle parameter used to set the shape.
This action gets the radius parameter used to set the shape.
This action gets the top radius parameter used to set the shape.
This action gets the width parameter used to set the shape.
This action gets the top width parameter used to set the shape.
This action gets the height parameter used to set the shape.
This action gets the top height parameter used to set the shape.
This action gets the points parameter used to set the shape.
This action gets the slope type string used for creating the shape.
This action gets the minimum, average and maximum spacing of the size field associated with this shape.
This action gets the enclosing entities associated with this shape.
This action sets the enclosing entities associated with this grid shape.
This action gets the minimum, average and maximum spacing of the enclosing entities associated with this shape.
This action gets all source entities that are being explicitly excluded from affecting the grid generated by this shape
This action explicitly excludes a source from affecting the grid generated by this shape
This action gets all entities that are being explicitly included in the size field that affects the grid generated by this shape
This action explicitly includes an entity in the size field source that affects the grid generated by this shape
This action clears all explicitly included entities in the size field source from affecting the grid generated by this shape
This action gets the minimum, average and maximum spacing of the explicitly included size field entities of this shape.
This action deletes the grid shape.
This action creates or updates the grid entities associated with this grid shape.
This action deletes the grid entities associated with this grid shape.
This action gets the grid entities currently associated with this grid shape.
This action gets the minimum, average and maximum spacing of the boundary grid entities associated with this shape.
This action returns a list of pw::GridEntity objects that will be included in the block when the <IndcludeEntitiesInBlock> attribute is set to true.
This action gets the registers of the grid entities currently associated with this grid shape.
This action gets the calculated boundary spacing that is used when the <BackgroundSpacing> attribute is set to 0.0.
This action gets the calculated voxel minimum size for a newly created voxel block from this grid shape.
This action gets the calculated voxel maximum size for a newly created voxel block from this grid shape.

Static Actions

create

pw::GridShape create

This action creates a new grid shape object.

Parameters

none

Returns

This action returns a new pw::GridShape object.

Instance Attributes

Transform

$shape get/setTransform value

This attribute is the geometric transform of the shape.

Type

A 4x4 transform matrix.

Default

The identity transform matrix.

See Also

pwu::Transform

Pivot

$shape get/setPivot pivot

This attribute is the location of the transform pivot on the shape.

Type

This attribute is a string with options < Base | Center | Top >.

Default

Base

Information

Base refers to the center of the shape’s base, Center refers to the center of the shape, and Top refers to the center of the shape’s top.  The pivot location will have object coordinates of 0, 0, 0.

SectionMinimum

$shape get/setSectionMinimum angle

This attribute is the sectional minimum angle in degrees of the shape, for shapes that support a sectional representation.

Type

This attribute is a float.  Although there is no minimum or maximum value, the angle will be interpreted by mapping it to the range [0.0, 360.0).

Default

The default for this attribute is 0.

SectionMaximum

$shape get/setSectionMaximum angle

This attribute is the sectional maximum angle in degrees of the shape, for shapes that support a sectional representation.

Type

This attribute is a float.  Although there is no minimum or maximum value, the angle will be interpreted by mapping it to the range (0.0, 360.0].

Default

The default for this attribute is 360.

BaseType

$shape get/setBaseType type

This attribute is the type of cap used at the base of the shape.  Only some shapes (sphere and cylinder) support a cap type of sphere.  For other shapes, if the cap type is set to Sphere, it will behave the same as if it were set to Plane.

Type

This attribute is a string with options < Open | Plane | Sphere >.

Default

The default for this attribute is Plane.

TopType

$shape get/setTopType type

This attribute is the type of cap used at the top of the shape.  Only some shapes (sphere and cylinder) support a cap type of sphere.  For other shapes, if the cap type is set to Sphere, it will behave the same as if it were set to Plane.

Type

This attribute is a string with options < Open | Plane | Sphere >.

Default

The default for this attribute is Plane.

SidesType

$shape get/setSidesType type

This attribute is the type of cap used at the sides of the shape when it is a partial shape (e.g. a hemi sphere).  Shapes that do not support partial specification (polygon) will ignore this attribute.

Type

This attribute is a string with options < Open | Plane >.

Default

The default for this attribute is Plane.

GridType

$shape get/setGridType type

This attribute is the type of grid that is generated from the shape.  When calling updateGridEntities, this attribute will control what type of grid entities will be constructed.

Type

This attribute is a string with options < Unstructured | Voxel | Structured >.

Default

The default for this attribute is Unstructured.

GridBoundary

$shape get/setGridBoundary mode

This attribute is the boundary mode that determines the dimension and distribution of connectors and domains that are generated from the shape.  When calling updateGridEntities, this attribute will control how the boundary connectors and domains will be constructed.

Type

This attribute is a string with options < FromDefaults | FromBackgroundSpacing | EnclosingEntitiesMinimumSpacing | EnclosingEntitiesAverageSpacing | EnclosingEntitiesMaximumSpacing | IncludedSizeFieldEntitiesMinimumSpacing | IncludedSizeFieldEntitiesAverageSpacing | IncludedSizeFieldEntitiesMaximumSpacing | SizeFieldMinimumSpacing | SizeFieldAverageSpacing | SizeFieldMaximumSpacing | FromSizeField >.

Default

The default for this attribute is FromDefaults.

Information

The dimension and distribution of connectors generated will be as follows:

  • FromDefaults - Use the connector defaults.
  • FromBackgroundSpacing - Use the SizeFieldBackgroundSpacing attribute for a constant spacing along the connectors.
  • EnclosingEntitiesMinimumSpacing - Use the minimum spacing of the enclosing entities for a constant spacing along the connectors.
  • EnclosingEntitiesAverageSpacing - Use the average spacing of the enclosing entities for a constant spacing along the connectors.
  • EnclosingEntitiesMaximumSpacing - Use the maximum spacing of the enclosing entities for a constant spacing along the connectors.
  • IncludedSizeFieldEntitiesMinimumSpacing - Use the minimum spacing of the explicitly included size field entities for a constant spacing along the connectors.
  • IncludedSizeFieldEntitiesAverageSpacing - Use the average spacing of the explicitly included size field entities for a constant spacing along the connectors.
  • IncludedSizeFieldEntitiesMaximumSpacing - Use the maximum spacing of the explicitly included size field entities for a constant spacing along the connectors.
  • SizeFieldMinimumSpacing - Use the minimum spacing of the size field for a constant spacing along the connectors.
  • SizeFieldAverageSpacing - Use the average spacing of the size field for a constant spacing along the connectors.
  • SizeFieldMaximumSpacing - Use the maximum spacing of the size field for a constant spacing along the connectors.
  • FromSizeField - Use the size field for a variable spacing along the connectors as specified locally by the size field.

The domains will be initialized as specified by the domain defaults.  However, if this mode is FromSizeField, the domain’s interior points will also be adapted as specified locally by the size field.

IgnoreAllSources

$shape get/setIgnoreAllSources ignore

This attribute is a flag that controls whether the influence of sources should be ignored when a size field is generated for this entity.

Type

boolean

Default

false

IgnoreAllSizeFieldEntities

$shape get/setIgnoreAllSizeFieldEntities ignore

This attribute is a flag that controls whether the influence of explicitly included entities should be ignored when a size field is generated for this entity.

Type

boolean

Default

false

SizeFieldDecay

$shape get/setSizeFieldDecay decay

This attribute is the size field decay factor used as the decay when a size field is generated for this entity.  The size field will use this decay for entities added to the size field that don’t have a explicitly assigned decay.

Type

This attribute is a float with the range [0, 1].

Default

The default for this attribute is the value in the SizeFieldDecay default when the grid entity was created.

SizeFieldBackgroundSpacing

$shape get/setSizeFieldBackgroundSpacing spacing

This attribute is the size background spacing when a size field is generated for this entity.

Type

This attribute is a float with the range [0, infinity).

Default

The default for this attribute is the value in the SizeFieldBackgroundSpacing default when the grid entity was created.

SizeFieldCalculationMethod

$shape get/setSizeFieldCalculationMethod method

This attribute is a string that controls how spacing is calculated for size field point primitives.

Type

This attribute is a string with options < MinimumDistance | InverseDistance | BlendDistance | MinimumValue >

Default

The default for this attribute is MinimumDistance

SizeFieldIgnoreEntityBoundary

$shape get/setSizeFieldIgnoreEntityBoundary ignore

This attribute controls whether the boundary of the entity should be ignored when the size field is generated for this entity.

Type

This attribute is a boolean

Default

The default for this attribute is false.

IncludeEnclosingEntitiesInBlock

$shape get/setIncludeEnclosingEntitiesInBlock include

This attribute controls whether the block generated from this shape should use the enclosing entities in the block’s face definition.

Type

This attribute is a boolean.

Default

The default for this attribute is False.

Note

This attribute is only applicable when the GridType attribute is set to Unstructured, and only the domains in the enclosing entities that are in the same framework as this grid shape’s framework will be included in the block’s faces.

SymmetryPlaneTolerance

$shape get/setSymmetryPlaneTolerance tol

This attribute is the tolerance to use when determining which connectors of the enclosed domains should be included in the symmetry plane domains constructed by this grid shape.

Type

This attribute is a float with the range [0, infinity).

Default

The default for this attribute is 0.0, which denotes that the tolerance to use is the current value of pw::Grid.ConnectorTolerance attribute.

Instance Actions

isDefined

$shape isDefined

This action checks if this shape is defined.

Parameters

This action has no parameters.

Returns

This action returns a boolean, true if the shape is defined.

isSolid

$shape isSolid

This action checks if this shape is solid

Parameters

This action has no parameters.

Returns

This action returns a boolean, true if the shape is solid

isFaceValid

$shape isFaceValid face

This action returns whether the given face is valid for the current configuration of the shape.

Parameters

faceThis parameter is the part of the shape to check the validity of, with options < Main | Base | Top | MinimumSide | MaximumSide > or an integer in the range [1, 5], which corresponds to the options Main=1, Base=2, etc.

Returns

This action returns a boolean with true if the face is valid and false if it is not

getPosition

$shape getPosition ?< -parameter | -closest >? value

This action gets the position in the defining space of the shape at the given parameter.

Parameters

-parameterThis optional flag indicates to get the position at a parameter.  The value is a uv vector in the range [0.0, 1.0] followed by an optional face string with options < Main | Base | Top | MinimumSide | MaximumSide > or an integer in the range [1, 5], with 1=Main, 2=Base, etc.
-closestThis optional flag results in calculating the position of the point on the shape closest to the specified valuevalue is a point, or grid coord.
valueThis parameter is the value at which to get the position.  Its interpretation is determined by the above flags.  The default mode is the -parameter flag.

Returns

This action returns a point giving the position on the shape (may be in the form “u v dbentity”).

getXYZ

$shape getXYZ ?< -parameter | -closest >? value

This action gets the position of the surface in model space at the given parameter.

Parameters

-parameterThis optional flag indicates to get the XYZ value at a parameter.  The value is a uv vector in the range [0.0, 1.0] followed by an optional face string with options < Main | Base | Top | MinimumSide | MaximumSide > or an integer in the range [1, 5], with 1=Main, 2=Base, etc.
-closestThis optional flag results in calculating the XYZ value of the point on the shape closest to the specified valuevalue is a point, or grid coord.
valueThis parameter is the value at which to get the XYZ value.  Its interpretation is determined by the above flags.  The default mode is the -parameter flag.

Returns

This action returns an XYZ vector.

getCenterXYZ

$shape getCenterXYZ

This action gets the center of the shape in model space.

Parameters

This action takes no parameters.

Returns

This action returns an XYZ vector.

getBaseXYZ

$shape getBaseXYZ

This action gets the base of the shape in model space.

Parameters

This action takes no parameters.

Returns

This action returns an XYZ vector.

getTopXYZ

$shape getTopXYZ

This action gets the top of the shape in model space.

Parameters

This action takes no parameters.

Returns

This action returns an XYZ vector.

getObjectXYZ

$shape getObjectXYZ ?< -parameter | -closest >? value

This action gets the position of the surface in object space at the given parameter.

Parameters

-parameterThis optional flag indicates to get the object space XYZ value at a parameter.  The value is a uv vector in the range [0.0, 1.0] followed by an optional face string with options < Main | Base | Top | MinimumSide | MaximumSide > or an integer in the range [1, 5], with 1=Main, 2=Base, etc.
-closestThis optional flag results in calculating the XYZ value of the point on the shape closest to the specified valuevalue is a point, or grid coord.
valueThis parameter is the value at which to get the XYZ value.  Its interpretation is determined by the above flags.  The default mode is the -parameter flag.

Returns

This action returns an XYZ vector.

getNormal

$shape getNormal ?< -parameter | -closest >? value

This action gets the normal of the surface in model space at the given parameter.

Parameters

-parameterThis optional flag indicates to get the normal at a parameter.  The value is a uv vector in the range [0.0, 1.0] followed by an optional face string with options < Main | Base | Top | MinimumSide | MaximumSide > or an integer in the range [1, 5], with 1=Main, 2=Base, etc.
-closestThis optional flag results in calculating the normal of the point on the shape closest to the specified valuevalue is a point, or grid coord.
valueThis parameter is the value at which to get the normal.  Its interpretation is determined by the above flags.  The default mode is the -parameter flag.

Returns

This action returns an XYZ vector.

setSectionQuadrants

$shape setSectionQuadrants quadrants

This action sets the section minimum and maximum angles of the shape to either 1, 2, 3 or 4 quadrants.  This is just a shortcut for setting the minimum and maximum attributes to (0, 90) for 1 quadrant, (0, 180) for 2 quadrants, (0, 270) for 3 quadrants and (0, 360) for 4 quadrants.

Parameters

quadrantsThis parameter specifies the integer number of quadrants with valid values being 1, 2, 3, or 4.

Returns

This action returns nothing.

See Also

SectionMinimum, SectionMaximum

normalizeTransform

$shape normalizeTransform

This action modifies the transform so that the minimum scale factor is set to one, and at the same time update the dimensions so the shape of the object remains unchanged.

Parameters

This action takes no parameters.

Returns

This action returns nothing.

clear

$shape clear

This action clears the shape.

Parameters

This action takes no parameters.

Returns

This action returns nothing.

sphere

$shape sphere ?-radius value? ?-baseAngle value? ?-topAngle value?

This action sets the shape to a sphere.

Parameters

-radius valueThis optional parameter is the float radius of the sphere with the range (0, infinity).  The default is 1.
-baseAngle valueThis optional parameter specifies the float angle in degrees between the radial in the negative z axis direction and a radial line through the perimeter of the base.  The angle should be in the range [0, 180).  The default is 0.
-topAngle valueThis optional parameter specifies the float angle in degrees between the radial in the negative z axis direction and a radial line through the perimeter of the top.  The angle should be in the range (0, 180].  The default is 180.

Returns

This action returns nothing.

cylinder

$shape cylinder ?-radius value? ?-topRadius value? ?-length value?

This action sets the shape to a cylinder, cone or disk.  A disk is specified by setting the length to 0.

Parameters

-radius valueThis optional parameter is the float radius of the cylinder with the range [0, infinity).  The default is 1, unless the -topRadius parameter is used, in which case the default is 0.
-topRadius valueThis optional parameter is the float radius of the top of the cylinder with the range [0, infinity).  When used, the -radius parameter will specify the radius of the base only.
-length valueThis optional parameter is the float length of the cone with the range [0, infinity).  The default is 1.

Returns

This action returns nothing.

box

$shape box ?-width value? ?-topWidth value? ?-height value? ?-topHeight value? ?-length value?

This action sets the shape to a box, frustum or rectangle.  A rectangle is specified by setting the length to 0.

Parameters

-width valueThis optional parameter is the float width of the box with the range [0, infinity).  The default is 1, unless the -topWidth parameter is used, in which case the default is 0.
-topWidth valueThis optional parameter is the float width of the top of the box with the range [0, infinity).  When used, the -width parameter will specify the width of the base only.
-height valueThis optional parameter is the float height of the box with the range [0, infinity).  The default is 1, unless the -topHeight parameter is used, in which case the default is 0.
-topHeight valueThis optional parameter is the float height of the top of the box with the range [0, infinity).  When used, the -height parameter will specify the height of the base only.
-length valueThis optional parameter is the float length of the box with the range [0, infinity).  The default is 1.

Returns

This action returns nothing.

polygon

$shape polygon -points vectors ?-slope type? ?-length value?

This action sets the shape to a polygon.

Parameters

-points vectorsThis parameter is a list of vectors of XYZ control points for the profile curve of the polygon.  The length of the list must be greater than one.
-slope typeThis optional parameter is the string type method for calculating the slope vector for the control points of the profile curve of the polygon.  Valid values are < Linear | Akima | CatmullRom | Bezier >, with the default being Linear.
-length valueThis optional parameter is the float length of the polygon with the range [0, infinity).  The default is 1.

Returns

This action returns nothing.

Information

If the slope type is Bezier, the control points list should include the incoming and outgoing slope points and if the incorrect number of control and slope points are given, an error will be returned.

getPrimitive

$shape getPrimitive

This action gets the current primitive type string of this shape with values being < None | Sphere | Cylinder | Box | Polygon >

Parameters

This action takes no parameters.

Returns

This action returns a string.

getLength

$shape getLength

This action gets the length parameter used to set the shape.  If the current shape primitive does not use a length parameter, an error will be returned.

Parameters

This action takes no parameters.

Returns

This action returns the float length.

getBaseAngle

$shape getBaseAngle

This action gets the base angle parameter used to set the shape.  If the current shape primitive does not use a base angle parameter, an error will be returned.

Parameters

This action takes no parameters.

Returns

This action returns the float base angle.

getTopAngle

$shape getTopAngle

This action gets the top angle parameter used to set the shape.  If the current shape primitive does not use a top angle parameter, an error will be returned.

Parameters

This action takes no parameters.

Returns

This action returns the float top angle.

getRadius

$shape getRadius

This action gets the radius parameter used to set the shape.  If the current shape primitive does not use a radius parameter, an error will be returned.

Parameters

This action takes no parameters.

Returns

This action returns the float radius.

getTopRadius

$shape getTopRadius

This action gets the top radius parameter used to set the shape.  If the current shape primitive does not use a radius parameter, an error will be returned.

Parameters

This action takes no parameters.

Returns

This action returns the float top radius.

getWidth

$shape getWidth

This action gets the width parameter used to set the shape.  If the current shape primitive does not use a width parameter, an error will be returned.

Parameters

This action takes no parameters.

Returns

This action returns the float width.

getTopWidth

$shape getTopWidth

This action gets the top width parameter used to set the shape.  If the current shape primitive does not use a width parameter, an error will be returned.

Parameters

This action takes no parameters.

Returns

This action returns the float top width.

getHeight

$shape getHeight

This action gets the height parameter used to set the shape.  If the current shape primitive does not use a height parameter, an error will be returned.

Parameters

This action takes no parameters.

Returns

This action returns the float height.

getTopHeight

$shape getTopHeight

This action gets the top height parameter used to set the shape.  If the current shape primitive does not use a top height parameter, an error will be returned.

Parameters

This action takes no parameters.

Returns

This action returns the float top height.

getPoints

$shape getPoints

This action gets the points parameter used to set the shape.  If the current shape primitive does not use a points parameter, an error will be returned.

Parameters

This action takes no parameters.

Returns

This action returns a list of vector XYZ control points.

getSlope

$shape getSlope

This action gets the slope type string used for creating the shape.  If the current shape primitive does not use a slope parameter, an error will be returned.

Parameters

This action takes no parameters.

Returns

This action returns a string.  One of < Linear | Akima | CatmullRom | Bezier >.

getSizeFieldSpacing

$shape getSizeFieldSpacing

This action gets the minimum, average and maximum spacing of the size field associated with this shape.

Parameters

This action takes no parameters.

Returns

This action returns a list of three floats representing the minimum, average and maximum spacing of the size field.

getEnclosingEntities

$shape getEnclosingEntities

This action gets the enclosing entities associated with this shape.

Parameters

This action takes no parameters.

Returns

This action returns a list of pw::Entity objects that this shape enclosed during creation.

setEnclosingEntities

$shape setEnclosingEntities enclosingEnts

This action sets the enclosing entities associated with this grid shape.

Parameters

enclosingEntsThis parameter is a list of pw::Entity objects that this grid shape encloses.

Returns

This action returns nothing.

getEnclosingEntitiesSpacing

$shape getEnclosingEntitiesSpacing

This action gets the minimum, average and maximum spacing of the enclosing entities associated with this shape.

Parameters

This action takes no parameters.

Returns

This action returns a list of three floats representing the minimum, average and maximum spacing of the enclosing entities.

getExcludedSources

$shape getExcludedSources

This action gets all source entities that are being explicitly excluded from affecting the grid generated by this shape

Parameters

none

Returns

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

excludeSource

$shape excludeSource source ?exclude?

This action explicitly excludes a source from affecting the grid generated by this shape

Parameters

sourceThis parameter is an pw::SourceEntity object to exclude
excludeThis optional boolean parameter determines whether the entity should be added or removed from the excluded entities.  The default value is true.

Returns

nothing

getIncludedSizeFieldEntities

$shape getIncludedSizeFieldEntities ?-global?

This action gets all entities that are being explicitly included in the size field that affects the grid generated by this shape

Parameters

-globalthis flag indicates that the returned list include all entities.  If this flag is not set, only entities from the active framework are returned.

Returns

This action returns a list of pw::Entity objects or a list of pw::Framework and pw::Entity objects.

includeSizeFieldEntity

$shape includeSizeFieldEntity entity ?include?

This action explicitly includes an entity in the size field source that affects the grid generated by this shape

Parameters

entityThis parameter is an pw::Entity object to include in the size field, or a list including the framework path and the pw::Entity
includeThis optional boolean parameter determines whether the entity should be added or removed from the included entities.  The default value is true.

Returns

nothing

clearSizeFieldEntities

$shape clearSizeFieldEntities

This action clears all explicitly included entities in the size field source from affecting the grid generated by this shape

Parameters

none

Returns

nothing

getIncludedSizeFieldEntitiesSpacing

$shape getIncludedSizeFieldEntitiesSpacing

This action gets the minimum, average and maximum spacing of the explicitly included size field entities of this shape.

Parameters

This action takes no parameters.

Returns

This action returns a list of three floats representing the minimum, average and maximum spacing of the explicitly included size field entities.

delete

$shape delete

This action deletes the grid shape.  This is necessary if the grid shape has not had updateGridEntities called on it, or if after calling updateGridEntities, the clearGridEntities action is called.  Calling delete on a shape after it has had grid entities updated will\ generate an error.

Parameters

none

Returns

This action does not return anything.

updateGridEntities

$shape updateGridEntities ?updateBlockAttributes? ?-boundaryAdaptation?

This action creates or updates the grid entities associated with this grid shape.  If this action returns grid entities, then the shape can no longer be deleted by calling the GridShape.delete action, unless clearGridEntities is called first.

Parameters

-updateBlockAttributesThis optional parameter specifies that the blocks being updated will also have the block’s attributes updated to match the current value of the grid shape’s attributes.  This will always be the case with newly created blocks.
-boundaryAdaptationThis optional parameter specifies that the blocks being created or update should have boundary adaptation performed on their domains as well.  The default behavior is to simply initialize the domains.

Returns

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

clearGridEntities

$shape clearGridEntities

This action deletes the grid entities associated with this grid shape.  After this point, the shape must be deleted by calling the GridShape.delete action, unless updateGridEntities is called.

Parameters

This action takes no parameters.

Returns

This action does not return anything.

getGridEntities

$shape getGridEntities ?-type type_string?

This action gets the grid entities currently associated with this grid shape.

Parameters

-type type_stringThis optional parameter filters the result to include only entities of the specified type.  Only types derived from pw::GridEntity are valid.

Returns

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

getBoundaryGridEntitiesSpacing

$shape getBoundaryGridEntitiesSpacing ?-estimate?

This action gets the minimum, average and maximum spacing of the boundary grid entities associated with this shape.

Parameters

-estimateThis optional parameter specifies that the spacing should be estimated based on the current parameters rather than the actual values of the current boundary grid entities.

Returns

This action returns a list of three floats representing the minimum, average and maximum spacing of the boundary grid entities.

getIncludedEntitiesInBlock

$shape getIncludedEntitiesInBlock ?type?

This action returns a list of pw::GridEntity objects that will be included in the block when the <IndcludeEntitiesInBlock> attribute is set to true.

Parameters

typeThis optional string parameter with options < All | Domains | Connectors | SymmetryConnectors | LaminaConnectors > specifies which entities to return.  The default is All.

Returns

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

getBlockRegisters

$shape getBlockRegisters ?type?

This action gets the registers of the grid entities currently associated with this grid shape.

Parameters

typeThis optional string parameter with options < All | Symmetry | Enclosed | Other > specify which registers to return.  Symmetry refers to the registers at the Minimum and Maximum sides of the shape.  Enclosed refers to the registers associated with any of the enclosing entities.  Other refers to the registers that are not associated with Symmetry and Enclosed registers.  The default is All.

Returns

This action returns a list of the registers of the grid entities generated by this shape with a block being the main entity.

getAutomaticBackgroundSpacing

$shape getAutomaticBackgroundSpacing

This action gets the calculated boundary spacing that is used when the <BackgroundSpacing> attribute is set to 0.0.  The value is determined using the current extents of the shape, the extents of the shape’s enclosing entities, the <BoundaryDecay> attribute, and the GridBoundary attribute.

Parameters

This action has no parameters.

Returns

This action returns the calculated boundary spacing as a float.

getVoxelMinimumSize

$shape getVoxelMinimumSize

This action gets the calculated voxel minimum size for a newly created voxel block from this grid shape.

Parameters

This action has no parameters.

Returns

This action returns the voxel minimum size as a float.

getVoxelMaximumSize

$shape getVoxelMaximumSize

This action gets the calculated voxel maximum size for a newly created voxel block from this grid shape.

Parameters

This action has no parameters.

Returns

This action returns the voxel maximum size as a float.

pw::GridShape create
This action creates a new grid shape object.
$shape get/setTransform value
This attribute is the geometric transform of the shape.
$shape get/setPivot pivot
This attribute is the location of the transform pivot on the shape.
$shape get/setSectionMinimum angle
This attribute is the sectional minimum angle in degrees of the shape, for shapes that support a sectional representation.
$shape get/setSectionMaximum angle
This attribute is the sectional maximum angle in degrees of the shape, for shapes that support a sectional representation.
$shape get/setBaseType type
This attribute is the type of cap used at the base of the shape.
$shape get/setTopType type
This attribute is the type of cap used at the top of the shape.
$shape get/setSidesType type
This attribute is the type of cap used at the sides of the shape when it is a partial shape (e.g.
$shape get/setGridType type
This attribute is the type of grid that is generated from the shape.
$shape get/setGridBoundary mode
This attribute is the boundary mode that determines the dimension and distribution of connectors and domains that are generated from the shape.
$shape get/setIgnoreAllSources ignore
This attribute is a flag that controls whether the influence of sources should be ignored when a size field is generated for this entity.
$shape get/setIgnoreAllSizeFieldEntities ignore
This attribute is a flag that controls whether the influence of explicitly included entities should be ignored when a size field is generated for this entity.
$shape get/setSizeFieldDecay decay
This attribute is the size field decay factor used as the decay when a size field is generated for this entity.
$shape get/setSizeFieldBackgroundSpacing spacing
This attribute is the size background spacing when a size field is generated for this entity.
$shape get/setSizeFieldCalculationMethod method
This attribute is a string that controls how spacing is calculated for size field point primitives.
$shape get/setSizeFieldIgnoreEntityBoundary ignore
This attribute controls whether the boundary of the entity should be ignored when the size field is generated for this entity.
$shape get/setIncludeEnclosingEntitiesInBlock include
This attribute controls whether the block generated from this shape should use the enclosing entities in the block’s face definition.
$shape get/setSymmetryPlaneTolerance tol
This attribute is the tolerance to use when determining which connectors of the enclosed domains should be included in the symmetry plane domains constructed by this grid shape.
$shape isDefined
This action checks if this shape is defined.
$shape isSolid
This action checks if this shape is solid
$shape isFaceValid face
This action returns whether the given face is valid for the current configuration of the shape.
$shape getPosition ?< -parameter | -closest >? value
This action gets the position in the defining space of the shape at the given parameter.
$shape getXYZ ?< -parameter | -closest >? value
This action gets the position of the surface in model space at the given parameter.
$shape getCenterXYZ
This action gets the center of the shape in model space.
$shape getBaseXYZ
This action gets the base of the shape in model space.
$shape getTopXYZ
This action gets the top of the shape in model space.
$shape getObjectXYZ ?< -parameter | -closest >? value
This action gets the position of the surface in object space at the given parameter.
$shape getNormal ?< -parameter | -closest >? value
This action gets the normal of the surface in model space at the given parameter.
$shape setSectionQuadrants quadrants
This action sets the section minimum and maximum angles of the shape to either 1, 2, 3 or 4 quadrants.
$shape normalizeTransform
This action modifies the transform so that the minimum scale factor is set to one, and at the same time update the dimensions so the shape of the object remains unchanged.
$shape clear
This action clears the shape.
$shape sphere ?-radius value? ?-baseAngle value? ?-topAngle value?
This action sets the shape to a sphere.
$shape cylinder ?-radius value? ?-topRadius value? ?-length value?
This action sets the shape to a cylinder, cone or disk.
$shape box ?-width value? ?-topWidth value? ?-height value? ?-topHeight value? ?-length value?
This action sets the shape to a box, frustum or rectangle.
$shape polygon -points vectors ?-slope type? ?-length value?
This action sets the shape to a polygon.
$shape getPrimitive
This action gets the current primitive type string of this shape with values being < None | Sphere | Cylinder | Box | Polygon >
A string is an array of characters.
$shape getLength
This action gets the length parameter used to set the shape.
$shape getBaseAngle
This action gets the base angle parameter used to set the shape.
$shape getTopAngle
This action gets the top angle parameter used to set the shape.
$shape getRadius
This action gets the radius parameter used to set the shape.
$shape getTopRadius
This action gets the top radius parameter used to set the shape.
$shape getWidth
This action gets the width parameter used to set the shape.
$shape getTopWidth
This action gets the top width parameter used to set the shape.
$shape getHeight
This action gets the height parameter used to set the shape.
$shape getTopHeight
This action gets the top height parameter used to set the shape.
$shape getPoints
This action gets the points parameter used to set the shape.
$shape getSlope
This action gets the slope type string used for creating the shape.
$shape getSizeFieldSpacing
This action gets the minimum, average and maximum spacing of the size field associated with this shape.
$shape getEnclosingEntities
This action gets the enclosing entities associated with this shape.
$shape setEnclosingEntities enclosingEnts
This action sets the enclosing entities associated with this grid shape.
$shape getEnclosingEntitiesSpacing
This action gets the minimum, average and maximum spacing of the enclosing entities associated with this shape.
$shape getExcludedSources
This action gets all source entities that are being explicitly excluded from affecting the grid generated by this shape
$shape excludeSource source ?exclude?
This action explicitly excludes a source from affecting the grid generated by this shape
$shape getIncludedSizeFieldEntities ?-global?
This action gets all entities that are being explicitly included in the size field that affects the grid generated by this shape
$shape includeSizeFieldEntity entity ?include?
This action explicitly includes an entity in the size field source that affects the grid generated by this shape
$shape clearSizeFieldEntities
This action clears all explicitly included entities in the size field source from affecting the grid generated by this shape
$shape getIncludedSizeFieldEntitiesSpacing
This action gets the minimum, average and maximum spacing of the explicitly included size field entities of this shape.
$shape delete
This action deletes the grid shape.
$shape updateGridEntities ?updateBlockAttributes? ?-boundaryAdaptation?
This action creates or updates the grid entities associated with this grid shape.
$shape clearGridEntities
This action deletes the grid entities associated with this grid shape.
$shape getGridEntities ?-type type_string?
This action gets the grid entities currently associated with this grid shape.
$shape getBoundaryGridEntitiesSpacing ?-estimate?
This action gets the minimum, average and maximum spacing of the boundary grid entities associated with this shape.
$shape getIncludedEntitiesInBlock ?type?
This action returns a list of pw::GridEntity objects that will be included in the block when the IndcludeEntitiesInBlock attribute is set to true.
$shape getBlockRegisters ?type?
This action gets the registers of the grid entities currently associated with this grid shape.
A register is the usage of a lower level entity in a higher level entity.
$shape getAutomaticBackgroundSpacing
This action gets the calculated boundary spacing that is used when the BackgroundSpacing attribute is set to 0.0.
$shape getVoxelMinimumSize
This action gets the calculated voxel minimum size for a newly created voxel block from this grid shape.
$shape getVoxelMaximumSize
This action gets the calculated voxel maximum size for a newly created voxel block from this grid shape.
Base type for all glyph types
Grid shape type
Utility functions for transform matrices, which are represented as a list of sixteen real values.
A float is a fractional number.
A boolean is represented as a 0 or 1, with 0 being false and 1 being true.
pw::Grid get/setConnectorTolerance tolerance
This attribute is the connector tolerance of grid entities and operations.
A vector is a list of float values.
An integer is a whole number.
A point is a position either in model space or database parameter space.
A coord is a position in grid space.
Entity type
Base type for all source entities
Framework type
A type is the class name of a Glyph2 object.