private void drawCircle(DrawContext dc, DrawPen pen) { if (PointList.Count == 0) { return; } if (PointList.Count == 1) { dc.Drawing.DrawCross(pen, PointList[0].vector, 2); if (PointList[0].Selected) { dc.Drawing.DrawSelectedPoint(PointList[0].vector, dc.GetPen(DrawTools.PEN_SELECT_POINT)); } return; } Vector3d normal = CadMath.Normal(PointList[0].vector, PointList[2].vector, PointList[1].vector); CircleExpander.Draw(PointList[0], PointList[1], PointList[2], 32, dc, pen); double size = dc.DevSizeToWoldSize(4); dc.Drawing.DrawCross(pen, PointList[0].vector, size); }
public override void DrawTemp(DrawContext dc, CadVertex tp, DrawPen pen) { if (PointList.Count <= 0) { return; } CadVertex cp = PointList[0]; CadVertex a = tp; CadVertex b = new CadVertex(getRP(dc, cp, tp, true)); CadVertex c = -(a - cp) + cp; CadVertex d = -(b - cp) + cp; CircleExpander.Draw(cp, a, b, 32, dc, pen); dc.Drawing.DrawLine(pen, cp.vector, a.vector); dc.Drawing.DrawLine(pen, cp.vector, b.vector); dc.Drawing.DrawLine(pen, cp.vector, c.vector); dc.Drawing.DrawLine(pen, cp.vector, d.vector); }