点在面域中

需要增加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;
}

此条目发表在ObjectArx分类目录。将固定链接加入收藏夹。

发表评论