CogEllipticalArc SetFromUnitCircleParams Method Cognex VisionPro 9.7
Set the geometry of this elliptical arc from the given description of a unit circular arc and the linear transform that maps it to an elliptical arc. The unit circle arc is centered at (0,0), has a radius of one, and has the given start angle (in radians) and span (in radians).

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 73.0.0.0
Syntax

public void SetFromUnitCircleParams(
	double unitCircleAngleStart,
	double unitCircleAngleSpan,
	CogTransform2DLinear ellipseFromUnitCircle
)

Parameters

unitCircleAngleStart
Type: System Double

The start angle of the unit circle arc in radians.

unitCircleAngleSpan
Type: System Double

The span of the unit circle arc in radians.

ellipseFromUnitCircle
Type: Cognex.VisionPro CogTransform2DLinear

The transform that maps the unit circle arc to this elliptical arc.

Events

Event TypeReason
CogEllipticalArc Changed

Fires when the shape changes.

The following state flags may be affected:

    Exceptions

    ExceptionCondition
    ArgumentException

    unitCircleAngleSpan = 0.0.

    ArgumentException

    RadialScale <= 0.0 or RadialScale = 1.0.

    ArgumentException

    ellipseFromUnitCircle is NULL.

    Remarks

    Sets the geometry of this elliptical arc from the given description of a unit circular arc and the linear transform that maps it to an elliptical arc. The unit circle arc is centered at (0,0), has a radius of one, and has the specified start angle and span measured in radians.

    Typically, the unitCircleAngleStart value is not the same as AngleStart, and the unitCircleAngleSpan is not the same as AngleSpan. The returned unitCircleAngleStart is normalized to be between +π and −π, but unitCircleAngleSpan is not.

    The child space of this shape is unit circle space. In the unit circle child space, you can pick (x,y) positions along the arc using standard parametric equations for x and y:

    x = cos(t) and y = sin(t)

    where the angle t varies from unitCircleAngleStart and (unitCircleAngleStart + unitCircleAngleSpan).

    You can map positions and angles in child space to the parent space using the ellipseFromUnitCircle transform. You can map from parent space to child space using the inverse transform.

    Remember that AngleStart is measured from the x-axis of the ellipse. You must add Rotation to AngleStart to get the correct angle in parent space.

    See Also