Exemplo n.º 1
0
    protected override Rhino.Commands.Result RunCommand(RhinoDoc doc, Rhino.Commands.RunMode mode)
    {
      var conduit = new PointsConduit(m_conduit_points);
      conduit.Enabled = true;

      var gp = new Rhino.Input.Custom.GetPoint();
      while (true)
      {
        gp.SetCommandPrompt("click location to create point. (<ESC> exit)");
        gp.AcceptNothing(true);
        gp.Get();
        if (gp.CommandResult() != Rhino.Commands.Result.Success)
          break;
        m_conduit_points.Add(new ConduitPoint(gp.Point()));
        doc.Views.Redraw();
      }

      var gcp = new GetConduitPoint(m_conduit_points);
      while (true)
      {
        gcp.SetCommandPrompt("select conduit point. (<ESC> to exit)");
        gcp.AcceptNothing(true);
        gcp.Get(true);
        doc.Views.Redraw();
        if (gcp.CommandResult() != Rhino.Commands.Result.Success)
          break;
      }

      return Rhino.Commands.Result.Success;
    }
Exemplo n.º 2
0
        protected override Rhino.Commands.Result RunCommand(RhinoDoc doc, Rhino.Commands.RunMode mode)
        {
            var conduit = new PointsConduit(m_conduit_points);

            conduit.Enabled = true;

            var gp = new Rhino.Input.Custom.GetPoint();

            while (true)
            {
                gp.SetCommandPrompt("click location to create point. (<ESC> exit)");
                gp.AcceptNothing(true);
                gp.Get();
                if (gp.CommandResult() != Rhino.Commands.Result.Success)
                {
                    break;
                }
                m_conduit_points.Add(new ConduitPoint(gp.Point()));
                doc.Views.Redraw();
            }

            var gcp = new GetConduitPoint(m_conduit_points);

            while (true)
            {
                gcp.SetCommandPrompt("select conduit point. (<ESC> to exit)");
                gcp.AcceptNothing(true);
                gcp.Get(true);
                doc.Views.Redraw();
                if (gcp.CommandResult() != Rhino.Commands.Result.Success)
                {
                    break;
                }
            }

            return(Rhino.Commands.Result.Success);
        }