pw::Shell

Database shell type

Derives From

pw::Object pw::Entity pw::DatabaseEntity

Summary
pw::ShellDatabase shell type
Static Actions
joinThis action joins as many of the given shells together as possible.
getIntersectingFacesThis action determines the set of intersecting faces among the provided database shells.
Instance Actions
isCompressedCheck to see if the shell entity is compressed.
getFaceCountThis action gets the number of faces in the shell.
compressThis action compresses the shell reducing the memory usage.
expandThis action expands the compressed shell.
getFaceTrianglesThis action gets the vertices of the triangles for a face in the shell.
getFaceTrianglesListThis action gets the vertices of all the triangles for a face in the shell.
getBoundaryCountThis action gets the number of boundaries of the shell.
getBoundaryThis action gets a shell boundary.
getBoundariesThis action gets a shell boundary list.
extractBoundaryThis action extracts a curve from the boundary of this shell.
extractBoundariesThis action extracts the curves from the boundaries of this shell.
extractCurvesThis action extracts curves from edges of this shell where the bend angle is greater than the given angle.
extractLinesThis action extracts lines from edges of this shell where the bend angle is greater than the given angle.
splitThis action splits this shell where the bend angle is greater than the given angle.
splitByPlaneThis action will return a list of shells split by the given plane.
flipOrientationThis action flips the orientation of this shell.
alignOrientationThis action aligns the normal orientation of the given shells with this shell.

Static Actions

join

pw::Shell join ?-reject rejectVar? ?-tolerance tol? shells

This action joins as many of the given shells together as possible.  If any of the shells being joined are compressed, then the joined shell will also be compressed.

Parameters

-reject rejectVarThis optional parameter is a variable name to receive a list of pw::Shell objects that were not used in joining.
-tolerance tolThis optional parameter is the fit tolerance.
shellsThis parameter is a list of pw::DatabaseEntity objects to join.  The DatabaseEntity should of type pw::Shell.

Returns

This action returns a list of the pw::DatabaseEntity objects that were joined.  These are of type pw::Shell.

Information

This command supports progress updates.

getIntersectingFaces

pw::Shell getIntersectingFaces shells

This action determines the set of intersecting faces among the provided database shells.

Parameters

shellsThis parameter is a list of pw::Shell objects.

Returns

This action returns a list of points, where every three represent a triangle that make up the face.

Example

This example looks for face intersections across all shells.  If intersecting faces are detected, they are marked with a point that is placed at the centroid of the intersecting cell.

Code

set shells [pw::Database getAll -type pw::Shell]
set pts [pw::Shell getIntersectingFaces $shells]
set numCells [expr [llength $pts] / 3]
for {set i 0} {$i < $numCells} {incr i} {
  set bi [expr $i * 3]
  set vec [pwu::Vector3 zero]
  for {set j 0} {$j < 3} {incr j} {
    set vec [pwu::Vector3 add $vec [lindex $pts [expr $bi + $j]]]
  }
  set pt [pw::Point create]
  $pt setPoint [pwu::Vector3 divide $vec 3]
}

Instance Actions

isCompressed

$shell isCompressed

Check to see if the shell entity is compressed.

Parameters

This action has no parameters.

Returns

This function returns true if shell entity is compressed

getFaceCount

$shell getFaceCount

This action gets the number of faces in the shell.

Parameters

This action has no parameters.

Returns

This action returns the number of faces in the shell.

compress

$shell compress

This action compresses the shell reducing the memory usage.

Parameters

This action has no paramteres.

Returns

This action returns nothing.

expand

$shell expand

This action expands the compressed shell.

Parameters

This action has no paramteres.

Returns

This action returns nothing.

getFaceTriangles

$shell getFaceTriangles index

This action gets the vertices of the triangles for a face in the shell.

Parameters

indexThis parameter is the index of the face to get [1, number of faces].

Returns

This action returns a list of points, where every three represent a triangle that make up the face.

getFaceTrianglesList

$shell getFaceTrianglesList

This action gets the vertices of all the triangles for a face in the shell.

Parameters

This action has no parameters.

Returns

This action returns a list of three points, where every three points represent a triangle that make up the face.

getBoundaryCount

$shell getBoundaryCount

This action gets the number of boundaries of the shell.

Parameters

none

Returns

This action returns the number of boundaries of the shell.

getBoundary

$shell getBoundary index

This action gets a shell boundary.

Parameters

indexThis parameter is the index of the boundary to get.

Returns

This action returns a boundary.

getBoundaries

$shell getBoundaries

This action gets a shell boundary list.

Parameters

This action has no parameters.

Returns

This action returns a boundary list.

extractBoundary

$shell extractBoundary index

This action extracts a curve from the boundary of this shell.

Parameters

indexThis parameter is the index of the boundary to extract [1, number of boundaries].

Returns

This action returns a new pw::Curve object.

extractBoundaries

$shell extractBoundaries

This action extracts the curves from the boundaries of this shell.

Parameters

This action has no parameters.

Returns

This action returns a list of new pw::Curve objects.

extractCurves

$shell extractCurves ?-boundariesOnly? bend_angle

This action extracts curves from edges of this shell where the bend angle is greater than the given angle.

Parameters

-boundariesOnlyThis optional parameter will limit the extracted lines to only the edges at the boundaries of the shells that would result when splitting the shell at the given bend angle.
bend_angleThis parameter is the bend angle at which to extract curves in degrees; (0, 180).

Returns

This action returns a list of new pw::Curve objects.

extractLines

$shell extractLines ?-boundariesOnly? ?-shellCount shellsVar? ?-curveCount curvesVar? bend_angle

This action extracts lines from edges of this shell where the bend angle is greater than the given angle.

Parameters

-boundariesOnlyThis optional parameter will limit the extracted lines to only the edges at the boundaries of the shells that would result when splitting the shell at the given bend angle.
-shellCount numShellsThis optional parameter is the number of shells that come from splitting at the given bend angle.
-curveCount numCurvesThis optional parameter is the number of shells that come from the extraction.
bend_angleThis parameter is the bend angle at which to extract curves in degrees; (0, 180).

Returns

This action returns a list of XYZ points, with pairs of points for the edges.

split

$shell split bend_angle

This action splits this shell where the bend angle is greater than the given angle.

Parameters

bend_angleThis parameter is the bend angle at which to split the shell in degrees; (0, 180).

Returns

This action returns a list of new pw::Shell objects.

splitByPlane

This action will return a list of shells split by the given plane.

Parameters

planeThis parameter is the plane used to split the shell.

Returns

This action returns a list of new pw::Shell objects.

flipOrientation

$shell flipOrientation

This action flips the orientation of this shell.

Parameters

none

Returns

This action returns nothing.

alignOrientation

$shell alignOrientation ?-tolerance tol? shells

This action aligns the normal orientation of the given shells with this shell.  If any shells in the given list are not connected within the given tolerance to this shell, they will be ignored.

Parameters

-tolerance tolThis parameter is the tolerance used to consider shells adjacent; It defaults to the fit tolerance.
shellsThis parameter is a list of pw::Shell objects to align.

Returns

This action returns nothing.

pw::Shell join ?-reject rejectVar? ?-tolerance tol? shells
This action joins as many of the given shells together as possible.
pw::Shell getIntersectingFaces shells
This action determines the set of intersecting faces among the provided database shells.
$shell isCompressed
Check to see if the shell entity is compressed.
$shell getFaceCount
This action gets the number of faces in the shell.
$shell compress
This action compresses the shell reducing the memory usage.
$shell expand
This action expands the compressed shell.
$shell getFaceTriangles index
This action gets the vertices of the triangles for a face in the shell.
$shell getFaceTrianglesList
This action gets the vertices of all the triangles for a face in the shell.
$shell getBoundaryCount
This action gets the number of boundaries of the shell.
$shell getBoundary index
This action gets a shell boundary.
A boundary is reference to either a database curve or the edge of a database surface.
$shell getBoundaries
This action gets a shell boundary list.
$shell extractBoundary index
This action extracts a curve from the boundary of this shell.
$shell extractBoundaries
This action extracts the curves from the boundaries of this shell.
$shell extractCurves ?-boundariesOnly? bend_angle
This action extracts curves from edges of this shell where the bend angle is greater than the given angle.
$shell extractLines ?-boundariesOnly? ?-shellCount shellsVar? ?-curveCount curvesVar? bend_angle
This action extracts lines from edges of this shell where the bend angle is greater than the given angle.
$shell split bend_angle
This action splits this shell where the bend angle is greater than the given angle.
$shell flipOrientation
This action flips the orientation of this shell.
$shell alignOrientation ?-tolerance tol? shells
This action aligns the normal orientation of the given shells with this shell.
Base type for all glyph types
Entity type
Base type for all database entities
Database shell type
Database curve type
Close