Example #1
0
        /*
         *        METHODS:    I_DRAWABLE
         */
        public void Draw(I_Draw i_Draw, DrawParam dp)
        {
            DrawParamVec dpVec = dp as DrawParamVec;

            if (dpVec != null)
            {
                i_Draw.DrawPnt(this.x, this.y,
                               dpVec.ScrRad, dpVec.StrColor, dpVec.ScrWidth, dpVec.ToFill);
            }
        }
Example #2
0
        /*
         *        METHODS: I_DRAWABLE
         */
        public void Draw(I_Draw i_Draw, DrawParam dp)
        {
            DrawParamKnot dpKnot = dp as DrawParamKnot;

            if (dpKnot != null)
            {
                i_Draw.DrawPnt(this.Val.X, this.Val.Y,
                               dpKnot.ScrRad, dpKnot.StrColor, dpKnot.ScrWidth, this.on);
                if (dpKnot.ToShowNumber)
                {
                    i_Draw.DrawString(this.indexKnot.ToString(), this.Val.X, this.Val.Y,
                                      "Blue", 5, 1, -7);
                }
            }
        }
Example #3
0
        override public void Draw(I_Draw i_Draw, DrawParam dp)
        {
            DrawParamGErr dpGErr=dp as DrawParamGErr;
            if (dpGErr==null)
                return;
            foreach (ListInfoInters linters in this.arrLinters)
            {
                foreach (InfoInters inters in linters)
                {
                    switch(inters.GetType().ToString())
                    {
                        case "NS_GMath.IntersD0":
                            IntersD0 intersD0=inters as IntersD0;
                            double x=intersD0.PntInters.X;
                            double y=intersD0.PntInters.Y;
                            i_Draw.DrawPnt(x,y,2.0F,"Red",1,true);
                            break;
                        case "NS_GMath.IntersD1":
                            IntersD1 intersD1=inters as IntersD1;
                            Curve curveInters=intersD1.CurveInters;
                            DrawParamCurve dpCurve=new DrawParamCurve("Red",2.0F,false,null);
                            bool toDrawCurves=(curveInters.BBox.Diag<3.0);
                            try
                            {
                                curveInters.Draw(i_Draw, dpCurve);
                            }
                            catch(System.Exception)
                            {    
                                toDrawCurves=true;
                            }
                        
                            if (toDrawCurves)
                            {
                                CParam cparamInA=intersD1.IpiIn.Par(0) as CParam;
                                BCurve curve=dpGErr.G.Outl.CurveByIndKnot(cparamInA.IndKnot);
                                dpCurve=new DrawParamCurve("Red",2.0F,false,null);
                                curve.Draw(i_Draw, dpCurve);

                                CParam cparamInB=intersD1.IpiIn.Par(1) as CParam;
                                if (cparamInB!=null)
                                {
                                    curve=dpGErr.G.Outl.CurveByIndKnot(cparamInA.IndKnot);
                                    curve.Draw(i_Draw, dpCurve);
                                }
                            }
                            break;
                        default:
                            break;
                    }
                }
            }
        }
Example #4
0
 override public void Draw(I_Draw i_Draw, DrawParam dp)
 {
     DrawParamGErr dpGErr=dp as DrawParamGErr;
     if (dpGErr==null)
         return;
     foreach (PairInt infoKnotDupl in this.infosKnotDupl)
     {
         VecD vec=dpGErr.G.Outl.KnotByInd(infoKnotDupl[0]).Val;
         i_Draw.DrawPnt(vec.X,vec.Y,3.0F,"Green",0.5F,false);
     }
 }
Example #5
0
 override public void Draw(I_Draw i_Draw, DrawParam dp)
 {
     DrawParamGErr dpGErr=dp as DrawParamGErr;
     if (dpGErr==null)
         return;
     int numCont=this.indsKnotStart.Length;
     for (int iCont=0; iCont<numCont; iCont++)
     {
         Contour cont=dpGErr.G.Outl.ContByIndKnot(indsKnotStart[iCont]);
         Knot knot=cont.KnotByPoz(0);
         i_Draw.DrawPnt(knot.Val.X,knot.Val.Y,4.5F,"Green",1F,false);
     }
 }
Example #6
0
 /*
  *        METHODS:    I_DRAWABLE
  */
 public void Draw(I_Draw i_Draw, DrawParam dp)
 {
     DrawParamVec dpVec=dp as DrawParamVec;
     if (dpVec!=null)
     {
         i_Draw.DrawPnt(this.x, this.y, 
             dpVec.ScrRad, dpVec.StrColor, dpVec.ScrWidth, dpVec.ToFill);
     }
 }
Example #7
0
        /*
         *        METHODS: I_DRAWABLE
         */
        public void Draw(I_Draw i_Draw, DrawParam dp)
        {
            DrawParamKnot dpKnot=dp as DrawParamKnot;
            if (dpKnot!=null)
            {
                i_Draw.DrawPnt(this.Val.X,this.Val.Y,
                    dpKnot.ScrRad, dpKnot.StrColor, dpKnot.ScrWidth, this.on);
                if (dpKnot.ToShowNumber)
                {
                    i_Draw.DrawString(this.indexKnot.ToString(),this.Val.X,this.Val.Y,
                        "Blue", 5, 1, -7);
                }
            
            }

        }