zoukankan      html  css  js  c++  java
  • ObjectARX自定义实体实现TR(TRIM)命令

    ObjectARX自定义实体需要重载实现subIntersectWith和getSplitCurves方法。

    // 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;
    
    //- Closest point on curve.
    virtual Acad::ErrorStatus getClosestPointTo (const AcGePoint3d givenPnt, AcGePoint3d pointOnCurve, Adesk::Boolean extend =Adesk::kFalse) const ;
    virtual Acad::ErrorStatus getClosestPointTo (const AcGePoint3d givenPnt, const AcGeVector3d direction, AcGePoint3d pointOnCurve, Adesk::Boolean extend =Adesk::kFalse) const ;
    
    //- Get split copies of the curve.
    virtual Acad::ErrorStatus getSplitCurves (const AcGeDoubleArray &params, AcDbVoidPtrArray &curveSegments) const ;
    virtual Acad::ErrorStatus getSplitCurves (const AcGePoint3dArray &points, AcDbVoidPtrArray &curveSegments) const ;
    

     subIntersectWith实际是第二个方法起作用,用于交点判断,

    getClosestPointTo用于最近点判断,如果少了这个函数,将会删除裁剪返回的所有实体。

    getSplitCurves返回裁剪后的实体。

  • 相关阅读:
    高效能人士懂得忽视,知道怎样说“不”
    CheckBoxPreference组件
    SQL基础--> 约束(CONSTRAINT)
    html5--6-7 CSS选择器4
    html5--6-6 CSS选择器3
    html5--6-5 CSS选择器2
    html5--6-4 CSS选择器
    html5--6-3 CSS语法2
    html5--6-2 CSS语法
    html5--6-1 引入外部样式表
  • 原文地址:https://www.cnblogs.com/ztcad/p/13808458.html
Copyright © 2011-2022 走看看