Table of Contents

Struct Affine2

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

A transformation of the plane, x' = A x + C y + E and y' = B x + D y + F: how the entities of a block are placed in the drawing when an INSERT is drawn, kept as one matrix whatever the depth of the blocks.

public readonly struct Affine2
Inherited Members

Constructors

Affine2(double, double, double, double, double, double)

Makes a transformation from its six numbers.

Properties

A

Gets the X part of the image of the X axis.

B

Gets the Y part of the image of the X axis.

C

Gets the X part of the image of the Y axis.

D

Gets the Y part of the image of the Y axis.

Determinant

Gets the determinant: negative when the transformation mirrors.

E

Gets the X shift.

F

Gets the Y shift.

Identity

Gets the identity: nothing moves.

IsIdentity

Gets whether the transformation is the identity.

IsSimilarity

Gets whether the transformation turns, mirrors and scales alike in both directions, so that a circle stays a circle and an arc stays an arc.

Rotation

Gets the angle the X axis turns to, in radians.

Scale

Gets the factor by which lengths change, for a similarity.

Methods

ScaleRotate(double, double, double)

Makes the scales of the axes followed by a turn about the origin.

Then(Affine2)

Gets the transformation that does this one first and then another.

Translation(double, double)

Makes a translation.

X(double, double)

Gets the X of a point after the transformation.

Y(double, double)

Gets the Y of a point after the transformation.