private void GeometryUtility_OnOsnapPickingItem(object sender, Event.EventManager.OsnapPickingItemEventArgs e) { if (e.Kind != Data.OsnapKind.SURFACE) { return; } AddSurfaceData(true, true, e.Point, e.Normal); DrawLine(e.Point, e.Normal); }
// ================================================ // Event // ================================================ private void GeometryUtility_OnOsnapPickingItem(object sender, Event.EventManager.OsnapPickingItemEventArgs e) { if (e.Kind != VIZCore3D.NET.Data.OsnapKind.POINT) { return; } txtX.Text = e.Point.XToInt32().ToString(); txtY.Text = e.Point.YToInt32().ToString(); txtZ.Text = e.Point.ZToInt32().ToString(); }
private void GeometryUtility_OnOsnapPickingItem(object sender, Event.EventManager.OsnapPickingItemEventArgs e) { StringBuilder sb = new StringBuilder(); sb.AppendLine(string.Format("Kind : {0}", e.Kind.ToString())); sb.AppendLine(string.Format("Point : {0}", e.Point == null ? "" : e.Point.ToString())); sb.AppendLine(string.Format("Start : {0}", e.Start == null ? "" : e.Start.ToString())); sb.AppendLine(string.Format("End : {0}", e.End == null ? "" : e.End.ToString())); sb.AppendLine(string.Format("Center : {0}", e.Center == null ? "" : e.Center.ToString())); sb.AppendLine(string.Format("Normal : {0}", e.Normal == null ? "" : e.Normal.ToString())); txtOsnap.Text = sb.ToString(); }
private void GeometryUtility_OnOsnapPickingItem(object sender, Event.EventManager.OsnapPickingItemEventArgs e) { if (e.Kind != Data.OsnapKind.POINT) { return; } VIZCore3D.NET.Data.Vertex3D v = e.Point; if (String.IsNullOrEmpty(txtV1.Text) == true) { txtV1.Text = v.ToString(); } else { txtV2.Text = v.ToString(); } }
private void GeometryUtility_OnOsnapPickingItem(object sender, Event.EventManager.OsnapPickingItemEventArgs e) { bool visibleOnly = ckVisibleOnly.Checked; bool opaqueOnly = ckOpaqueOnly.Checked; VIZCore3D.NET.Data.Vertex3D point = e.Point; vizcore3d.ShowWaitForm(); vizcore3d.BeginUpdate(); if (ckXPlus.Checked == true) { GetNearestObject(Data.AxisDirection.X_PLUS, point, visibleOnly, opaqueOnly); } if (ckXMinus.Checked == true) { GetNearestObject(Data.AxisDirection.X_MINUS, point, visibleOnly, opaqueOnly); } if (ckYPlus.Checked == true) { GetNearestObject(Data.AxisDirection.Y_PLUS, point, visibleOnly, opaqueOnly); } if (ckYMinus.Checked == true) { GetNearestObject(Data.AxisDirection.Y_MINUS, point, visibleOnly, opaqueOnly); } if (ckZPlus.Checked == true) { GetNearestObject(Data.AxisDirection.Z_PLUS, point, visibleOnly, opaqueOnly); } if (ckZMinus.Checked == true) { GetNearestObject(Data.AxisDirection.Z_MINUS, point, visibleOnly, opaqueOnly); } vizcore3d.Object3D.Select(Data.Object3dSelectionModes.DESELECT_ALL); vizcore3d.EndUpdate(); vizcore3d.CloseWaitForm(); }