private void GetFirstPoint() { INumberDialog numDialog = new NumberDialogClass(); // Set first point to the active point which may have been snapped m_firstPoint = m_activePoint; // Get the angle if (numDialog.DoModal("Angle 1", 45, 2, m_editor.Display.hWnd)) { m_firstAngle = numDialog.Value * Math.PI / 180; m_etoolPhase = ToolPhase.SecondPoint; } }
private void GetSecondPoint() { INumberDialog numDialog = new NumberDialogClass(); // Set the second point equal to the active point which may have been snapped m_secondPoint = m_activePoint; // Get the angle if (numDialog.DoModal("Angle 2", -45, 2, m_editor.Display.hWnd)) { m_secondAngle = numDialog.Value * Math.PI / 180; } else { m_etoolPhase = ToolPhase.Inactive; return; } // Get the intersection point IConstructPoint constructPoint = new PointClass(); constructPoint.ConstructAngleIntersection(m_firstPoint, m_firstAngle, m_secondPoint, m_secondAngle); IPoint point = constructPoint as IPoint; if (point.IsEmpty) { m_etoolPhase = ToolPhase.Inactive; MessageBox.Show("No Point Calculated"); return; } // Draw the calculated intersection point and erase previous snap feedback m_activePoint = point; m_etoolPhase = ToolPhase.Intersection; m_snappingFeedback.Update(null, 0); DrawPoint(m_activePoint); }
private void GetSecondPoint() { INumberDialog numDialog = new NumberDialogClass(); // Set the second point equal to the active point which may have been snapped m_secondPoint = m_activePoint; // Get the angle if (numDialog.DoModal("Angle 2", -45, 2, m_editor.Display.hWnd)) { m_secondAngle = numDialog.Value * Math.PI / 180; } else { m_etoolPhase = ToolPhase.Inactive; return; } // Get the intersection point IConstructPoint constructPoint = new PointClass(); constructPoint.ConstructAngleIntersection(m_firstPoint, m_firstAngle, m_secondPoint, m_secondAngle); IPoint point = constructPoint as IPoint; if (point.IsEmpty) { m_etoolPhase = ToolPhase.Inactive; MessageBox.Show("No Point Calculated"); return; } // Draw the calculated intersection point and erase previous snap feedback m_activePoint = point; m_etoolPhase = ToolPhase.Intersection; m_snappingFeedback.Update(null, 0); DrawPoint(m_activePoint); }
private void GetFirstPoint() { INumberDialog numDialog = new NumberDialogClass(); // Set first point to the active point which may have been snapped m_firstPoint = m_activePoint; // Get the angle if (numDialog.DoModal("Angle 1", 45, 2, m_editor.Display.hWnd)) { m_firstAngle = numDialog.Value * Math.PI / 180; m_etoolPhase = ToolPhase.SecondPoint; } }