fjfhgdwfn 发表于 2006-1-15 11:47:00

[求助]如何得到两条多义线的交点

<P>任意两条多义线,如何得到他们的交点.</P>
<P>或直接求两条多义线的面积(主要用于公路中填挖面积的计算)</P>

fjfhgdwfn 发表于 2006-1-17 10:20:00

&nbsp;Dim intPoints As Variant<BR>&nbsp;&nbsp;&nbsp; intPoints = lineobj.IntersectWith(circleobj, acExtendNone)<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; ' Print all the intersection points<BR>&nbsp;&nbsp;&nbsp; Dim I As Integer, j As Integer, k As Integer<BR>&nbsp;&nbsp;&nbsp; Dim str As String<BR>&nbsp;&nbsp;&nbsp; If VarType(intPoints) &lt;&gt; vbEmpty Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For I = LBound(intPoints) To UBound(intPoints)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; str = "Intersection Point[" &amp; k &amp; "] is: " &amp; intPoints(j) &amp; "," &amp; intPoints(j + 1) &amp; "," &amp; intPoints(j + 2)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MsgBox str, , "IntersectWith Example"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; str = ""<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I = I + 2<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; j = j + 3<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; k = k + 1<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next<BR>&nbsp;&nbsp;&nbsp; End If

yuangw1234 发表于 2006-4-11 12:35:00

<P>&nbsp;2桉的方法好象不行,能否再更新一下,运行时会提示每二行的问题“此处需要物体”</P>
<P>本人也在找一个求多边形各顶点的方法,不知道可否赐教,多谢</P>

雪山飞狐_lzh 发表于 2006-4-11 15:50:00

<P>看看这里</P>
<P><A href="http://www.mccad.net/bbs/dispbbs.asp?BoardID=3&amp;replyID=53144&amp;id=26425&amp;skin=0" target="_blank" >http://www.mccad.net/bbs/dispbbs.asp?BoardID=3&amp;replyID=53144&amp;id=26425&amp;skin=0</A></P>
页: [1]
查看完整版本: [求助]如何得到两条多义线的交点