需要增加brep库,否则编译不通过
BOOL PointInRegion(AcDbRegion *pRegion, AcGePoint3d Pt)
{
if (pRegion == NULL)
return FALSE;
AcBrBrep brep;
if (brep.set(*pRegion) != AcBr::eOk)
return FALSE;
AcBr::Relation relation;
AcBr::ErrorStatus esbr = brep.getPointRelationToBrep(Pt, relation);
if (esbr != AcBr::eOk)
return FALSE;
if ((relation == AcBr::kBoundary) ||
(relation == AcBr::kInside))
{
return TRUE;
}
return FALSE;
}