示例#1
0
 protected override void OnDynamicDraw(Rhino.Input.Custom.GetPointDrawEventArgs e)
 {
     // Disable default GetTransform drawing by not calling the base class
     // implementation. All aspects of gumball display are handled by
     // GumballDisplayConduit
     //base.OnDynamicDraw(e);
 }
示例#2
0
        protected override void OnDynamicDraw(Rhino.Input.Custom.GetPointDrawEventArgs e)
        {
            Point3d basePoint;

            if (TryGetBasePoint(out basePoint))
            {
                e.Display.DrawLine(basePoint, RefPoint, System.Drawing.Color.Black);
                e.Display.DrawPoint(RefPoint, System.Drawing.Color.Black);
                base.OnDynamicDraw(e);
            }
        }
    // this function is called whenever the GetPoint's DynamicDraw
    // event occurs
    void ArrayByDistanceDraw(object sender, Rhino.Input.Custom.GetPointDrawEventArgs e)
    {
        Rhino.DocObjects.RhinoObject rhobj = e.Source.Tag as Rhino.DocObjects.RhinoObject;
        if (rhobj == null)
        {
            return;
        }
        var    vec    = e.CurrentPoint - m_point_start;
        double length = vec.Length;

        vec.Unitize();
        int count = (int)(length / m_distance);

        for (int i = 1; i < count; i++)
        {
            var translate = vec * (i * m_distance);
            var xf        = Rhino.Geometry.Transform.Translation(translate);
            e.Display.DrawObject(rhobj, xf);
        }
    }
        /// <summary>
        /// Dynamic draw event handler
        /// </summary>
        void PlatonicGetPoint_DynamicDraw(object sender, Rhino.Input.Custom.GetPointDrawEventArgs e)
        {
            if (m_draw)
            {
                if (null != m_faces && null != m_xform)
                {
                    Rhino.Geometry.Transform model_xform = e.Display.ModelTransform;
                    e.Display.ModelTransform = m_xform;

                    System.Drawing.Color color = e.RhinoDoc.Layers.CurrentLayer.Color;
                    foreach (Brep t in m_faces)
                    {
                        if (null != t)
                        {
                            e.Display.DrawBrepWires(t, color);
                        }
                    }

                    e.Display.ModelTransform = model_xform;
                }
            }
        }
示例#5
0
 protected override void OnDynamicDraw(Rhino.Input.Custom.GetPointDrawEventArgs e)
 {
     e.Display.DrawConstructionPlane(cPlane);
 }