阅读:2155回复:4
关于弧线工具。求助!!!
<P>ARCMAP的编辑工具---草图工具-----弧线工具。在图形窗口定义第一点,作为圆弧的起点,定义第二点作为圆弧的轴线。在定义第三点做为圆弧的终点。请问定义终点的时候怎么确定圆弧的弧长?或者说怎么确定弧线的拱高??ARCMAP里面有提供输入弧线数据的功能没有??请教大吓。。。</P><img src="images/post/smile/dvbbs/em02.gif" /><img src="images/post/smile/dvbbs/em02.gif" /><img src="images/post/smile/dvbbs/em02.gif" /><img src="images/post/smile/dvbbs/em12.gif" /><img src="images/post/smile/dvbbs/em12.gif" /><img src="images/post/smile/dvbbs/em12.gif" />
|
|
1楼#
发布于:2004-07-16 12:00
<P>arcmap提供几种arc的绘制方法</P>
<P>下面是例子里的一个东东</P> <H1> <H1 ><FONT face=宋体>IEllipticArc Example<p></p></FONT></H1><PRE><FONT size=3><FONT face=宋体> Public Sub Test()<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> ' Get the Application Handle and the display<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> Dim pMxApp As IMxApplication, pSDisplay As IScreenDisplay<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> Set pMxApp = MxApplication<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> Set pSDisplay = pMxApp.Display<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> <p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> 'Use IEllipticArc.PutCoords to Input the Center, Start and End points to create an EllipticArc.<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> Dim pCPt As IPoint, pSPt As IPoint, pEPt As IPoint<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> <p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> Set pSPt = eCreatePoint(100, 100)<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> Set pCPt = eCreatePoint(250, 100)<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> Set pEPt = eCreatePoint(400, 100)<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> <p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> Dim pEllipticArc As IEllipticArc<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> Set pEllipticArc = New EllipticArc<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> <p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> 'Draw a Elliptic arc with Solid line symbol.<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> pEllipticArc.PutCoords False, pCPt, pSPt, pEPt, 3.14, 1 / 3, esriArcClockwise<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> DisplayArc pMxApp, pSDisplay, pEllipticArc, esriSLSSolid<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> <p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> 'Use IEllipticArc.QueryCoords to get the statistics of the elliptic arc.<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> <p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> Dim pEArc As IEllipticArc<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> Set pEArc = pEllipticArc<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> Dim NL As String, TB As String<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> NL = Chr(13) ; Chr(10) ' Define newline.<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> TB = Chr(9) ' Define tab<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> <p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> MsgBox "The statistics of the Elliptic arc are: " + NL + _<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> "Center Point : " + NL + _<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> " X coord: " + TB + Str(pEArc.CenterPoint.x) + NL + _<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> " Y coord: " + TB + Str(pEArc.CenterPoint.y) + NL + _<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> "IsCircular: " + TB + Str(pEArc.IsCircular) + NL + _<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> "From Angle: " + TB + Str(pEArc.fromAngle(False)) + NL + _<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> "Central Angle: " + TB + Str(pEArc.CentralAngle) + NL + _<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> "To Angle: " + TB + Str(pEArc.ToAngle(False)) + NL + _<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> "IsLine: " + TB + Str(pEArc.IsLine) + NL + _<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> "IsPoint: " + TB + Str(pEArc.IsPoint) + NL + _<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> "IsMinor: " + TB + Str(pEArc.isMinor) + NL + _<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> "IsCCW: " + TB + Str(pEArc.IsCounterClockwise)<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> <p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> End Sub<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> <p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> Public Function eSimpleLine(currStyle) As ISimpleLineSymbol<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> Set eSimpleLine = New SimpleLineSymbol<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> eSimpleLine.Style = currStyle<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> End Function<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> <p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> Public Sub DisplayArc(pMxApp As IMxApplication, pSDisplay As IScreenDisplay, pEArc As IEllipticArc, currStyle)<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> Dim lOldActiveCache As Long<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> lOldActiveCache = pSDisplay.ActiveCache<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> <p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> 'Add the new arc to a segment collection.<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> Dim pSeg As ISegment<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> Set pSeg = pEArc<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> <p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> Dim pPolyline As ISegmentCollection<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> Set pPolyline = New Polyline<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> pPolyline.AddSegment pSeg<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> With pSDisplay<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> .ActiveCache = esriNoScreenCache ' esriNoScreenCache = -1<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> .StartDrawing pMxApp.Display.hDC, esriNoScreenCache<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> <p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> .SetSymbol eSimpleLine(currStyle)<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> .DrawPolyline pPolyline<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> <p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> .FinishDrawing<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> .ActiveCache = lOldActiveCache<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> End With<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> End Sub<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> <p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> Public Function eCreatePoint(x As Double, y As Double) As IPoint<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> Set eCreatePoint = New Point<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> eCreatePoint.PutCoords x, y<p></p></FONT></FONT></PRE><PRE><FONT size=3><FONT face=宋体> End Function<p></p></FONT></FONT></PRE></H1><CODE><PRE> </PRE></CODE> [此贴子已经被作者于2004-7-16 12:05:26编辑过]
|
|
|
2楼#
发布于:2004-07-16 14:30
看看先。。<img src="images/post/smile/dvbbs/em01.gif" />
|
|
3楼#
发布于:2004-07-16 14:38
斑竹ARCMAP里面有没有直接输入参数,确定弧线的弧长等的功能啊??<img src="images/post/smile/dvbbs/em01.gif" /><img src="images/post/smile/dvbbs/em01.gif" />
|
|
4楼#
发布于:2008-03-21 10:39
学习以下。。。。。。
|
|