Esempio n. 1
0
        public override bool ExecConduit(ref MRhinoDisplayPipeline dp, uint nChannel, ref bool bTerminate)
        {
            if (nChannel == MSupportChannels.SC_DRAWOVERLAY)
            {
                if (null != m_brep)
                {
                    MRhinoViewport vp          = dp.GetRhinoVP();
                    OnColor        saved_color = vp.SetDrawColor(RhUtil.RhinoApp().AppSettings().TrackingColor());
                    for (int i = 0; i < m_points.Count(); i++)
                    {
                        if (i % 100 == 0 && vp.InterruptDrawing())
                        {
                            break;
                        }

                        On3dPoint  pt  = m_points[i];
                        On3dVector dir = new On3dVector(m_normals[i]);
                        if (m_bFlip)
                        {
                            dir.Reverse();
                        }

                        vp.DrawDirectionArrow(pt, dir);
                    }
                    vp.SetDrawColor(saved_color);
                }
            }
            return(true);
        }
Esempio n. 2
0
 public override bool ExecConduit(ref MRhinoDisplayPipeline dp, uint nChannel, ref bool bTerminate)
 {
     if (nChannel == MSupportChannels.SC_CALCBOUNDINGBOX)
     {
         MRhinoViewport vp     = dp.GetRhinoVP();
         OnCircle       circle = new OnCircle();
         if (CalculateCircle(vp, ref circle))
         {
             m_pChannelAttrs.m_BoundingBox.Union(circle.BoundingBox());
         }
     }
     else if (nChannel == MSupportChannels.SC_DRAWOVERLAY)
     {
         MRhinoViewport vp     = dp.GetRhinoVP();
         OnCircle       circle = new OnCircle();
         if (CalculateCircle(vp, ref circle))
         {
             vp.DrawCircle(circle);
         }
     }
     return(true);
 }
 public override bool ExecConduit(ref MRhinoDisplayPipeline dp, uint nChannel, ref bool bTerminate)
 {
     if (nChannel == MSupportChannels.SC_CALCBOUNDINGBOX)
       {
     MRhinoViewport vp = dp.GetRhinoVP();
     OnCircle circle = new OnCircle();
     if (CalculateCircle(vp, ref circle))
       m_pChannelAttrs.m_BoundingBox.Union(circle.BoundingBox());
       }
       else if (nChannel == MSupportChannels.SC_DRAWOVERLAY)
       {
     MRhinoViewport vp = dp.GetRhinoVP();
     OnCircle circle = new OnCircle();
     if (CalculateCircle(vp, ref circle))
       vp.DrawCircle(circle);
       }
       return true;
 }
        public override bool ExecConduit(ref MRhinoDisplayPipeline dp, uint nChannel, ref bool bTerminate)
        {
            if (nChannel == MSupportChannels.SC_DRAWOVERLAY)
              {
            if (null != m_brep)
            {
              MRhinoViewport vp = dp.GetRhinoVP();
              OnColor saved_color = vp.SetDrawColor(RhUtil.RhinoApp().AppSettings().TrackingColor());
              for (int i = 0; i < m_points.Count(); i++)
              {
            if (i % 100 == 0 && vp.InterruptDrawing())
              break;

            On3dPoint pt = m_points[i];
            On3dVector dir = new On3dVector(m_normals[i]);
            if (m_bFlip)
              dir.Reverse();

            vp.DrawDirectionArrow(pt, dir);
              }
              vp.SetDrawColor(saved_color);
            }
              }
              return true;
        }