Intersect Circle Circle Edit ControlCognex VisionPro

This topic contains the following sections.

The Intersect Circle Circle edit control provides a graphical user interface to the IntersectCircleCircle method, which returns whether CircleA and CircleB intersect, and depending on the relationship of the circles, the points of intersection. The edit control allows you to configure the two circles, dictate which graphics appear as the tool executes, and view tool results. The following figure shows the Intersect Circle Circle edit control:

Cognex Dimensioning Intersect Circle Circle Control Intersect Circle Circle 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 circles, choose what graphics the tool will use, and view results
  • An image display window for displaying tool images and graphics

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

Cognex Dimensioning Intersect Circle Circle Control Intersect Circle Circle Terminals

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 Intersect Circle Circle Control MTWButton Bar

The following table describes the function of each button:

Table 1. Control buttons
ButtonDescriptionFunction
Run Button
RunDetermines whether the two circles intersect
Electric Button
Electric modeToggles electric mode, where the Intersect Circle Circle 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 Intersect Circle Circle tool supports the following image buffers:

  • The Current.InputImage buffer contains the input image and the two input circles
  • The LastRun.InputImage buffer contains the results of the tool after it determines whether the circles intersect
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 CircleA and CircleB, or use the tab to confirm that the existing circles correspond to the correct input circles generated by another tool. The following figure shows the Settings tab:

Cognex Dimensioning Intersect Circle Circle Control Intersect Circle Circle Settings Tab

The Settings tab offers identical features for defining both CircleA and CircleB parameters:

Table 2. Settings tab
FeatureDescription
SelectedSpaceNameNames the coordinate space for the circle shape
CenterXThe x-coordinate at the center of the circle
CenterYThe y-coordinate at the center of the circle
RadiusThe radius of the circle
FitToImageCenters the circle within the Current.InputImage
Graphics Tab

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

Cognex Dimensioning Intersect Circle Circle Control Intersect Circle Circle Graphics Tab

The Graphics tab offers the following features:

Table 3. Graphics tab
FeatureDescription
Show Intersection PointsShow the points where the circles intersect in the LastRun.InputImage buffer
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 CircleA

Show CircleA in the LastRun.InputImage buffer

Show CircleB

Show CircleB in the LastRun.InputImage buffer
Results Tab

Use the Results tab to view the relationship between CircleA and CircleB as determined by the Intersect Circle Circle tool. The following figure shows the Results tab:

Cognex Dimensioning Intersect Circle Circle Control Intersect Circle Circle Results Tab

The Results tab offers the following features:

Table 4. Results tab
FeatureDescription
Intersects Indicates whether or not the circles intersect

NumPoints

An indication of the relationship between the point CircleA and CircleB, as described in the IntersectCircleCircle method
X0 and Y0 The (x, y) coordinate of the first point where the circles intersect
X1 and Y1 The (x, y) coordinate of the second point where the circles intersect
X2 and Y2 Reserved for future use
X3 and Y3 Reserved for future use