其他分享
首页 > 其他分享> > 判断点是否位于面域上

判断点是否位于面域上

作者:互联网

private PointContainment GetPointContainment(Region region, Point3d point)
{
PointContainment result = PointContainment.Outside;//在外部
//PointContainment result = PointContainment.Inside;//在内部
//PointContainment result = PointContainment.OnBoundary;//在边界
using (Brep brep = new Brep(region))
{
if (brep != null)
{
using (BrepEntity ent = brep.GetPointContainment(point, out result))
{
if (ent is Autodesk.AutoCAD.BoundaryRepresentation.Face)
{
result = PointContainment.Inside;
}
}
}
}
return result;
}

标签:GetPointContainment,判断,point,是否,ent,result,PointContainment,面域,brep
来源: https://www.cnblogs.com/kiker/p/16531002.html