EndPointType Property

Applies To
Vision Objects: Contour, Edge, Line, LineInspector

Description
Specifies the type of end point to use for the line object.

In most cases the end point type will be a point (which usually means the PixelX and PixelY position of the EndPointObject). However, when the EndPointObject for the current line is a 2nd Line object, the EndPointType property is used to define an intersection point on the 2nd line such as the lines midpoint, endpoint, startpoint or perpendicular position.

Usage

VGet  Sequence.Object.EndPointType, var
VSet  Sequence.Object.EndPointType, value
Sequence
Name of a sequence or string variable containing a sequence name.
Object
Name of an object or string variable containing an object name. The object must exist in the specified sequence.
var
Integer variable that will contain the value of the property.
value
Integer value or expression for the new value of the property.

Values

EndPointObject = Line, LineFinder EndPointObject = Screen, Geometric, Correlation, Blob, Edge, Polar, BoxFinder, CornerFinder, LineInspector, ArcFinder, DefectFinder, Point or Contour object
See remarks.
Default: 2 - MidPoint
0 - Point
When using the above objects, the EndPointType can only be of type 0 - Point.

Remarks
As shown in the Values table above, many of the EndPointObject properties support only “0 - Point” of the EndPointType property.. This is because most EndPointObject properties normally use the PixelX and PixelY position for a reference position for defining a Start or End Point for a line. So when the EndPointObject is set as Screen, Blob, Correlation, Edge, or Point, the EndPointType will always be set to 0 - Point.

The range of valid values for EndPointType depend upon the EndPointObject.

When the EndPointObject is another Line object, the user must decide where on the 2nd line to intersect with the 1st line. The choices are as follows:

  • 1 - EndPoint
    • Vision constant: VISION_ENDPNTTYPE_ENDPOINT
    • Use the end point of the other line as the endpoint for this line.
  • 2 - MidPoint
    • Vision constant: VISION_ENDPNTTYPE_MIDPOINT
    • Cut the other line in half and use the center (or midpoint of the other line as the endpoint for this line.
  • 3 - PerpToLine
    • Vision constant: VISION_ENDPNTTYPE_PERPTOLINE
    • Calculate the position on the 2nd line where the 2 lines intersect in a perpendicular fashion and use this position as the end point.
  • 4 - StartPoint
    • Vision constant: VISION_ENDPNTTYPE_STARTPOINT
    • Use the starting point of the other line as the end point for this line.
  • 5 - PerpToStartPoint
    • Vision constant: VISION_ENDPNTTYPE_PERPTOSTARTPOINT
    • Calculate the position on the 2nd line where the 2 lines intersect in a perpendicular fashion through the start point of the first line and use this position as the end point.
  • 6 - PerpToMidPoint
    • Vision constant: VISION_ENDPNTTYPE_PERPTOMIDPOINT
    • Calculate the position on the 2nd line where the 2 lines intersect in a perpendicular fashion through the midpoint of the first line and use this position as the end point.
  • 7 - PerpToEndPoint
    • Vision constant: VISION_ENDPNTTYPE_PERPTOENDPOINT
    • Calculate the position on the 2nd line where the 2 lines intersect in a perpendicular fashion through the end point of the first line and use this position as the end point.

If the EndPointObject is modified to a Line object then the EndPointType is automatically changed to MidPoint.

If the EndPointObject is modified to Screen, Geometric, Correlation, Blob, Edge, Polar, BoxFinder, CornerFinder, LineInspector, ArcFinder, DefectFinder, Point or Contour object, then the EndPointType is automatically changed to “0 - Point”.

See Also
Contour Object, Edge Object, EndPointObject Property, Line Object, LineInspector Object, StartPointType Property