Angle Line Line Edit ControlCognex VisionPro

This topic contains the following sections.

The Angle Line Line edit control provides a graphical user interface to the AngleLineLine method, which returns the angle measured from LineA to LineB. The edit control allows you to configure the two lines, dictate which graphics appear as the tool executes, and view tool results. The following figure shows the Angle Line Line edit control:

Cognex Dimensioning Angle Line Line Control Angle Line Line Whole Control

The edit control offers the following features:

  • A row of control buttons at the top left
  • A set of function tabs to define the two lines, choose what graphics the tool will use, and view the angle result
  • An image display window for displaying Angle Line Line tool images and graphics

You can experiment with the edit control by using QuickBuild to create a CogAngleLineLineTool tool. A new CogAngleLineLineTool tool appears as shown in the following figure:

Cognex Dimensioning Angle Line Line Control Angle Line Line Terminals

LineA and LineB can either be specified directly from within the edit control or accepted as the result of other line-generating vision tools. For example, the following figure shows how an Angle Line Line tool accepts lines generated as output from two Create Line tools:

Cognex Dimensioning Angle Line Line Control Angle Line Line Accept Lines

To include the edit control in your custom vision application, you must first add it to your Visual Studio.NET development environment. See Using Edit Controls in Your Custom Vision Applications for more information.

Control Buttons

Cognex Dimensioning Angle Line Line Control MTWButton Bar

The following table describes the function of each button:

Table 1. Control buttons
ButtonDescriptionFunction
Run Button
RunMeasures the angle between the two lines
Electric Button
Electric modeToggles electric mode, where the Angle Line Line tool executes automatically when particular configuration parameters change. In electric mode, a lightning bolt appears next to every electric property.

Local Display Button

Local image display

Opens or closes the local image display window. An Angle Line Line tool supports the following image buffers:

  • The Current.InputImage buffer contains the current image and the two lines, either defined by the Settings tab or defined by another vision tool
  • The LastRun.InputImage buffer contains the results of the Angle Line Line tool after it measures the angle between the two lines
Floating Display Button
Floating image displayOpens one or more floating image windows, which support the same image buffers as the local image display window
Open Button
OpenOpens a VisionPro persistence (.vpp) file that contains a set of saved properties for this vision tool object type. VisionPro reports an error if you try to open a .vpp file for another object type.
Save Button
SaveSaves the current properties of the vision tool to a VisionPro persistence (.vpp) file. The edit control allows you to choose between saving the vision tool with or without its image buffers and tool results.
Save As Button
Save AsSaves the current properties of the vision tool to a new VisionPro persistence (.vpp) file
Reset Button
ResetResets the vision tool to its default state.
Tool Tips Button
Show ToolTipsEnables or disables the display of tooltips for individual items in the edit control
Help Button
HelpOpens this VisionPro online help file
Settings Tab

Use the Settings tab to define LineA and LineB, or use the tab to confirm that the existing lines correspond to the correct input lines generated by another tool. The following figure shows the Settings tab:

Cognex Dimensioning Angle Line Line Control Angle Line Line Settings Tab

The Settings tab offers identical controls for configuring both lines:

Table 2. Settings Tab
FeatureDescription
SelectedSpaceNameNames the coordinate space for the line shape
XThe x-coordinate of a reference point on the line
YThe y-coordinate of a reference point on the line
RotationThe angle of the line
FitToImageCenters the line within the Current.InputImage
Graphics Tab

Use the Graphics tab to control which graphics the Angle Line Line tool generates and displays. The following figure shows the Graphics tab:

Cognex Dimensioning Angle Line Line Control Angle Line Line Graphics Tab

The following table describes the options in the Graphics tab:

Table 3. Graphics Tab
FeatureDescription
Show Input ImageDetermines whether or not the input image is recorded as part of the diagnostic record, and whether the image is copied to the record or saved in the record as a reference
Show LineAShow LineA in the LastRun.InputImage buffer
Show LineBShow LineB in the LastRun.InputImage buffer
Results Tab

Use the Results tab to view the angle between LineA and LineB. The following figure shows the Results tab:

Cognex Dimensioning Angle Line Line Control Angle Line Line Results Tab

The Results tab has only one feature:

Table 4. Results Tab
FeatureDescription
AngleThe angle between the two lines