Method TransformBy
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
TransformBy(GeoTransform2)
Applies a transformation to this arc.
public GeoArc2 TransformBy(GeoTransform2 transform)
Parameters
transformGeoTransform2The transformation to apply.
Returns
- GeoArc2
The transformed arc.
Remarks
A turn, a shift, a mirror or an even scaling moves the arc whole, by its centre and its radius, so an arc of any sweep moves; one that turns shapes round, a mirror or a negative scaling, also reverses the way the arc sweeps. One whose axes are one length and square to each other only to a share of some 1E-9, the rounding of a matrix built from axes, moves it whole where it lands within the global point tolerance so, and is read as a stretch otherwise: X stretched by a share of 4E-10 and scaled by 1 000 took the arc of radius 1E5 sweeping 6 radians to one 0.04 off, and refuses it. Any other transformation, a skew or a stretch, makes part of an ellipse of the arc, and the arc through where its two ends and its middle land, as in space (TransformBy(GeoTransform3)), stands for it only where it lands within the global point tolerance of where the transformation puts the rest of it, everywhere along it, and is refused otherwise: asked at every sixteenth of its sweep only, the arc of radius 87.66 from 0.2 radians sweeping 1.51, under X stretched by 1 + 1.793E-6 and scaled by 84.1, landed 0.0010114 off between two of them, and was moved. The skew that sends Y to (0.000001, 1) moves the arc of radius 100 from 0.5 to 2 radians 0.0000069 off, and refuses it scaled by 1 000, where it would be 0.0069 off; the skew that sends X to (1, 0) and Y to (0.6, 0.8) refuses it, the arc of radius 66.09 through its moved ends and middle standing far off the ellipse it becomes. A skew that keeps both axes one length is judged as a stretch is: a turn of 0.7529 radians of a stretch of 1 + 4.29E-9 and a shear of 9.28E-5, scaled by 55.57, took the arc of radius 9 069.6 to one 9.16 off, and refuses it. A stretch of 3E-6 along X moves the arc of radius 100 from 0.5 to 2 radians at the scale it is drawn, 0.000017 off, and refuses it scaled by 1 000, where it would be 0.017 off. Each point is read from the moved start across the arc, so an arc bowing a hair off its chord is judged as surely as a half circle. An arc of a whole turn has no ends to go through: it is the whole circle, and is read as its circle is (Transform(GeoCircle2)); an arc past a half turn whose ends the transformation brings within the global point tolerance of each other is refused under a skew too. Where the ends come that close under a transformation that carries a circle, a turn whose numbers are rounded to six places, the arc is moved whole as the whole turn is: the arc of radius 100 sweeping a whole turn less 1E-9 under such a turn moves, where it threw.
Exceptions
- ArgumentNullException
Thrown when the transformation is null.
- InvalidOperationException
Thrown when the transformation would skew or stretch the arc into part of an ellipse, so that the arc through where its ends and its middle land would land further than the global point tolerance from where its points are put, or, for an arc of a whole turn, would skew or stretch it, as Transform(GeoCircle2) refuses a circle.
- ArgumentException
Thrown when a skew, a transformation Transform(GeoCircle2) would refuse for a circle, brings the two ends of an arc past a half turn within the global point tolerance of each other, so that no arc can be told through them and its middle.