userzhl 发表于 2008-8-1 12:45:00

[求助]请教高手一个关于“坐标”的问题。

<p>坐标由变成后,下面这段程序就会出错,哪位高手帮忙解决一下?</p><p>(SETQ PT1 (GETPOINT "\n请确定起点 :"))<br/>(SETQ PT2 (GETPOINT PT1 "\n请确定终点 :"))<br/>(SETQ PT1 (POLAR PT1 (ANGLE PT2 PT1) 4))<br/>(SETQ PT5 (POLAR PT1 (ANGLE PT1 PT2) 10))<br/>(entmake (list<br/>'(0 . "LINE") '(100 . "AcDbEntity") '(100 . "AcDbLine")<br/>(cons 10 pt1) (cons 11 pt5)<br/>))</p>

userzhl 发表于 2008-8-1 15:25:00

<p>也就是:在非世界坐标系中标注值的问题。</p>

hb_xiaofen 发表于 2008-8-1 16:46:00

对象扩展数据的使用

本帖最后由 作者 于 2008-8-1 16:49:31 编辑 <br /><br /> <p>绘图前把坐标转换成世界坐标就可以了 利用函数(trans pt from to )&nbsp;&nbsp;用法查看帮助 </p><p></p>

hb_xiaofen 发表于 2008-8-1 16:48:00

<p class="cr_leadin" id="crleadin">Translates a point (or a displacement) from one coordinate system to another</p><pre class="prog_in_end">(trans pt from to )   </pre><p class="body">Arguments</p><p class="define_head">pt</p><p class="define_text">A list of three reals that can be interpreted as either a 3D point or a 3D displacement (vector).</p><p class="define_head">from</p><p class="define_text">An integer code, entity name, or 3D extrusion vector identifying the coordinate system in which pt is expressed. The integer code can be one of the following:</p><p class="define_text">0 World (WCS)</p><p class="define_text">1 User (current UCS)</p><p class="define_text">2 If used with code 0 or 1, this indicates the Display Coordinate System (DCS) of the current viewport. When used with code 3, it indicates the DCS of the current model space viewport.</p><p class="define_text">3 Paper space DCS (used only with code 2)</p><p class="define_head">to</p><p class="define_text">An integer code, entity name, or 3D extrusion vector identifying the coordinate system of the returned point. See the from argument for a list of valid integer codes.</p><p class="define_head">disp</p><p class="define_text">If present and is not nil, this argument specifies that pt is to be treated as a 3D displacement rather than as a point.</p>

userzhl 发表于 2008-8-1 17:03:00

<p>我知道这个,但不知道怎么用呀</p>

byghbcx 发表于 2008-8-1 17:46:00

<p>加上</p><p>(setq pt1 (trans pt1 1 0))<br/>(setq pt5 (trans pt5 1 0))</p>

userzhl 发表于 2008-8-3 07:40:00

非常感谢<strong><font face="Verdana" color="#61b713">byghbcx.</font></strong>

userzhl 发表于 2008-8-5 07:42:00

还有一个问题,想问大家,为什么在布局空间的视口里执行不了?
页: [1]
查看完整版本: [求助]请教高手一个关于“坐标”的问题。