If you mean Xdata transform, sure
Some Xdata entries are modified in AcDbObject::xDataTransformBy. See this link for the codes
https://help.autodesk.com/view/OARX/2023/ENU/?guid=OARX-RefGuide-AcDbObject__xDataTransformBy_AcGeMatrix3d_So, if I create an object with these transformable codes, I can read them back later and see how the state has changed.
Why is this useful? Some objects may not store a normal, or a direction and it can be impossible to determine the width, height, or depth once the object is moved or rotated.
Armed with Xdata, you can build a matrix to transform the entity back to its original state to get it’s bounding box
I’m using Python here, but it should be readable
import traceback
from pyrx_imp import Rx
from pyrx_imp import Ge
from pyrx_imp import Gi
from pyrx_imp import Db
from pyrx_imp import Ap
from pyrx_imp import Ed
from pyrx_imp import Gs
def PyRxCmd_doit() -> None:
try:
Db.Core.regApp("MYXD")
solid = Db.Solid3d()
solid.createBox(2.0,4.0,96.0)
xd = [(Db.DxfCode.kDxfRegAppName, "MYXD"),
(Db.DxfCode.kDxfXdWorldXCoord, Ge.Point3d(0, 0, 0)),
(Db.DxfCode.kDxfXdWorldXDir, Ge.Vector3d.kXAxis),
(Db.DxfCode.kDxfXdWorldXDir, Ge.Vector3d.kYAxis),
(Db.DxfCode.kDxfXdWorldXDir, Ge.Vector3d.kZAxis)]
solid.setXData(xd)
print("\nBefore",solid.xData("MYXD"))
mat = Ge.Matrix3d()
mat.setCoordSystem(
Ge.Point3d(100,100,100),
Ge.Vector3d.kZAxis,
Ge.Vector3d.kXAxis,
Ge.Vector3d.kYAxis)
solid.transformBy(mat)
print("\nAfter",solid.xData("MYXD"))
db = Db.curDb()
db.addToModelspace(solid)
except Exception as err:
traceback.print_exception(err)
Before [(1001, 'MYXD'),
(1011, <PyGe.Point3d(0.00000000000000,0.00000000000000,0.00000000000000)>),
(1013, <PyGe.Point3d(1.00000000000000,0.00000000000000,0.00000000000000)>),
(1013, <PyGe.Point3d(0.00000000000000,1.00000000000000,0.00000000000000)>),
(1013, <PyGe.Point3d(0.00000000000000,0.00000000000000,1.00000000000000)>)]
After [(1001, 'MYXD'),
(1011, <PyGe.Point3d(100.00000000000000,100.00000000000000,100.00000000000000)>),
(1013, <PyGe.Point3d(0.00000000000000,0.00000000000000,1.00000000000000)>),
(1013, <PyGe.Point3d(1.00000000000000,0.00000000000000,0.00000000000000)>),
(1013, <PyGe.Point3d(0.00000000000000,1.00000000000000,0.00000000000000)>)]