- 积分
- 90
- 明经币
- 个
- 注册时间
- 2010-5-12
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
根據選擇的List得到所選圖形中的最高點和最低點,返回一條線段
- Private Function GetMaxAndMinPoint(List As VISIList, Blist As VISIList) As VISISegment
- Dim el As New VISIElement
- Dim el1 As New VISIElement
- Dim geo As New VISIGeo
- Dim db As New VISIDatabase
- Dim Elist As New VISIList
- Dim Segm As New VISISegment
- Dim count As Long
- count = List.count
-
- Elist.Init 10, LTYPE_ELEM
-
- For i = 1 To count
- db.WorkDBKey = List.Item(i)
- db.GetElement
- Elist.AddItem db.WorkElement
- Next i
-
- el.Type = DB_POINT
- el1.Type = DB_POINT
-
- geo.OperationCode = VGEO_BOUNDINGBOX
-
- geo.elementlist = Elist
- geo.BodyList = Blist
- geo.Execute
-
- If (geo.LastError = V_NOERROR) Then
- Set el = geo.result.Item(1)
- Segm.P1.Put el.Data.x, el.Data.y, el.Data.z
-
- Set el1 = geo.result.Item(2)
- Segm.P2.Put el1.Data.x, el1.Data.y, el1.Data.z
-
- End If
- Set GetMaxAndMinPoint = Segm
- End Function
|
|