GeometryUtilityManagerOnOsnapPickingItem Event |
Namespace: VIZCore3D.NET.Manager
public event OsnapPickingItemEventHandler OnOsnapPickingItem
// 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; }