[求助]利用实时鼠标轨迹画等高线
<p>工作中经常遇到矢量化地形图,主要是等高线的处理,用矢量化软件处理完以后,效果大都很差。所以经常需要手工描线,点的手都酸了,能不能通过编程,就想“画图”程序的画线一样,不用总点鼠标左键,沿着鼠标的轨迹,把等高线画出来?思路如下:</p><p>1、在等高线开始处点一下鼠标左键,按住不放,沿等高线轨迹移动鼠标,在等高线结束处松开鼠标左键。一条等高线即可画完。</p><p>2、编程思路,按一定时间间隔读取鼠标处的地形图坐标,然后把坐标导出到一个文件,再将坐标导入cad画线。</p><p>请大家讨论,并尽可能提供相关源码。lisp和vba即可。</p> <p class="blurb">多谢</p><p class="blurb"></p><p class="blurb">创建一系列徒手画线段</p><div class="infoBurstPara"><img src="ms-its:C:\Program%20Files\AutoCAD%202008\help\acad_acr.chm::/images/ac.keyboard.gif" alt=""/> 命令条目:<em class="strong">sketch</em></div><p><a name="WSfacf1429558a55de8b299cffc1fb20d3-6db"></a>下列信息基于假设数字化仪模式已打开。</p><p class="promptBlock">记录增量 <<em class="mild">当前</em>>: <em class="mild">指定距离或按 </em>ENTER 键</p><p><a name="WSfacf1429558a55de8b299cffc1fb20d3-6da"></a>记录的增量值定义直线段的长度。定点设备移动的距离必须大于记录增量才能生成线段。</p><a name="WS1a9193826455f5ffa23ce210c4a30acaf-536f"></a><div class="figure-anchor"><p><img src="ms-its:C:\Program%20Files\AutoCAD%202008\help\acad_acr.chm::/images/PTDCPM/Spago-ACR/Simplified_Chinese/acw1900u.png" alt=""/></p></div><p><a name="WSfacf1429558a55de8b299cffc1fb20d3-6d9"></a>徒手画被捕捉为一系列独立的线。将 <a href="ms-its:ACAD_ACR.chm::/SKPOLY.htm">SKPOLY</a> 系统变量设置为一个非零值将为每个连续的徒手画线条(而不是为多个线性对象)生成一个多段线。</p><p class="promptBlock">徒手画。<span class="char_link"><a href="ms-its:C:\Program%20Files\AutoCAD%202008\help\acad_acr.chm::/d0e107927.htm#WSc30cd3d5faa8f6d81bca5f1ffc2d61c40-7f6d">画笔(P)</a></span><span class="char_link"><a href="ms-its:C:\Program%20Files\AutoCAD%202008\help\acad_acr.chm::/d0e107927.htm#WSc30cd3d5faa8f6d81bca5f1ffc2d61c40-7f6c"> 退出(X)</a></span><span class="char_link"><a href="ms-its:C:\Program%20Files\AutoCAD%202008\help\acad_acr.chm::/d0e107927.htm#WSc30cd3d5faa8f6d81bca5f1ffc2d61c40-7f6b"> 结束(Q)</a></span><span class="char_link"><a href="ms-its:C:\Program%20Files\AutoCAD%202008\help\acad_acr.chm::/d0e107927.htm#WSc30cd3d5faa8f6d81bca5f1ffc2d61c40-7f6a"> 记录(R)</a></span><span class="char_link"><a href="ms-its:C:\Program%20Files\AutoCAD%202008\help\acad_acr.chm::/d0e107927.htm#WSc30cd3d5faa8f6d81bca5f1ffc2d61c40-7f69"> 删除(E)</a></span><span class="char_link"><a href="ms-its:C:\Program%20Files\AutoCAD%202008\help\acad_acr.chm::/d0e107927.htm#WSc30cd3d5faa8f6d81bca5f1ffc2d61c40-7f68"> 连接(C)</a></span><span class="char_link"><a href="ms-its:C:\Program%20Files\AutoCAD%202008\help\acad_acr.chm::/d0e107927.htm#WSc30cd3d5faa8f6d81bca5f1ffc2d61c40-7f67">。</a></span><em class="mild">输入选项或按指针按钮</em></p><dl><dt><span style="DISPLAY: none;"><a name="WSc30cd3d5faa8f6d81bca5f1ffc2d61c40-7f6d"></a>画笔(拾取按钮)</span></dt><dd><div class="definition"><p><a name="WSfacf1429558a55de8b299cffc1fb20d3-6d8"></a>提笔和落笔。在用定点设备选取菜单项前必须提笔。</p></div></dd></dl><dl><dt><span style="DISPLAY: none;"><a name="WSc30cd3d5faa8f6d81bca5f1ffc2d61c40-7f6c"></a>退出—ENTER(按钮 3)</span>
</dt><dd><div class="definition"><p><a name="WSfacf1429558a55de8b299cffc1fb20d3-6d7"></a>记录及报告临时徒手画线段数并结束命令。</p></div></dd></dl><dl><dt><span style="DISPLAY: none;"><a name="WSc30cd3d5faa8f6d81bca5f1ffc2d61c40-7f6b"></a>结束(按钮 4)</span>
</dt><dd><div class="definition"><p><a name="WSfacf1429558a55de8b299cffc1fb20d3-6d6"></a>放弃从开始调用 SKETCH 命令或上一次使用“记录”选项时所有徒手画临时线段,并结束命令。</p></div></dd></dl><dl><dt><span style="DISPLAY: none;"><a name="WSc30cd3d5faa8f6d81bca5f1ffc2d61c40-7f6a"></a>记录(按钮 2)</span>
</dt><dd><div class="definition"><p><a name="WSfacf1429558a55de8b299cffc1fb20d3-6d5"></a>永久记录临时线段且不改变画笔的位置。用下面的提示报告线段的数量:</p><p class="promptBlock">已记录 nnn 条直线。</p></div></dd></dl><dl><dt><span style="DISPLAY: none;"><a name="WSc30cd3d5faa8f6d81bca5f1ffc2d61c40-7f69"></a>删除(按钮 5)</span>
</dt><dd><div class="definition"><p><a name="WSfacf1429558a55de8b299cffc1fb20d3-6d4"></a>删除临时线段的所有部分,如果画笔已落下则提起画笔。 </p><p class="promptBlock">选择删除端点。 </p></div></dd></dl><dl><dt><span style="DISPLAY: none;"><a name="WSc30cd3d5faa8f6d81bca5f1ffc2d61c40-7f68"></a>连接(按钮 6)</span>
</dt><dd><div class="definition"><p><a name="WSfacf1429558a55de8b299cffc1fb20d3-6d3"></a>落笔,继续从上次所画的线段的端点或上次删除的线段的端点开始画线。</p><p class="promptBlock">连接: 移动到直线端点。</p></div></dd></dl><dl><dt><span style="DISPLAY: none;"><a name="WSc30cd3d5faa8f6d81bca5f1ffc2d61c40-7f67"></a>. (句点)(按钮 1)</span>
</dt><dd><div class="definition"><p><a name="WSfacf1429558a55de8b299cffc1fb20d3-6d2"></a>落笔,从上次所画的直线的端点到画笔的当前位置绘制一条直线,然后提笔。</p></div></dd></dl><!--Element not supported - Type: 8 Name: #comment--> <p>AutoCAD 自带的命令</p><p><font size="2">SKETCH</font></p>
页:
[1]