Ejemplo n.º 1
0
        public override void DrawViewportWires(GH_PreviewWireArgs args)
        {
            var location = Location;

            if (!location.IsValid)
            {
                return;
            }

            GH_Plane.DrawPlane(args.Pipeline, Location, Grasshopper.CentralSettings.PreviewPlaneRadius, 4, args.Color, System.Drawing.Color.DarkRed, System.Drawing.Color.DarkGreen);
        }
Ejemplo n.º 2
0
        public override void DrawViewportWires(GH_PreviewWireArgs args)
        {
            var location = Location;

            if (!location.IsValid)
            {
                return;
            }

            GH_Plane.DrawPlane(args.Pipeline, location, Grasshopper.CentralSettings.PreviewPlaneRadius, 4, args.Color, System.Drawing.Color.DarkRed, System.Drawing.Color.DarkGreen);

            foreach (var loop in Profile)
            {
                args.Pipeline.DrawCurve(loop, args.Color, args.Thickness);
            }
        }
Ejemplo n.º 3
0
        public void DrawViewportWires(GH_PreviewWireArgs args)
        {
            if (Value == null)
            {
                return;
            }


            if (Value.Plane.IsValid)
            {
                if (args.Color == System.Drawing.Color.FromArgb(255, 150, 0, 0)) // this is a workaround to change colour between selected and not
                {
                    GH_Plane.DrawPlane(args.Pipeline, Value.Plane, 16, 16, System.Drawing.Color.Gray, System.Drawing.Color.Red, System.Drawing.Color.Green);
                    args.Pipeline.DrawPoint(Value.Plane.Origin, Rhino.Display.PointStyle.RoundSimple, 3, UI.Colour.Node);
                }
                else
                {
                    GH_Plane.DrawPlane(args.Pipeline, Value.Plane, 16, 16, System.Drawing.Color.LightGray, System.Drawing.Color.Red, System.Drawing.Color.Green);
                    args.Pipeline.DrawPoint(Value.Plane.Origin, Rhino.Display.PointStyle.RoundControlPoint, 3, UI.Colour.NodeSelected);
                }
            }
        }