/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { string P = null; if (!DA.GetData(0, ref P)) { return; } Bitmap bitmap = GetBitmap.GetBitmapFromFile(P); DA.SetData(0, new Image(bitmap)); }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { string P = String.Empty; if (!DA.GetData(0, ref P)) { return; } Plane plane = Plane.WorldXY; if (!DA.GetData(1, ref plane)) { return; } Bitmap bitmap = GetBitmap.GetBitmapFromFile(P); int width = bitmap.Width; int height = bitmap.Height; Mesh mesh = Mesh.CreateFromPlane(plane, new Interval(0, width), new Interval(0, height), 1, 1); }