C++
ACDBCORE2D_PORT ADESK_SEALED_VIRTUAL Acad::ErrorStatus moveGripPointsAt( const AcDbIntArray & indices, const AcGeVector3d& offset );
Description
Function usage
This function is intended to be called by AutoCAD during a grip edit of the entity. However, it is certainly possible for ObjectARX applications to call this function.
A call of this function should be preceded by a call to the entity's getGripPoints() method in order to obtain the valid grip points and the order they come in which is then used to determine the index values to be passed in within the indices array.
The offset vector indicates the direction and magnitude of the translation to be applied to the grip points specified in indices.
The end result will be that this function will modify the entity in whatever way it deems appropriate so that the grip points identified by the index values in indices are moved the direction and magnitude of the offset vector.
If successful this function will return Acad::eOk. Other return values are dependent on how it's been implemented.
Function implementation in derived classes
This function must modify the entity such that the grip points identified by the indices array are translated to the direction and magnitude specified by the offset vector (which is in WCS coordinates). How this affects the rest of the entity is, of course, dependent on the entity, but any other effects must also be taken care of by this function since this is the function that is expected to do all entity modifications that result from the grip edit.
If this function is implemented in a derived class, then the getGripPoints() method must also be implemented because the index values within the indices array represent the 0-based index of the grip points appended to the array passed into the getGripPoints() method. So a value of 0 in the indices array corresponds to the first point that the getGripPoints() method appended to the array passed into it, a value of 1 in the indices array corresponds to the second point the getGripPoints() method appended, etc. So, for example, if the user has gripped the first and third points the getGripPoints() appended, then the indices array would have two elements. The first would be 0 and the second would be 2.
Because of the dependence of this function on the points appended by the getGripPoints() method, it is absolutely essential that this function know exactly what points are reported by the getGripPoints() method and the order they are reported in (that is, the order they are appended to the array passed into the getGripPoints() method).
Upon successful completion of this function, it should return Acad::eOk. Return values for error conditions are completely up to the implementer.
Default implementation
Calls the entity's AcDbEntity::transformBy() method with a transformation matrix that translates the entire entity by offset. It then returns whatever status the transformBy() method returns.
Parameters
Parameters | Description |
---|---|
indices | Input array containing index values (which correspond to grip points reported by the getGripPoints() method) that indicate which grip points are currently "hot" |
offset | Input vector (in WCS coordinates) indicating the direction and magnitude that the grip points have been translated |