Set the box's origin vertex, extent X vector, extent Y vector, and Z height.
Namespace: Cognex.VisionPro3DAssembly: Cognex.VisionPro3D.Core (in Cognex.VisionPro3D.Core.dll) Version: 65.1.0.0
Syntax
Parameters
- originVertex
- Type: Cognex.VisionPro3D Cog3DVect3
The origin vertex of the box.
- xVector
- Type: Cognex.VisionPro3D Cog3DVect3
The extent X vector of the box. Note that this vector corresponds to the Size.X extent in ScaledUnitBox space. See the Remarks section.
- yVector
- Type: Cognex.VisionPro3D Cog3DVect3
The extent Y vector of the box. Note that this vector corresponds to the Size.Y extent in ScaledUnitBox space. See the Remarks section.
- z
- Type: System Double
The Z height of the box. Note that this vector corresponds to the Size.Z extent in ScaledUnitBox space. See the Remarks section.
Events
| Event Type | Reason |
|---|---|
| ICogChangedEvent Changed | Fires when some properties change. The following state flags may be affected:
|
Exceptions
| Exception | Condition |
|---|---|
| ArgumentException | If xVector or yVector is (0,0,0), or xVector and yVector are parallel. |
Remarks
- 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.
- Size.X will be xVector.Length, and Size.Y will be yVector.Length, and Size.Z will be z.
- The implicit extent Z vector's direction is decided by the cross product of xVector and yVectorInternal.
- Assume that the extent Z vector is named as zVectorInternal, then the center of the box will be: originVertex + (xVector + yVectorInternal + zVectorInternal * z/zVectorInternal.Length)/2
See Also