ObjectARX自定义实体实现EX(EXTEND)命令
ObjectARX自定义实体需要重载实现subIntersectWith和extend方法。
// 2020-10-13 by www.cnblogs.com/ztcad
virtual Acad::ErrorStatus subIntersectWith(const AcDbEntity *pEnt, AcDb::Intersect intType, AcGePoint3dArray points,
Adesk::GsMarker thisGsMarker = 0, Adesk::GsMarker otherGsMarker = 0) const;
virtual Acad::ErrorStatus subIntersectWith(const AcDbEntity *pEnt, AcDb::Intersect intType, const AcGePlane& projPlane, AcGePoint3dArray points,
Adesk::GsMarker thisGsMarker = 0, Adesk::GsMarker otherGsMarker = 0) const;
//- Extend the curve.
virtual Acad::ErrorStatus extend (double newParam) ;
virtual Acad::ErrorStatus extend (Adesk::Boolean extendStart, const AcGePoint3d &toPoint) ;
subIntersectWith实际是第二个方法起作用,用于交点判断,
extend实际也是第二个方法起作用,extendStart表示是否起点延伸,toPoint表示延伸到的位置。
浙公网安备 33010602011771号