Database shape type
pw::Object pw::Entity pw::DatabaseEntity
pw:: | Database shape type |
Static Actions | |
create | This action creates a new database shape object. |
Instance Attributes | |
Transform | This attribute is the geometric transform of the database shape. |
Pivot | This attribute is the location of the transform pivot on the shape. |
SectionMinimum | This attribute is the sectional minimum angle in degrees of the database shape, for shapes that support a sectional representation. |
SectionMaximum | This attribute is the sectional maximum angle in degrees of the shape, for shapes that support a sectional representation. |
BaseType | This attribute is the type of cap used at the base of the shape. |
TopType | This attribute is the type of cap used at the top of the shape. |
SidesType | This attribute is the type of cap used at the sides of the shape when it is a partial shape (e.g. |
Instance Actions | |
isDefined | This action checks if this shape is defined. |
isSolid | This action checks if this shape is solid |
isFaceValid | This action returns whether the given face is valid for the current configuration of the shape. |
getPosition | This action gets the position in the defining space of the shape at the given parameter. |
getXYZ | This action gets the position of the shape in model space at the given parameter. |
getCenterXYZ | This action gets the center of the shape in model space. |
getBaseXYZ | This action gets the base of the shape in model space. |
getTopXYZ | This action gets the top of the shape in model space. |
getObjectXYZ | This action gets the position of the shape in object space at the given parameter. |
getNormal | This action gets the normal of the surface in model space at the given parameter. |
setSectionQuadrants | This action sets the section minimum and maximum angles of the shape to either 1, 2, 3 or 4 quadrants. |
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. |
clear | This action clears the shape. |
sphere | This action sets the shape to a sphere. |
cylinder | This action sets the shape to a cylinder, cone or disk. |
box | This action sets the shape to a box, frustum or rectangle. |
polygon | This action sets the shape to a polygon. |
createModels | This action creates models from the current shape. |
getPrimitive | This action gets the current primitive type string of this shape with values being < None | Sphere | Cylinder | Box | Polygon > |
getLength | This action gets the length parameter used to set the shape. |
getBaseAngle | This action gets the base angle parameter used to set the shape. |
getTopAngle | This action gets the top angle parameter used to set the shape. |
getRadius | This action gets the radius parameter used to set the shape. |
getTopRadius | This action gets the top radius parameter used to set the shape. |
getWidth | This action gets the width parameter used to set the shape. |
getTopWidth | This action gets the top width parameter used to set the shape. |
getHeight | This action gets the height parameter used to set the shape. |
getTopHeight | This action gets the top height parameter used to set the shape. |
getPoints | This action gets the points parameter used to set the shape. |
getSlope | This action gets the slope type string used for creating the shape. |
getEnclosingEntities | This action gets the enclosing entities associated with this shape. |
setEnclosingEntities | This action sets the enclosing entities associated with this shape. |
pw::Shape create
This action creates a new database shape object.
none
This action returns a new pw::Shape object.
$shape get/setPivot pivot
This attribute is the location of the transform pivot on the shape.
This attribute is a string with options < Base | Center | Top >.
Base
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.
$shape get/setSectionMinimum angle
This attribute is the sectional minimum angle in degrees of the database shape, for shapes that support a sectional representation.
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).
The default for this attribute is 0.
$shape get/setSectionMaximum angle
This attribute is the sectional maximum angle in degrees of the shape, for shapes that support a sectional representation.
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].
The default for this attribute is 360.
$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.
This attribute is a string with options < Open | Plane | Sphere >.
The default for this attribute is Plane.
$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.
This attribute is a string with options < Open | Plane | Sphere >.
The default for this attribute is Plane.
$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.
This attribute is a string with options < Open | Plane >.
The default for this attribute is Plane.
$shape isDefined
This action checks if this shape is defined.
This action has no parameters.
This action returns a boolean, true if the shape is defined.
$shape isSolid
This action checks if this shape is solid
This action has no parameters.
This action returns a boolean, true if the shape is solid
$shape isFaceValid face
This action returns whether the given face is valid for the current configuration of the shape.
face | This 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. |
This action returns a boolean with true if the face is valid and false if it is not
$shape getPosition ?< -parameter | -closest >? value
This action gets the position in the defining space of the shape at the given parameter.
-parameter | This 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. |
-closest | This optional flag results in calculating the position of the point on the shape closest to the specified value. value is a point, or grid coord. |
value | This 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. |
This action returns a point giving the position on the shape (may be in the form “u v dbentity”).
$shape getXYZ ?< -parameter | -closest >? value
This action gets the position of the shape in model space at the given parameter.
-parameter | This 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. |
-closest | This optional flag results in calculating the XYZ value of the point on the shape closest to the specified value. value is a point, or grid coord. |
value | This 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. |
This action returns an XYZ vector.
$shape getCenterXYZ
This action gets the center of the shape in model space.
This action takes no parameters.
This action returns an XYZ vector.
$shape getBaseXYZ
This action gets the base of the shape in model space.
This action takes no parameters.
This action returns an XYZ vector.
$shape getTopXYZ
This action gets the top of the shape in model space.
This action takes no parameters.
This action returns an XYZ vector.
$shape getObjectXYZ ?< -parameter | -closest >? value
This action gets the position of the shape in object space at the given parameter.
-parameter | This 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. |
-closest | This optional flag results in calculating the XYZ value of the point on the shape closest to the specified value. value is a point, or grid coord. |
value | This 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. |
This action returns an XYZ vector.
$shape getNormal ?< -parameter | -closest >? value
This action gets the normal of the surface in model space at the given parameter.
-parameter | This 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. |
-closest | This optional flag results in calculating the normal of the point on the shape closest to the specified value. value is a point, or grid coord. |
value | This 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. |
This action returns an XYZ vector.
$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.
quadrants | This parameter specifies the integer number of quadrants with valid values being 1, 2, 3, or 4. |
This action returns nothing.
$shape sphere ?-radius value? ?-baseAngle value? ?-topAngle value?
This action sets the shape to a sphere.
-radius value | This optional parameter is the float radius of the sphere with the range (0, infinity). The default is 1. |
-baseAngle value | This 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 value | This 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. |
This action returns nothing.
$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.)
-radius value | This 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 value | This 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 value | This optional parameter is the float length of the cone with the range [0, infinity). The default is 1. |
This action returns nothing.
$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.
-width value | This 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 value | This 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 value | This 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 value | This 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 value | This optional parameter is the float length of the box with the range [0, infinity). The default is 1. |
This action returns nothing.
$shape polygon -points vectors ?-slope type? ?-length value?
This action sets the shape to a polygon.
-points vectors | This 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 type | This 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 value | This optional parameter is the float length of the polygon with the range [0, infinity). The default is 1. |
This action returns nothing.
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.
$shape createModels
This action creates models from the current shape. It is an error if the current primitive is None.
This action takes no parameters.
This action returns a list of pw::Model entities.
$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.
This action takes no parameters.
This action returns the float length.
$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.
This action takes no parameters.
This action returns the float base angle.
$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.
This action takes no parameters.
This action returns the float top angle.
$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.
This action takes no parameters.
This action returns the float radius.
$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.
This action takes no parameters.
This action returns the float top radius.
$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.
This action takes no parameters.
This action returns the float width.
$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.
This action takes no parameters.
This action returns the float top width.
$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.
This action takes no parameters.
This action returns the float height.
$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.
This action takes no parameters.
This action returns the float top height.
$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.
This action takes no parameters.
This action returns a list of vector XYZ control points.
$shape getEnclosingEntities
This action gets the enclosing entities associated with this shape.
This action takes no parameters.
This action returns a list of pw::Entity objects that this shape enclosed during creation.
$shape setEnclosingEntities enclosingEnts
This action sets the enclosing entities associated with this shape.
enclosingEnts | This parameter is a list of pw::Entity objects or a list of pw::Framework and <pw::Entity objects that this shape enclosed during creation. |
This action returns nothing.
This action creates a new database shape object.
pw::Shape create
This attribute is the geometric transform of the database shape.
$shape get/setTransform value
This attribute is the location of the transform pivot on the shape.
$shape get/setPivot pivot
This attribute is the sectional minimum angle in degrees of the database shape, for shapes that support a sectional representation.
$shape get/setSectionMinimum angle
This attribute is the sectional maximum angle in degrees of the shape, for shapes that support a sectional representation.
$shape get/setSectionMaximum angle
This attribute is the type of cap used at the base of the shape.
$shape get/setBaseType type
This attribute is the type of cap used at the top of the shape.
$shape get/setTopType 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/setSidesType type
This action checks if this shape is defined.
$shape isDefined
This action checks if this shape is solid
$shape isSolid
This action returns whether the given face is valid for the current configuration of the shape.
$shape isFaceValid face
This action gets the position in the defining space of the shape at the given parameter.
$shape getPosition ?< -parameter | -closest >? value
This action gets the position of the shape in model space at the given parameter.
$shape getXYZ ?< -parameter | -closest >? value
This action gets the center of the shape in model space.
$shape getCenterXYZ
This action gets the base of the shape in model space.
$shape getBaseXYZ
This action gets the top of the shape in model space.
$shape getTopXYZ
This action gets the position of the shape in object space at the given parameter.
$shape getObjectXYZ ?< -parameter | -closest >? value
This action gets the normal of the surface in model space at the given parameter.
$shape getNormal ?< -parameter | -closest >? value
This action sets the section minimum and maximum angles of the shape to either 1, 2, 3 or 4 quadrants.
$shape setSectionQuadrants 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.
$shape normalizeTransform
This action clears the shape.
$shape clear
This action sets the shape to a sphere.
$shape sphere ?-radius value? ?-baseAngle value? ?-topAngle value?
This action sets the shape to a cylinder, cone or disk.
$shape cylinder ?-radius value? ?-topRadius value? ?-length value?
This action sets the shape to a box, frustum or rectangle.
$shape box ?-width value? ?-topWidth value? ?-height value? ?-topHeight value? ?-length value?
This action sets the shape to a polygon.
$shape polygon -points vectors ?-slope type? ?-length value?
This action creates models from the current shape.
$shape createModels
This action gets the current primitive type string of this shape with values being < None | Sphere | Cylinder | Box | Polygon >
$shape getPrimitive
This action gets the length parameter used to set the shape.
$shape getLength
This action gets the base angle parameter used to set the shape.
$shape getBaseAngle
This action gets the top angle parameter used to set the shape.
$shape getTopAngle
This action gets the radius parameter used to set the shape.
$shape getRadius
This action gets the top radius parameter used to set the shape.
$shape getTopRadius
This action gets the width parameter used to set the shape.
$shape getWidth
This action gets the top width parameter used to set the shape.
$shape getTopWidth
This action gets the height parameter used to set the shape.
$shape getHeight
This action gets the top height parameter used to set the shape.
$shape getTopHeight
This action gets the points parameter used to set the shape.
$shape getPoints
This action gets the slope type string used for creating the shape.
$shape getSlope
This action gets the enclosing entities associated with this shape.
$shape getEnclosingEntities
This action sets the enclosing entities associated with this shape.
$shape setEnclosingEntities enclosingEnts