Hi,
@DavidRutten, @dale
I have created a grasshopper plug-in that takes in a point, which is selected by the user from Rhino view. I then translate this point and redraw the views in the active doc. Nothing changes in Rhino view. Please help me fix this. Thanks.
Here is my code:
public Point3d Point { get; set; }
public double Move_x { get; set; }
protected override void SolveInstance(IGH_DataAccess DA)
{
if (CollectInputData_point(DA) == false) { return; }
CollectInputData_move_x(DA);
var xform1 = Transform.Translation(this.Point.X - this.Move_x, this.Point.Y, this.Point.Z);
this.Point.Transform(xform1);
Rhino.RhinoDoc.ActiveDoc.Views.Redraw();
}
private void CollectInputData_move_x(IGH_DataAccess DA)
{
double tempDouble = 0;
if (!DA.GetData(1, ref tempDouble ))
{
AddRuntimeMessage(GH_RuntimeMessageLevel.Warning, "Failed to receive input for move x");
return;
}
this.Move_x = tempDouble;
}
private bool CollectInputData_point(IGH_DataAccess DA)
{
Point3d temp_point = new Point3d();
if (!DA.GetData(0, ref temp_point))
{
AddRuntimeMessage(GH_RuntimeMessageLevel.Error, "Failed to receive input for point");
return false;
}
this.Point = temp_point;
return true;
}