Exemplo n.º 1
0
        protected override Result RunCommand(RhinoDoc doc, RunMode mode)
        {
            var geometry = SampleCsGeometryBaseClipboardHelper.Read();

            if (null == geometry)
            {
                RhinoApp.WriteLine("Nothing to paste.");
                return(Result.Nothing);
            }

            doc.Objects.Add(geometry);
            doc.Views.Redraw();

            return(Result.Success);
        }
Exemplo n.º 2
0
        protected override Result RunCommand(RhinoDoc doc, RunMode mode)
        {
            var sphere = new Sphere(Plane.WorldXY, 5.0);
            var brep   = sphere.ToBrep();

            var rc = SampleCsGeometryBaseClipboardHelper.Write(brep);

            if (rc)
            {
                //Console.WriteLine("{0} copied to the Windows Clipboard", brep.ObjectType);
                RhinoApp.WriteLine("{0} copied to the Windows Clipboard", brep.ObjectType);
            }

            return(Result.Success);
        }