Example #1
0
        private vdPolyface CreatePolyFaceFromCurve(vdPolyline curvePath, double diameter)
        {
            var pf = new vdPolyface();

            pf.SetUnRegisterDocument(vDraw.ActiveDocument);
            pf.setDocumentDefaults();

            var circle = new vdCircle {
                Radius = diameter / 2.0
            };

            vdCurve path = curvePath;

            if (curvePath.VertexList.Count == 2)
            {
                var line = new vdLine();
                line.SetUnRegisterDocument(vDraw.ActiveDocument);
                line.setDocumentDefaults();
                line.StartPoint = curvePath.getStartPoint();
                line.EndPoint   = curvePath.getEndPoint();
                path            = line;
            }

            pf.Generate3dPathSection(path, circle, new gPoint(0, 0, 0), 6, 1);
            pf.SmoothAngle         = 45;
            pf.PenColor.ColorIndex = 2;
            vDraw.ActiveDocument.ActiveLayOut.Entities.Add(pf);

            return(pf);
        }
Example #2
0
        private void AddGridPolyline()
        {
            if (Grids == null)
            {
                return;
            }

            foreach (var grid in Grids)
            {
                vdPolyline pl = new vdPolyline();
                pl.SetUnRegisterDocument(vDraw.ActiveDocument);
                pl.setDocumentDefaults();
                pl.VertexList = Tools.GetVertexesFromCurves(grid.Curves);

                vDraw.ActiveDocument.ActiveLayOut.Entities.Add(pl);
                SetEntityLayer(pl, _gGridLayerName);
                AddXPropertiesToEntity(grid.Properties, pl);
                AddGridText(pl.getStartPoint(), grid.Name, grid);
                AddGridText(pl.getEndPoint(), grid.Name, grid);
            }
        }