Hi,
its possible to implement Undo/Redo feature inside command. For example, in class Rhino.Input.Custom.GetPoint, when I get a lot of points in the loop, I wanna to implement undo/redo for single point. Just as in the Polyline command in Rhino.
Thanks,
I know, but my Command code looks like this:
// Rhino.Input.Custom.GetPoint Class
gcp = new GetCircleRadiusPoint(new Point3d(0,0,0),gmeshes,block,window);
gcp.AcceptUndo(true);
gcp.SetCommandPrompt("Point o object (Press ESC or ENTER to cancel...)");
gcp.Constrain(gmeshes, false);
for(;;)
{
// Begin undo Record
gcp.Get(true); //get points while left mouse button is up
// End undo Record
if (gcp.CommandResult() == Result.Cancel)
{
break;
}
}
This command get points on Mesh while user press Enter o Esc. Undo works only on whole Command,
I do not know how to write code to Undo work in each call on gcp.Get () method;