Search code examples
c#matrixmirrorautocad-plugin

How to mirror an entity vertically using .Net in BricsCad or AutoCad


I have the following matrix:

_AcGe.Matrix3d acMatrix3dMirror = _AcGe.Matrix3d.Mirroring(_AcGe.Point3d.Origin);

I am new to using matries and I can see from the documentation that I can use:

  • Line
  • Plane
  • Point

What I have is not quite right. My mirror line needs to basically be 0,0,0 vertically up the screen. How do I do this?


Solution

  • Worked it out:

    // Mirror vertically
    _AcGe.Line3d oMirrorLine = new _AcGe.Line3d(new _AcGe.Point3d(0, 0, 0), new _AcGe.Point3d(0, 1, 0));
    _AcGe.Matrix3d acMatrix3dMirror = _AcGe.Matrix3d.Mirroring(oMirrorLine);
    

    This is a useful resource for information about transformations.