Click or drag to resize

GeometryUtilityManagerOnOsnapPickingItem Event

선택한 Osnap 측정 Item 정보 반환 이벤트

Namespace:  VIZCore3D.NET.Manager
Assembly:  VIZCore3D.NET (in VIZCore3D.NET.dll) Version: 2.8.24.1104 (2.8.24.1104)
Syntax
C#
public event OsnapPickingItemEventHandler OnOsnapPickingItem

Value

Type: OsnapPickingItemEventHandler
Examples
C#
// VIZCore3D.NET Control
private VIZCore3D.NET.VIZCore3DControl vizcore3d;

private void Example()
{
    List<VIZCore3D.NET.Data.Node> items =
        vizcore3d.Object3D.FromFilter(
            VIZCore3D.NET.Data.Object3dFilter.SELECTED_TOP
            );

    if (items.Count == 0) return;

    vizcore3d.GeometryUtility.OnOsnapPickingItem += GeometryUtility_OnOsnapPickingItem;

    vizcore3d.GeometryUtility.ShowOsnap(
        items[0].Index  /* Node Index */
        , false         /* Item : Surface */
        , true          /* Item : Vertex */
        , true          /* Item : Line */
        , true          /* Item : Circle */
        );
}

private void GeometryUtility_OnOsnapPickingItem(object sender, VIZCore3D.NET.Event.EventManager.OsnapPickingItemEventArgs e)
{
    // 선택한 부재의 인덱스
    int nodeIndex = e.NodeIndex;

    VIZCore3D.NET.Data.OsnapKind kind = e.Kind;
    VIZCore3D.NET.Data.Vertex3D point = e.Point;
    VIZCore3D.NET.Data.Vertex3D start = e.Start;
    VIZCore3D.NET.Data.Vertex3D end = e.End;
    VIZCore3D.NET.Data.Vertex3D normal = e.Normal;
}
See Also