Database shell type
pw::Object pw::Entity pw::DatabaseEntity
pw:: | Database shell type |
Static Actions | |
join | This action joins as many of the given shells together as possible. |
getIntersectingFaces | This action determines the set of intersecting faces among the provided database shells. |
Instance Actions | |
getFaceCount | This action gets the number of faces in the shell. |
getFaceTriangles | This action gets the vertices of the triangles for a face in the shell. |
getFaceTrianglesList | This action gets the vertices of all the triangles for a face in the shell. |
getBoundaryCount | This action gets the number of boundaries of the shell. |
getBoundary | This action gets a shell boundary. |
getBoundaries | This action gets a shell boundary list. |
extractBoundary | This action extracts a curve from the boundary of this shell. |
extractBoundaries | This action extracts the curves from the boundaries of this shell. |
extractCurves | This action extracts curves from edges of this shell where the bend angle is greater than the given angle. |
extractLines | This action extracts lines from edges of this shell where the bend angle is greater than the given angle. |
split | This action splits this shell where the bend angle is greater than the given angle. |
splitByPlane | This action will return a list of shells split by the given plane. |
flipOrientation | This action flips the orientation of this shell. |
alignOrientation | This action aligns the normal orientation of the given shells with this shell. |
pw::Shell join ?-reject rejectVar? ?-tolerance tol? shell
This action joins as many of the given shells together as possible.
-reject rejectVar | This optional parameter is a variable name to receive a list of pw::Shell objects that were not used in joining. |
-tolerance tol | This optional parameter is the fit tolerance. |
shells | This parameter is a list of pw::Shell objects to join. |
This action returns a list of the pw::Shell objects that were joined.
This command supports progress updates.
pw::Shell getIntersectingFaces shells
This action determines the set of intersecting faces among the provided database shells.
shells | This parameter is a list of pw::Shell objects. |
This action returns a list of points, where every three represent a triangle that make up the face.
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] }
$shell getFaceTriangles index
This action gets the vertices of the triangles for a face in the shell.
index | This parameter is the index of the face to get [1, number of faces]. |
This action returns a list of points, where every three represent a triangle that make up the face.
$shell extractBoundary index
This action extracts a curve from the boundary of this shell.
index | This parameter is the index of the boundary to extract [1, number of boundaries]. |
This action returns a new pw::Curve object.
$shell extractBoundaries
This action extracts the curves from the boundaries of this shell.
This action has no parameters.
This action returns a list of new pw::Curve objects.
$shell extractCurves ?-boundariesOnly? bend_angle
This action extracts curves from edges of this shell where the bend angle is greater than the given angle.
-boundariesOnly | This 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_angle | This parameter is the bend angle at which to extract curves in degrees; (0, 180). |
This action returns a list of new pw::Curve objects.
$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.
-boundariesOnly | This 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 numShells | This optional parameter is the number of shells that come from splitting at the given bend angle. |
-curveCount numCurves | This optional parameter is the number of shells that come from the extraction. |
bend_angle | This parameter is the bend angle at which to extract curves in degrees; (0, 180). |
This action returns a list of XYZ points, with pairs of points for the edges.
$shell split bend_angle
This action splits this shell where the bend angle is greater than the given angle.
bend_angle | This parameter is the bend angle at which to split the shell in degrees; (0, 180). |
This action returns a list of new pw::Shell objects.
This action will return a list of shells split by the given plane.
plane | This parameter is the plane used to split the shell. |
This action returns a list of new pw::Shell objects.
$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.
-tolerance tol | This parameter is the tolerance used to consider shells adjacent; It defaults to the fit tolerance. |
shells | This parameter is a list of pw::Shell objects to align. |
This action returns nothing.
This action joins as many of the given shells together as possible.
pw::Shell join ?-reject rejectVar? ?-tolerance tol? shell
This action determines the set of intersecting faces among the provided database shells.
pw::Shell getIntersectingFaces shells
This action gets the number of faces in the shell.
$shell getFaceCount
This action gets the vertices of the triangles for a face in the shell.
$shell getFaceTriangles index
This action gets the vertices of all the triangles for a face in the shell.
$shell getFaceTrianglesList
This action gets the number of boundaries of the shell.
$shell getBoundaryCount
This action gets a shell boundary.
$shell getBoundary index
This action gets a shell boundary list.
$shell getBoundaries
This action extracts a curve from the boundary of this shell.
$shell extractBoundary index
This action extracts the curves from the boundaries of this shell.
$shell extractBoundaries
This action extracts curves from edges of this shell where the bend angle is greater than the given angle.
$shell extractCurves ?-boundariesOnly? bend_angle
This action extracts lines 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 splits this shell where the bend angle is greater than the given angle.
$shell split bend_angle
This action flips the orientation of this shell.
$shell flipOrientation
This action aligns the normal orientation of the given shells with this shell.
$shell alignOrientation ?-tolerance tol? shells