To stop a custom entity from being mirrored, inside the subTransformBy() method, simply check to see if the determinant of the matrix passed to it is negative – if so, then do nothing and return Acad::eOk.
Here is a sample code snippet :
Acad::ErrorStatus MyCustomLine::subTransformBy
(const AcGeMatrix3d& xform)
{
assertWriteEnabled( Adesk::kFalse );
// Prevent mirror of our custom line
if(xform.det() < 0)
return Acad::eOk;
// Provide default implementation for other transformations
return AcDbLine::subTransformBy(xform);
}

Leave a Reply