Table of Contents

Method TransformBy

Namespace
GeometryHelper.Dxf
Assembly
GeometryHelper.dll

TransformBy(GeoTransform3, bool)

Moves, turns, scales or mirrors the HATCH as TransformBy(GeoTransform3) does, and says whether a mirror reflects the lines of its pattern: AutoCAD's TransformBy follows its system variable MIRRHATCH, 0 by default, which leaves them as they were, and 1, which reflects them with the rest; TransformBy(transform) is the 0 form.

public void TransformBy(GeoTransform3 transform, bool mirrorPattern)

Parameters

transform GeoTransform3

The transformation.

mirrorPattern bool

True to reflect the lines of the pattern, in the record and in the contexts of an annotative hatch, as MIRRHATCH 1 does; false to leave them, as MIRRHATCH 0 does. It changes nothing for a transformation that is not a mirror.

Remarks

The line of a user pattern at 30 degrees through (0, 0), its offset (-1, 1.732), across the line through (20, 5) and (30, 20) is written as it was with mirrorPattern false; with true it is at 82.6198649480404 (twice the angle of the mirror line, 56.31 degrees, less 30), its base at (23.0769, -15.3846) and its offset reflected.

The direction of the pattern of each context of an annotative hatch (groups 10, 20 and 30) is a vector of the world, and is carried by the transformation, but AutoCAD 2021 leaves it as it was where the transformation takes the axes of the hatch's own system (the x and y of its normal) straight to those of the system of the new normal, no turn or reflection between them: a hatch of normal (0, 1, 0), (1, 2, 3) or any but the drawing's, turned about z, a hatch of the plane of the drawing turned 40 degrees about x, a move, a scaling. A pattern at 30 degrees of the plane of the drawing turned 40 degrees about z holds (0.342, 0.940) in its context where it held (0.866, 0.5) and a hatch of normal (0, 1, 0), whose direction is (-0.866, 0, 0.5), turned the same keeps it. Probed over 11 annotative hatches of 6 planes, 16 contexts, turns about x, y, z and two slanting axes by 6 angles each: the 463 hatch and transformation pairs where the direction could tell are all on this rule.

Exceptions

ArgumentNullException

Thrown when the transformation is null.

ArgumentException

Thrown when it takes the plane of the HATCH to no plane.

InvalidOperationException

Thrown when the HATCH is erased.