C++
ACDBCORE2D_PORT ADESK_SEALED_VIRTUAL Acad::ErrorStatus moveStretchPointsAt( const AcDbIntArray & indices, const AcGeVector3d& offset );
Description
This function is intended to be called by AutoCAD during execution of a stretch command in which the entity has been selected. 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 getStretchPoints() method in order to obtain the valid stretch 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 stretch 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 stretch 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.
This function must modify the entity such that the stretch 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 stretch operation.
If this function is implemented in a derived class, then the getStretchPoints() method must also be implemented because the index values within the indices array represent the 0-based index of the stretch points appended to the array passed into the getStretchPoints() method. So a value of 0 in the indices array corresponds to the first point that the getStretchPoints() method appended to the array passed into it, a value of 1 in the indices array corresponds to the second point the getStretchPoints() method appended, etc. So, for example, if the first and third points the getGripPoints() appended are to be "stretched" by the stretch operation, 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 getStretchPoints() method, it is absolutely essential that this function know exactly what points are reported by the getStretchPoints() method and the order they are reported in (that is, the order they are appended to the array passed into the getStretchPoints() method).
Upon successful completion of this function, it should return Acad::eOk. Return values for error conditions are completely up to the implementer.
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 stretch points reported by the getStretchPoints() method) that indicate which stretch points are being translated |
offset | Input vector (in WCS coordinates) indicating the direction and magnitude that the stretch points have been translated |