예제 #1
0
        public override void FillShapeEntities(ref vdEntities entities)
        {
            vdCircle circle = new vdCircle();

            entities.AddItem(circle);
            circle.MatchProperties(this, Document);
            circle.Radius          = mRadius;
            circle.HatchProperties = mhatchprops;

            if (mShowLines)
            {
                gPoint cen = new gPoint();
                vdLine line1;
                double angle = 0.0;
                for (int i = 0; i < 4; i++)
                {
                    line1 = new vdLine();
                    line1.MatchProperties(this, Document);
                    if (mhatchprops.FillMode == VdConstFill.VdFillModeNone)
                    {
                        line1.LineType = Document.LineTypes.Invisible;
                    }
                    line1.StartPoint = new gPoint(gPoint.Polar(cen, angle + mAngle, 3.0d * mRadius / 2.0d));
                    line1.EndPoint   = new gPoint(gPoint.Polar(cen, angle + mAngle, 2.0d * mRadius));
                    angle           += VectorDraw.Geometry.Globals.HALF_PI;
                    entities.AddItem(line1);
                }
            }
        }
예제 #2
0
        public override vdEntities Explode()
        {
            vdEntities Entities = new vdEntities();

            Entities.SetUnRegisterDocument(Document);
            if (Document != null)
            {
                Document.UndoHistory.PushEnable(false);
            }
            vdLine line = new vdLine();

            line.StartPoint = StartPoint;
            line.EndPoint   = EndPoint;
            line.MatchProperties(this, Document);
            Entities.AddItem(line);

            vdPolyline pl = new vdPolyline();

            pl.VertexList.AddRange(this.mArrowPoints);
            pl.Flag                              = VdConstPlineFlag.PlFlagCLOSE;
            pl.HatchProperties                   = new vdHatchProperties();
            pl.HatchProperties.FillMode          = VdConstFill.VdFillModeSolid;
            pl.HatchProperties.FillColor.ByBlock = true;
            pl.Transformby(ArrowEcsMatrix(new Vector(0, 0, 1)));
            pl.MatchProperties(this, Document);
            Entities.AddItem(pl);
            if (Document != null)
            {
                Document.UndoHistory.PopEnable();
            }
            return(Entities);
        }
예제 #3
0
        public override void FillShapeEntities(ref vdEntities entities)
        {
            vdCircle circle = new vdCircle();

            entities.AddItem(circle);
            circle.MatchProperties(this, Document);
            circle.Radius = mRadius;

            if (mShowLines)
            {
                gPoint cen = new gPoint();
                vdLine line1;

                vdPolyline pLine = new vdPolyline();

                line1 = new vdLine();
                line1.MatchProperties(this, Document);
                if (mhatchprops.FillMode == VdConstFill.VdFillModeNone)
                {
                    line1.LineType = Document.LineTypes.Invisible;
                }
                line1.StartPoint = circle.Center;

                double ss = 0.5d;
                line1.EndPoint = new gPoint(line1.StartPoint.x - ss, line1.StartPoint.y - ss);

                pLine.MatchProperties(this, Document);
                pLine.VertexList.Add(line1.StartPoint);
                //pLine.VertexList.Add(new gPoint(line1.StartPoint.x,line1.StartPoint.y - circle.Radius));
                pLine.VertexList.Add(line1.EndPoint);
                pLine.VertexList.Add(new gPoint(line1.StartPoint.x + ss, line1.StartPoint.y - ss));
                pLine.VertexList.Add(pLine.VertexList[0]);


                //entities.AddItem(line1);
                entities.AddItem(pLine);
            }
        }
예제 #4
0
        public override void FillShapeEntities(ref vdEntities entities)
        {
            vdCircle circle = new vdCircle();

            //entities.AddItem(circle);
            circle.MatchProperties(this, Document);
            circle.Radius          = mRadius;
            circle.HatchProperties = mhatchprops;

            if (mShowLines)
            {
                gPoint cen = new gPoint();
                vdLine line1;

                double dx = 0.0d, dy = 0.0d;

                dx = circle.Center.x - 0.5;
                dy = circle.Center.y;

                line1            = new vdLine();
                line1.StartPoint = new gPoint(dx, dy, circle.Center.z);
                line1.EndPoint   = new gPoint(circle.Center.x + 0.5d, circle.Center.y, circle.Center.z);
                line1.MatchProperties(this, Document);
                entities.AddItem(line1);


                for (int i = 0; i < 6; i++)
                {
                    line1 = new vdLine();
                    line1.MatchProperties(this, Document);

                    line1.StartPoint = new gPoint(dx, dy);
                    line1.EndPoint   = new gPoint(line1.StartPoint.x - 0.1d, line1.StartPoint.y - 0.3);

                    dx += 0.2;
                    //dy += 0.3;

                    entities.AddItem(line1);
                }

                //line1 = new vdLine();
                //line1.StartPoint = new gPoint(circle.Center.x - 1.0d, circle.Center.y, circle.Center.z);
                //line1.EndPoint = new gPoint(circle.Center.x + 1.0d, circle.Center.y, circle.Center.z);
                //line1.MatchProperties(this, Document);
                //entities.AddItem(line1);



                //line2 = new vdLine();
                //line2.StartPoint = line1.StartPoint;
                //line2.EndPoint = new gPoint(line1.StartPoint.x-0.1d, line1.StartPoint.y - 0.5d);
                //line2.MatchProperties(this, Document);
                //entities.AddItem(line2);


                //line3 = new vdLine();
                //line3.StartPoint = line1.EndPoint;
                //line3.EndPoint = new gPoint(line1.EndPoint.x - 0.1d, line1.EndPoint.y - 0.5d);
                //line3.MatchProperties(this, Document);
                //entities.AddItem(line3);


                //line4 = new vdLine();
                //line4.StartPoint = new gPoint(line1.StartPoint.x + 0.3d, line1.StartPoint.y);
                //line4.EndPoint = new gPoint(line4.StartPoint.x - 0.1d, line4.EndPoint.y - 0.5d);
                //line4.MatchProperties(this, Document);
                //entities.AddItem(line4);

                //line5 = new vdLine();
                //line5.StartPoint = new gPoint(line4.StartPoint.x + 0.3d, line4.StartPoint.y);
                //line5.EndPoint = new gPoint(line5.StartPoint.x - 0.1d, line5.EndPoint.y - 0.5d);
                //line5.MatchProperties(this, Document);
                //entities.AddItem(line5);

                //line6 = new vdLine();
                //line6.StartPoint = new gPoint(line5.StartPoint.x + 0.3d, line5.StartPoint.y);
                //line6.EndPoint = new gPoint(line6.StartPoint.x - 0.1d, line6.EndPoint.y - 0.5d);
                //line6.MatchProperties(this, Document);
                //entities.AddItem(line6);



                //ASTRASupportPinned pinn = new ASTRASupportPinned();
                //pinn.MatchProperties(this, Document);
                //pinn.Origin = circle.Center;
                //pinn.Radius = 0.2d;
                //entities.AddItem(pinn);
            }
        }