SclSelectTriangle
Overview
Select a triangle displayed in a 3D Graphics window and return details of the selected triangle into variables.
Synopsis
SclSelectTriangle TriangleHandle $PromptText Layer TriobjectId TrisolationId TriangleNum
Description
You use this command to select triangles that are displayed in a 3D Graphics window. The details of the selected triangle are returned in several variables that are passed by reference.
The triangle handle that is returned may be used by other Scl commands to modify the selected triangle attributes.
Note: This command works when Surpac is in function-centric mode. Select the Orbit view tool to enter function-centric mode.
Arguments
- TriangleHandle
- PromptText
- Layer
- TriobjectId
- TrisolationId
- Trianglenum
Passed by reference. The unique identifier of the selected triangle is returned in this variable. The triangle handle can be used by other Scl commands to manipulate the triangle attributes.
Passed by value. The value of this argument is displayed in the graphics prompting region to instruct the user to perform the triangle selection action.
Passed by reference. The name of the 3D graphics layer that contains the triangle.
Passed by reference. The Object number of the selected point.
Passed by reference. The Trisolation number of the selected triangle.
Passed by reference. The triangle number of the selected triangle in the trisolation that contains the triangle. Note that triangle numbers start at 0 for the first triangle in a trisolation. They are in fact offsets in an array and this is why they start at 0.
Returns
The SclSelectTriangle command returns $SCL_OK if successful and $SCL_ERROR if escape is pressed.
Examples
# Select a triangle and print its values
set status [SclSelectTriangle triangle "Select the triangle of interest" layer \
objectid trisolid trianglenum]
if {$status == $SCL_OK} {
puts "Triangle selected OK"
puts "Layer=$layer, Object=$objectid, Trisolation=$trisolid, \
Trianglenum=$trianglenum"
} else {
puts "Error selecting a triangle - probably cancelled by the user"
}