Table of Contents

Method Mirror

Namespace
OpenCAD2D.Remote
Assembly
OpenCAD2D.Remote.dll

Mirror<T>(IEnumerable<T>, GeoPoint2, GeoPoint2, bool)

Mirrors objects across the line through two points, as MIRROR does: a text stays readable under MIRRTEXT 0, a dimension too. Sends the queued changes with it.

public IReadOnlyList<T> Mirror<T>(IEnumerable<T> objects, GeoPoint2 first, GeoPoint2 second, bool eraseSource = false) where T : DxfEntity

Parameters

objects IEnumerable<T>

Objects read from this drawing.

first GeoPoint2

The first point of the mirror line, in the world.

second GeoPoint2

The second point; the app refuses a line no longer than its tolerance.

eraseSource bool

Whether the objects are mirrored where they stand rather than copied; false, as MIRROR's default.

Returns

IReadOnlyList<T>

With eraseSource false copies of the new objects, in the order given; else new copies of the objects as they are now, under the same handles.

Type Parameters

T

The type of the objects given.

Exceptions

ArgumentNullException

Thrown when the list is null.

ArgumentException

Thrown when an object was not read from this drawing.

ArgumentOutOfRangeException

Thrown when a number is not finite.

CadRemoteException

Thrown when the app refuses, as Move<T>(IEnumerable<T>, GeoVector2) says, or the two points are not a line. Nothing is applied.