先用AcDbCurve getClosestPointTo 取得线上最近点, virtual Acad::ErrorStatus getClosestPointTo(const AcGePoint3d& givenPnt,AcGePoint3d& pointOnCurve,Adesk::Boolean extend = Adesk::kFalse) const; 作一条射线(AcDbRayAcDbRay),以givenPnt为起点,取向量(pointOnCurve-givenPnt)为方向,看该射线与多段线有无交点,有交点侧在封闭线内,无交点则在封闭线外 |