- 积分
- 24557
- 明经币
- 个
- 注册时间
- 2004-3-17
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2005-5-16 23:24:00
|
显示全部楼层
用该多边形生成面域,再用下面的函数判断- function PointInRegion(ByVal TlsRegion, ByVal Point) As Boolean
- '判断点是否在面域内
- Dim pCopy As AcadRegion, pRegion As AcadRegion
- Dim pobjs(0) As AcadEntity
- Set pCopy = TlsRegion.Copy
- Set pobjs(0) = pWorkSpace.AddCircle(Point, 0.0001)
- Set pRegion = pWorkSpace.AddRegion(pobjs)(0)
- pRegion.Boolean acIntersection, pCopy
- If pRegion.Area > 0 Then PointInRegion = True
- pRegion.Delete
- pobjs(0).Delete
-
- End Function
|
|