Entities also have a number of common functions, primarily intended for use by AutoCAD. This section provides general background on using some of these functions. For examples of implementing the functions for new classes, see
Deriving from AcDbEntity.
Common entity functions include the following:
-
intersectWith() is used in trim, extend, fillet, chamfer, break, and object snap Intersection operations
-
transformBy() is used to pass in a transform matrix that moves, scales, or rotates points in the object
-
getTransformedCopy() creates a copy of the object and applies a transformation to it
-
getOsnapPoints() returns the snap points and the kind of snap points
-
getGripPoints() returns the grip points, which are a superset of the stretch points
-
getStretchPoints() defaults to
getGripPoints() and usually has the same implementation
-
moveStretchPointsAt() is used by the AutoCAD STRETCH command to move specified points and defaults to
transformBy()
-
moveGripPointsAt() is used by AutoCAD grip editing to move specified points and defaults to
transformBy()
-
worldDraw() creates a view-independent geometric representation of an entity
-
viewportDraw() creates a view-dependent geometric representation of an entity
-
draw() queues up the entity and flushes the graphics queue so that the entity and anything else in the queue are drawn
-
list() is used by the AutoCAD LIST command and produces
acutPrintf() statements
-
getGeomExtents() returns the corner points of a box that encloses the 3D extents of your entity
-
explode() decomposes an entity into a set of simpler elements
-
getSubentPathsAtGsMarker() returns the subentity paths that correspond to the given GS marker (see
GS Markers and Subentities)
-
getGsMarkersAtSubentPath() returns the GS marker that corresponds to the given subentity path
-
subentPtr() returns a pointer corresponding to the given subentity path
-
highlight() highlights the specified subentity (see
GS Markers and Subentities)