[分享] AcDbRegion 和 AdDbPolyline 使用 intersectWith 方法时的 Bug 解决方法
如果 pEnt1 为 AcDbRegion ,pEnt2 为 AcDbPolylinepEnt1->intersectWith(pEnt2,Intersect::kOnBothOperands,pts);
此时交点为 nil,解决方法,交换顺序
AcGePoint3dArray pts;
Acad::ErrorStatus es=pEnt1->intersectWith(pEnt2,Intersect::kOnBothOperands,pts);
if (es!=Acad::eOk)
{
return RTNORM;
}
if (pts.logicalLength()==0)
{
pts.setLogicalLength(0);
pts.setPhysicalLength(0);
es=pEnt2->intersectWith(pEnt1,Intersect::kOnBothOperands,pts);
}
if (es!=Acad::eOk)
{
return RTNORM;
}
使用下列函授解决了!
ACDB采用PORT ADESK采用SEALED采用VIRTUAL Acad::ErrorStatus intersectWith(
const AcDbEntity* pEnt,
AcDb::Intersect intType,
const AcGePlane& projPlane,
AcGePoint3dArray& points,
Adesk::GsMarker thisGsMarker = 0,
Adesk::GsMarker otherGsMarker = 0
) const;
页:
[1]