protected override void OnMouseMove3DAction(Mouse3DPosition mouseData)
        {
            SetCoordinate(mouseData.Point);

            if (Points.Count < 2)
            {
                WriteTextOnPos(mouseData.Initial2Dx, mouseData.Initial2Dy, mouseData.Point.ToString() + "\nLength: " + "\nAngle:");
                return;
            }
            PreviewLine();
            WriteTextOnPos(mouseData.Initial2Dx, mouseData.Initial2Dy, mouseData.Point.ToString() + "\nLength: " + Points[0].Distance(Points[1]).ToString("{0.##}")
                           + "\nAngle:" + (NodeBuilderUtils.GetArcAngle(Points[0], Points[1], new NodeBuilder(sketchNode)) * 180 / Math.PI).ToString("{0.##}"));
            Hinter2D.Preview(PreviewDocument);
            UpdateView();
        }
Example #2
0
 protected override void OnMouseMove3DAction(Mouse3DPosition mouseData)
 {
     WriteTextOnPos(mouseData.Initial2Dx, mouseData.Initial2Dy, mouseData.Point.ToString() + "\nRadius: " + "\nStartAngle: " + "\nEnd Angle: " + "\nInternal Angle: ");
     SetCoordinate(mouseData.Point);
     if (Points.Count < 2)
     {
         return;
     }
     if (Points.Count == 2)
     {
         WriteTextOnPos(mouseData.Initial2Dx, mouseData.Initial2Dy, mouseData.Point.ToString() + "\nRadius: " + Points[1].Distance(Points[0]).ToString("{0.##}") +
                        "\nStartAngle: " + (NodeBuilderUtils.GetArcAngle(Points[0], mouseData.Point, new NodeBuilder(sketchNode)) * 180 / Math.PI).ToString("{0.##}") + "\nEnd Angle: " + "\nInternal Angle: ");
         PreviewCircle();
     }
     else if (Points.Count == 3)
     {
         PreviewArc();
         WriteTextOnPos(mouseData.Initial2Dx, mouseData.Initial2Dy, mouseData.Point.ToString() + "\nRadius: " + Points[1].Distance(Points[0]).ToString("{0.##}") +
                        "\nStartAngle: " + (NodeBuilderUtils.GetArcAngle(Points[0], Points[1], new NodeBuilder(sketchNode)) * 180 / Math.PI).ToString("{0.##}") +
                        "\nEnd Angle: " + (NodeBuilderUtils.GetArcAngle(Points[0], Points[2], new NodeBuilder(sketchNode)) * 180 / Math.PI).ToString("{0.##}") +
                        "\nInternal Angle: " + NodeBuilderUtils.GetInternalAngle(Points[0], Points[1], Points[2], sketchNode).ToString("{0.##}"));
     }
     UpdateView();
 }