Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 73.0.0.0
Parameters
- circleA
- Type: Cognex.VisionPro CogCircle
The first circle.
- circleB
- Type: Cognex.VisionPro CogCircle
The second circle.
- image
- Type: Cognex.VisionPro ICogImage
An image that specifies the coordinate space to use.
- numPoints
- Type: System Int32
The number of points that are valid in the out parameters. If the value is −1, the circles are coincident; if the value is zero, the circles not intersecting. If the value is 1, only the value (x0,y0) is valid; if the value is 2, both (x0,y0) and (x1,y1) are valid.
- x0
- Type: System Double
The x-coordinate of the first intersection point.
- y0
- Type: System Double
The y-coordinate of the first intersection point.
- x1
- Type: System Double
The x-coordinate of the second intersection point.
- y1
- Type: System Double
The y-coordinate of the second intersection point.
- x2
- Type: System Double
The x-coordinate of the third intersection point.
- y2
- Type: System Double
The y-coordinate of the third intersection point.
- x3
- Type: System Double
The x-coordinate of the fourth intersection point.
- y3
- Type: System Double
The y-coordinate of the fourth intersection point.
Return Value
Type: Boolean| Exception | Condition |
|---|---|
| ArgumentException | circleA or circleB is NULL. |
| CogMathUnsupportedGeometryException | It is impossible to map both circleA and circleB to the same coordinate space without converting one or both circles into ellipses. |
| CogSpaceTreeInvalidNameSyntaxException | At least one shape's selected space names is not a legal space name. |
| CogSpaceTreeNotUniqueException | At least one shape's selected space names is a nonqualified space name and more than one instance of it exists in image's coordinate space tree. |
| CogSpaceTreeNotInTreeException | At least one shape does not exist in image's coordinate space tree. |
| CogImageNoTreeException | The coordinate space tree is missing from image. |
Returns whether the given circles intersect and optionally the points of intersection.
The following table describes how the relationship between circleA and circleB affects the out parameters.
Note: In this release of VisionPro, if it is not possible to map both circleA and circleB into a single space where neither circle is converted into an ellipse, this function will throw E_CogMath_Unsupported_Geometry. Also, in this release of VisionPro, numPoints is never more than 2. In future releases, in cases where one or both input circles are transformed into ellipses, up to 4 intersection points may be returned. Accordingly, the table below does not include columns for the values of x2, y2, x3, and y3.
ConditionIntersectednumPoints(x0,y0)(x1,y1)Concentric
False
0
(0,0)
(0,0)
Non-intersecting
False
0
(0,0)
(0,0)
Non-intersecting
False
0
(0,0)
(0,0)
Coincident
True
−1
(0,0)
(0,0)
Tangent
True
1
The tangent point.
(0,0)
Intersecting
True
2
The first intersection point.
The second intersection point.
If you supply a value for the image parameter, then circleA and circleB are mapped to the selected space of image before the intersection is computed and the result is expressed in that space.
If you do not supply a value for image, then circleA and circleB are presumed to be in the same coordinate space.