예제 #1
0
        ///<summary> This gets called when when the user runs this command.</summary>
        public override IRhinoCommand.result RunCommand(IRhinoCommandContext context)
        {
            On3dPoint        center   = new On3dPoint(OnUtil.On_origin);
            OnSphere         sphere   = new OnSphere(center, 5.0);
            OnMesh           mesh     = RhUtil.RhinoMeshSphere(sphere, 10, 10);
            MRhinoMeshObject mesh_obj = context.m_doc.AddMeshObject(mesh);

            context.m_doc.Redraw();

            MRhinoGetString gs = new MRhinoGetString();

            gs.SetCommandPrompt("Press <Enter> to continue");
            gs.AcceptNothing();
            gs.GetString();

            context.m_doc.DeleteObject(new MRhinoObjRef(mesh_obj));
            context.m_doc.Redraw();

            return(IRhinoCommand.result.success);
        }