Cog3DRectangle SetOriginVertexXVectorYVector Method Cognex VisionPro 9.5
Sets the rectangle's origin vertex, extent X vector and extent Y vector.

Namespace: Cognex.VisionPro3D
Assembly: Cognex.VisionPro3D.Core (in Cognex.VisionPro3D.Core.dll) Version: 69.0.0.0
Syntax

public void SetOriginVertexXVectorYVector(
	Cog3DVect3 originVertex,
	Cog3DVect3 xVector,
	Cog3DVect3 yVector
)
Events

Event TypeReason
ICogChangedEvent Changed

Fires when some properties change.

The following state flags may be affected:

  • SfGetShapeFromScaledUnitRectangle
  • SfCenter
  • SfSize
  • SfGetLineSegments
  • SfGetVertices
  • SfGetOriginVertexXVectorYVector
  • SfComputeBoundingBox
  • SfComputePerimeter
  • SfComputeArea
  • SfIsDegenerateCurve
  • SfIsDegenerateSurface
Exceptions

ExceptionCondition
ArgumentException If xVector or yVector is (0,0,0), or xVector and yVector are parallel.
Remarks

Notes:
  • If yVector is not perpendicular to xVector internally a new yVector is generated as follows and used instead:
    • Create a plane with normal direction of xVector;
    • Project yVector to this plane, and get the projected vector yVectorInternal;
    • Scale yVectorInternal to have the same length as yVector.
    Otherwise, yVectorInternal = yVector.
  • Size.X will be xVector.Length, and Size().Y will be yVector.Length.
  • Center will be originVertex + (xVector + yVectorInternal)/2
See Also