如何得到选择集的BoundingBox
<P>我是这么搞得,好像太繁了,不知道有没有更好的方法,大家一起讨论一下</P><P>Dim Min_pt(0 To 2) As Double, Max_pt(0 To 2) As Double<BR>Dim Min_t(0 To 2) As Double, Max_t(0 To 2) As Double</P>
<P>For Each sobj In myss</P>
<P> sobj.GetBoundingBox minExt, maxExt<BR> <BR> Min_pt(0) = minExt(0): Min_pt(1) = minExt(1): Min_pt(2) = minExt(2)<BR> Max_pt(0) = maxExt(0): Max_pt(1) = maxExt(1): Max_pt(2) = maxExt(2)<BR><BR> Min_t(0) = minExt(0): Min_t(1) = minExt(1): Min_t(2) = minExt(2)<BR> Max_t(0) = maxExt(0): Max_t(1) = maxExt(1): Max_t(2) = maxExt(2)<BR> If Min_t(0) < Min_pt(0) Then Min_pt(0) = Min_t(0)<BR> If Min_t(1) < Min_pt(1) Then Min_pt(1) = Min_t(1)<BR> If Max_t(0) > Max_pt(0) Then Max_pt(0) = Max_t(0)<BR> If Max_t(1) > Max_pt(1) Then Max_pt(1) = Max_t(1)<BR> <BR> End If<BR> Next</P> 这本身是排序法的使用。在网上你可以搜索一下。
页:
[1]