# 用python呼叫點偏差集合

**URL:** <https://cn.discourse.mcneel.com/t/topic/1447>\
**Category:** Rhino for Windows\
**Created:** [2019年二月15日 05:50 UTC](https://cn.discourse.mcneel.com/t/topic/1447 "2019-02-15T05:50:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pig6485](https://sea3.discourse-cdn.com/mcneel/user_avatar/cn.discourse.mcneel.com/pig6485/32/1966_2.png) [@pig6485](https://cn.discourse.mcneel.com/u/pig6485)\
**Post date:** [2019年二月15日 05:50 UTC](https://cn.discourse.mcneel.com/t/topic/1447/1 "2019-02-15T05:50:34Z")

</div>

請問有辦法直接使用script呼叫PointDeviation並獲取他所計算的統計值而不顯示dialog嗎?

---

<div class="post-metadata">

**Author:** ![Jorin](https://sea3.discourse-cdn.com/mcneel/user_avatar/cn.discourse.mcneel.com/jorin/32/3292_2.png) [@Jorin](https://cn.discourse.mcneel.com/u/Jorin)\
**Post date:** [2019年二月15日 10:47 UTC](https://cn.discourse.mcneel.com/t/topic/1447/2 "2019-02-15T10:47:10Z")

</div>

正常来讲，通过巨集调用指令时，指令的对话框是可以关掉的（在指令前加 - 就可以关闭对话框），但是 PointDeviation 指令最后显示出来的那个不算是一个对话框，它是一个面板，和 Rhino 中右侧的其他面板是一样的东西（例如：属性面板、材质面板、灯光面板等），所以没有办法关掉不显示，调用这个指令就会自动切换到该面板。

所以通过 Python 无法实现直接调用 Rhino 的 PointDeviation 指令而不显示面板。

所有的脚本都用 PythonScript 来写倒是可以实现相应的效果。思路是把 test points 放入一个列表，然后和目标物件去求距离，然后为 test points 赋予不同的颜色。

---

<div class="post-metadata">

**Author:** ![pig6485](https://sea3.discourse-cdn.com/mcneel/user_avatar/cn.discourse.mcneel.com/pig6485/32/1966_2.png) [@pig6485](https://cn.discourse.mcneel.com/u/pig6485)\
**Post date:** [2019年二月15日 11:51 UTC](https://cn.discourse.mcneel.com/t/topic/1447/3 "2019-02-15T11:51:12Z")

</div>

謝謝
