yswoyh 发表于 2009-8-31 13:32:00

请问明总已知园的两端坐标和弧长计算半径和圆心坐标???

本帖最后由 作者 于 2009-9-1 18:15:23 编辑 <br /><br /> <p>请问!如何改变封闭线顶点的起点</p><p>比如原先1为起点,通过在图内选择,我想改变线的起点</p><p>如何做,用什么方法????谢谢</p>

雪山飞狐_lzh 发表于 2009-8-31 15:46:00

http://www.mjtd.com/object/acad2004/ex_coordinate.htm

yswoyh 发表于 2009-8-31 17:09:00

<p>我没有说清楚!线为封闭区域,线个顶点坐标不变,将起点更改为模型空间里选取点</p><p>如下图</p><p>&nbsp;</p>

雪山飞狐_lzh 发表于 2009-8-31 17:32:00

http://www.mjtd.com/object/acad2004/idh_coordinates.htm

yswoyh 发表于 2009-8-31 17:56:00

<p>再问一个问题,在输出封闭区域坐标的时候,如果有圆弧,怎么确定圆弧(起点,弧长,端点),我试了一下“凸度”没有搞明白,谢谢飞狐大侠!!</p><p>Sub test()<br/>&nbsp;&nbsp;&nbsp;&nbsp; Dim X As Double, y As Double, Z As Double<br/>&nbsp;&nbsp;&nbsp;&nbsp; Dim n As Long<br/>&nbsp;&nbsp;&nbsp;&nbsp; n = ThisDrawing.ModelSpace.Count</p><p>&nbsp;&nbsp;&nbsp;&nbsp; Dim Pt As Variant<br/>&nbsp;&nbsp;&nbsp;&nbsp; Pt = ThisDrawing.Utility.GetPoint(, "指定内部点: ")<br/>&nbsp;&nbsp;&nbsp;&nbsp; ThisDrawing.SendCommand "_-Boundary" &amp; vbCr &amp; Pt(0) &amp; "," &amp; Pt(1) &amp; vbCr &amp; vbCr</p><p>&nbsp;&nbsp;&nbsp;&nbsp; Dim lwpLineObj As AcadLWPolyline<br/>&nbsp;&nbsp;&nbsp;&nbsp; If ThisDrawing.ModelSpace.Count &gt; n Then<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set lwpLineObj = ThisDrawing.ModelSpace.Item(ThisDrawing.ModelSpace.Count - 1)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'MsgBox "面积" &amp; Format(lwpLineObj.Area, "0.000") &amp; "平方米"<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'lwpLineObj.Delete<br/>&nbsp;&nbsp;&nbsp;&nbsp; Else<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MsgBox "未发现有效的边界"<br/>&nbsp;&nbsp;&nbsp;&nbsp; End If<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim i As Long, num As Long<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim retCoord As Variant<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; num = 0<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; retCoord = lwpLineObj.Coordinates<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; num = (UBound(retCoord) - LBound(retCoord) + 1) / 2<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For i = 0 To num - 1<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;X = retCoord(2 * i + 1)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;y = retCoord(2 * i)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;MsgBox ("X=" &amp; X &amp; "&nbsp; " &amp; "Y=" &amp; y)</p><p>怎么判断是圆弧,并把圆弧的数据读出???????????&nbsp; 谢谢了<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next i<br/>End Sub</p>

雪山飞狐_lzh 发表于 2009-8-31 18:05:00

http://bbs.mjtd.com/forum.php?mod=viewthread&tid=4022<br/>http://www.mjtd.com/object/acad2004/idh_getbulge.htm<br/>

yswoyh 发表于 2009-9-1 18:16:00

请问明总已知园的两端坐标和弧长计算半径和圆心坐标???

mccad 发表于 2009-9-1 21:38:00

这个问题要放到几何算法版块去了。
页: [1]
查看完整版本: 请问明总已知园的两端坐标和弧长计算半径和圆心坐标???