Entity Coordinate System

If you define your own entity, it may be useful to store its geometric constructs (points, angles, and vectors) in terms of its own relative coordinate system. For example, arcs establish a coordinate system in which the Z axis is perpendicular to the plane of the arc. An arc's center point is returned in world coordinates, but the start and end angles can only be interpreted with respect to its ECS. In such cases, implement the getEcs() function to return a matrix that is used to transform the entity from its Entity Coordinate System to the World Coordinate System. If an entity is not defined in terms of its own Entity Coordinate System, then the getEcs() function returns the identity matrix. (In other words, any time an entity's getEcs() function returns the identity matrix, you can assume the entity is defined in terms of world coordinates.)

In AutoCAD, planar entities have an ECS; 3D entities do not. AutoCAD entities that can return a nonidentity matrix for their getEcs() function are: