NW之模型的快速、平滑定位

来源:互联网 发布:mac电脑的顿号怎么打 编辑:程序博客网 时间:2024/05/24 02:58

在查看模型的过程中,我们常会用到模型定位,下面我介绍两种模型定位的扩展方法。

快速定位

/// <summary>/// 快速缩放./// </summary>/// <param name="items">The items.</param>public static void FastZoom(this IEnumerable<ModelItem> items){    Document doc = Application.ActiveDocument;    doc.CurrentSelection.CopyFrom(items);    ComApiBridge.State.ZoomInCurViewOnCurSel();    if (!doc.CurrentSelection.IsEmpty)        doc.CurrentSelection.Clear();}

平滑定位

/// <summary>/// 平滑缩放./// </summary>/// <param name="items">The items.</param>public static void SmoothZoom(this IEnumerable<ModelItem> items){    Document doc = Application.ActiveDocument;    doc.CurrentSelection.CopyFrom(items);    Autodesk.Navisworks.Api.Interop.LcRmAutoCAM.OnZoomSelected();    if (!doc.CurrentSelection.IsEmpty)        doc.CurrentSelection.Clear();}

不同的定位方式会带来不同的效果。

0 0
原创粉丝点击