Example #1
0
        private void ShowOriginalLocation(int index, VIZCore3D.NET.Data.Object3DProperty prop, VIZCore3D.NET.Data.Vector3D v)
        {
            List <Color> color = new List <Color>();

            color.Add(Color.FromArgb(10, 255, 0, 0));
            color.Add(Color.FromArgb(10, 0, 255, 0));
            color.Add(Color.FromArgb(10, 0, 0, 255));

            vizcore3d.SelectionBox.Add(prop.GetBoundBox(), color[index], Color.FromArgb(100, 255, 255, 255), "");

            VIZCore3D.NET.Data.Vertex3DItemCollection items = new VIZCore3D.NET.Data.Vertex3DItemCollection();
            items.Add(prop.CenterPoint);
            items.Add(prop.CenterPoint + v.ToVertex3D());

            vizcore3d.ShapeDrawing.AddLine(
                new List <Data.Vertex3DItemCollection>()
            {
                items
            }
                , 0
                , Color.Red
                , 5.0f
                , true
                );
        }
Example #2
0
        private List <VIZCore3D.NET.Data.Vertex3DItemCollection> GetVertexList(int index)
        {
            List <VIZCore3D.NET.Data.OsnapVertex3D> osnap = vizcore3d.Object3D.GetOsnapPoint(index);

            List <VIZCore3D.NET.Data.Vertex3DItemCollection> vertex = new List <VIZCore3D.NET.Data.Vertex3DItemCollection>();

            foreach (Data.OsnapVertex3D point in osnap)
            {
                if (point.Kind == Data.OsnapKind.LINE)
                {
                    VIZCore3D.NET.Data.Vertex3DItemCollection item = new VIZCore3D.NET.Data.Vertex3DItemCollection();

                    item.Add(point.Start);
                    item.Add(point.End);

                    vertex.Add(item);
                }
                else if (point.Kind == Data.OsnapKind.CIRCLE)
                {
                    VIZCore3D.NET.Data.Vertex3DItemCollection item = new VIZCore3D.NET.Data.Vertex3DItemCollection();

                    item.Add(point.Start);
                    item.Add(point.End);

                    vertex.Add(item);
                }
            }

            return(vertex);
        }
Example #3
0
        private void GetNearestObject(VIZCore3D.NET.Data.AxisDirection axis, VIZCore3D.NET.Data.Vertex3D pt, bool visibleOnly, bool opaqueOnly)
        {
            VIZCore3D.NET.Data.NearestObjectByAxisPoint sdpt = vizcore3d.GeometryUtility.GetNearestObject(
                axis
                , pt
                , visibleOnly
                , opaqueOnly
                );

            if (sdpt.Index == -1)
            {
                return;
            }

            List <VIZCore3D.NET.Data.Vertex3DItemCollection> vertex = new List <VIZCore3D.NET.Data.Vertex3DItemCollection>();

            VIZCore3D.NET.Data.Vertex3DItemCollection item = new VIZCore3D.NET.Data.Vertex3DItemCollection();
            item.Add(pt);
            item.Add(sdpt.CollisionPoint);
            vertex.Add(item);


            int lineId = vizcore3d.ShapeDrawing.AddLine(
                vertex
                , sdpt.Index
                , Color.Red
                , 5.0f
                , true
                );

            //int vertexId = vizcore3d.ShapeDrawing.AddVertex(
            //        new List<VIZCore3D.NET.Data.Vertex3D>() { pt, sdpt.CollisionPoint }
            //        , sdpt.Index
            //        , Color.Red
            //        , 5.0f
            //        , 7.0f
            //        , true
            //        );

            string noteText = string.Format(
                "[{0}]{1}\r\nDistance: {2}\r\nCollision: {3}"
                , sdpt.Index
                , vizcore3d.Object3D.FromIndex(sdpt.Index).NodeName
                , sdpt.Distance.ToString()
                , sdpt.CollisionPoint.ToString()
                );

            VIZCore3D.NET.Data.Vertex3D text = new Data.Vertex3D(
                sdpt.CollisionPoint.X
                , sdpt.CollisionPoint.Y
                , sdpt.CollisionPoint.Z + 500
                );
            int surfaceNoteId = vizcore3d.Review.Note.AddNoteSurface(
                noteText
                , text
                , sdpt.CollisionPoint
                );
        }
Example #4
0
        private void DrawArrow()
        {
            vizcore3d.ShapeDrawing.Clear();

            if (ckEnableLine.Checked == false)
            {
                return;
            }

            List <VIZCore3D.NET.Data.Node> nodes = vizcore3d.Object3D.FromIndex(0).GetChildObject3d(VIZCore3D.NET.Data.Object3DChildOption.CHILD_ONLY);

            if (nodes.Count == 0)
            {
                return;
            }

            List <VIZCore3D.NET.Data.BoundBox3D> boudBox = new List <VIZCore3D.NET.Data.BoundBox3D>();

            for (int i = 0; i < nodes.Count; i++)
            {
                VIZCore3D.NET.Data.Node item = nodes[i];

                if (item.ChildCount == 0)
                {
                    continue;
                }
                if (item.Visible == false)
                {
                    continue;
                }

                VIZCore3D.NET.Data.BoundBox3D boundBox = item.GetBoundBoxAABB();
                boudBox.Add(boundBox);
            }

            vizcore3d.BeginUpdate();
            for (int i = 0; i < boudBox.Count; i++)
            {
                List <VIZCore3D.NET.Data.Vertex3DItemCollection> vitems = new List <VIZCore3D.NET.Data.Vertex3DItemCollection>();
                VIZCore3D.NET.Data.Vertex3DItemCollection        vcoll  = new VIZCore3D.NET.Data.Vertex3DItemCollection();

                if (i < boudBox.Count - 1)
                {
                    VIZCore3D.NET.Data.BoundBox3D box1 = boudBox[i + 0];
                    VIZCore3D.NET.Data.BoundBox3D box2 = boudBox[i + 1];

                    vcoll.Add(box1.GetCenter());
                    vcoll.Add(box2.GetCenter());

                    vitems.Add(vcoll);

                    //vizcore3d.ShapeDrawing.AddArrow(vitems, 1, Color.Black, Color.Red, 2, 10, true);
                    //vizcore3d.ShapeDrawing.AddArrow(vitems, 1, 1000.0f, 1000.0f, Color.Black, Color.Red, 2, 10, true);
                    vizcore3d.ShapeDrawing.AddArrow(vitems, 1, box1.MaxLength, box2.MaxLength, Color.Black, Color.Red, 2, 10, true);
                }
            }
            vizcore3d.EndUpdate();
        }
Example #5
0
        private List <VIZCore3D.NET.Data.Vertex3DItemCollection> GetVertexList()
        {
            List <VIZCore3D.NET.Data.Vertex3DItemCollection> vertex = new List <VIZCore3D.NET.Data.Vertex3DItemCollection>();

            VIZCore3D.NET.Data.BoundBox3D boundbox = vizcore3d.Object3D.GeometryProperty.FromSelectedObject3D(false).GetBoundBox();

            {
                Data.Vertex3DItemCollection item = new VIZCore3D.NET.Data.Vertex3DItemCollection();

                item.Add(new VIZCore3D.NET.Data.Vertex3D(boundbox.MinX, boundbox.MinY, boundbox.MinZ));
                item.Add(new VIZCore3D.NET.Data.Vertex3D(boundbox.MinX, boundbox.MaxY, boundbox.MinZ));
                item.Add(new VIZCore3D.NET.Data.Vertex3D(boundbox.MaxX, boundbox.MaxY, boundbox.MinZ));
                item.Add(new VIZCore3D.NET.Data.Vertex3D(boundbox.MaxX, boundbox.MinY, boundbox.MinZ));
                item.Add(new VIZCore3D.NET.Data.Vertex3D(boundbox.MinX, boundbox.MinY, boundbox.MinZ));
                item.Add(new VIZCore3D.NET.Data.Vertex3D(boundbox.MinX, boundbox.MinY, boundbox.MaxZ));
                item.Add(new VIZCore3D.NET.Data.Vertex3D(boundbox.MinX, boundbox.MaxY, boundbox.MaxZ));
                item.Add(new VIZCore3D.NET.Data.Vertex3D(boundbox.MaxX, boundbox.MaxY, boundbox.MaxZ));
                item.Add(new VIZCore3D.NET.Data.Vertex3D(boundbox.MaxX, boundbox.MinY, boundbox.MaxZ));
                item.Add(new VIZCore3D.NET.Data.Vertex3D(boundbox.MinX, boundbox.MinY, boundbox.MaxZ));

                vertex.Add(item);
            }

            {
                VIZCore3D.NET.Data.Vertex3DItemCollection item = new VIZCore3D.NET.Data.Vertex3DItemCollection();

                item.Add(new VIZCore3D.NET.Data.Vertex3D(boundbox.MinX, boundbox.MaxY, boundbox.MinZ));
                item.Add(new VIZCore3D.NET.Data.Vertex3D(boundbox.MinX, boundbox.MaxY, boundbox.MaxZ));

                vertex.Add(item);
            }

            {
                VIZCore3D.NET.Data.Vertex3DItemCollection item = new VIZCore3D.NET.Data.Vertex3DItemCollection();

                item.Add(new VIZCore3D.NET.Data.Vertex3D(boundbox.MaxX, boundbox.MaxY, boundbox.MinZ));
                item.Add(new VIZCore3D.NET.Data.Vertex3D(boundbox.MaxX, boundbox.MaxY, boundbox.MaxZ));

                vertex.Add(item);
            }

            {
                VIZCore3D.NET.Data.Vertex3DItemCollection item = new VIZCore3D.NET.Data.Vertex3DItemCollection();

                item.Add(new VIZCore3D.NET.Data.Vertex3D(boundbox.MaxX, boundbox.MinY, boundbox.MaxZ));
                item.Add(new VIZCore3D.NET.Data.Vertex3D(boundbox.MaxX, boundbox.MinY, boundbox.MinZ));

                vertex.Add(item);
            }

            return(vertex);
        }
Example #6
0
        private void btnLineCenter_Click(object sender, EventArgs e)
        {
            vizcore3d.ShapeDrawing.Clear();

            List <VIZCore3D.NET.Data.Node> nodes = vizcore3d.Object3D.FromIndex(0).GetChildObject3d(VIZCore3D.NET.Data.Object3DChildOption.CHILD_ONLY);

            if (nodes.Count == 0)
            {
                return;
            }

            List <VIZCore3D.NET.Data.Vertex3D> center = new List <VIZCore3D.NET.Data.Vertex3D>();

            foreach (VIZCore3D.NET.Data.Node item in nodes)
            {
                if (item.ChildCount == 0)
                {
                    continue;
                }
                if (item.Visible == false)
                {
                    continue;
                }

                VIZCore3D.NET.Data.BoundBox3D boundBox = item.GetBoundBoxAABB();
                center.Add(boundBox.GetCenter());
            }

            //if (center.Count > 0)
            //    vizcore3d.ShapeDrawing.AddVertex(center, 0, Color.Red, 3, 3, true);

            for (int i = 0; i < center.Count; i++)
            {
                List <VIZCore3D.NET.Data.Vertex3DItemCollection> vitems = new List <VIZCore3D.NET.Data.Vertex3DItemCollection>();
                VIZCore3D.NET.Data.Vertex3DItemCollection        vcoll  = new VIZCore3D.NET.Data.Vertex3DItemCollection();

                if (i < center.Count - 1)
                {
                    vcoll.Add(center[i + 0]);
                    vcoll.Add(center[i + 1]);

                    vitems.Add(vcoll);

                    vizcore3d.ShapeDrawing.AddLine(vitems, 1, Color.Red, 2, true);
                }
            }
        }
Example #7
0
        private void ShowLogEdgeLoop(int index)
        {
            List <VIZCore3D.NET.Data.EdgeLoops> edgeLoop = vizcore3d.MeshEdit.GetEdgeLoops(index);

            StringBuilder sb = new StringBuilder();

            for (int i = 0; i < edgeLoop.Count; i++)
            {
                sb.AppendLine(string.Format("Vertex Count : {0} EA", edgeLoop[i].Vertex.Count));
                sb.AppendLine("");

                for (int j = 0; j < edgeLoop[i].Vertex.Count; j++)
                {
                    sb.AppendLine(string.Format("{0} : {1}", j + 1, edgeLoop[i].Vertex[j].ToString()));
                }
                sb.AppendLine("");

                sb.AppendLine(string.Format("Edge Loop Count : {0} EA", edgeLoop[i].Loop.Count));
                sb.AppendLine("");

                foreach (KeyValuePair <int, int> item in edgeLoop[i].Loop)
                {
                    sb.AppendLine(string.Format("Loop Vertex Start Index : {0}, Count : {1}", item.Key, item.Value));
                }
                sb.AppendLine("");

                for (int j = 0; j < edgeLoop[i].LoopVertex.Count; j++)
                {
                    VIZCore3D.NET.Data.Vertex3DItemCollection item = edgeLoop[i].LoopVertex[j];

                    sb.AppendLine(string.Format("No: {0} / Count : {1}", j + 1, item.Count));
                    for (int k = 0; k < item.Count; k++)
                    {
                        VIZCore3D.NET.Data.Vertex3D vertex = item[k];
                        sb.AppendLine(string.Format("{0} : {1}", k + 1, vertex.ToString()));
                    }

                    sb.AppendLine("");
                }
            }

            txtEdgeLoop.Text = sb.ToString();
        }
Example #8
0
        private void DrawLine(VIZCore3D.NET.Data.Vertex3D start, VIZCore3D.NET.Data.Vector3D normal)
        {
            vizcore3d.ShapeDrawing.DepthTest = true;

            VIZCore3D.NET.Data.Vertex3D end = VIZCore3D.NET.Data.Vector3D.FromVertex3D(start).PointToVector(normal, 1000.0f).ToVertex3D();

            List <VIZCore3D.NET.Data.Vertex3DItemCollection> vertex = new List <VIZCore3D.NET.Data.Vertex3DItemCollection>();

            Data.Vertex3DItemCollection item = new VIZCore3D.NET.Data.Vertex3DItemCollection();
            item.Add(start);
            item.Add(end);

            vertex.Add(item);

            int shapeId = vizcore3d.ShapeDrawing.AddLine(
                vertex
                , 0
                , Color.Orange
                , 5.0f
                , true
                );
        }
Example #9
0
        private void btnDrawEdgeLoop_Click(object sender, EventArgs e)
        {
            if (String.IsNullOrEmpty(txtEdgeLoopIndex.Text) == true)
            {
                return;
            }

            int nodeIndex = Convert.ToInt32(txtEdgeLoopIndex.Text);

            vizcore3d.Object3D.Select(new List <int>()
            {
                nodeIndex
            }, false, false);

            List <VIZCore3D.NET.Data.EdgeLoops> edgeLoop = vizcore3d.MeshEdit.GetEdgeLoops(nodeIndex);

            if (edgeLoop.Count == 0)
            {
                return;
            }

            VIZCore3D.NET.Utility.ColorPaletteHelper palette = new Utility.ColorPaletteHelper("Default");

            vizcore3d.BeginUpdate();

            if (rbDrawLine.Checked == true)
            {
                for (int i = 0; i < edgeLoop.Count; i++)
                {
                    // 전체 한번에 그리기
                    //vizcore3d.ShapeDrawing.AddLine(
                    //    edgeLoop[i].LoopVertex              /* Vertex List */
                    //    , i                                 /* Group Id */
                    //    , palette.GetPaletteColor(i).Color1 /* Color */
                    //    , 3.0f                              /* Thickness */
                    //    , true                              /* Visible */
                    //    );

                    for (int j = 0; j < edgeLoop[i].LoopVertex.Count; j++)
                    {
                        VIZCore3D.NET.Data.Vertex3DItemCollection item = edgeLoop[i].LoopVertex[j];

                        // 개별로 그리기
                        vizcore3d.ShapeDrawing.AddLine(
                            new List <Data.Vertex3DItemCollection>()
                        {
                            item
                        }                                                       /* Vertex List */
                            , j                                                 /* Group Id */
                            , palette.GetPaletteColor(j).Color1                 /* Color */
                            , 3.0f                                              /* Thickness */
                            , true                                              /* Visible */
                            );
                    }
                }
            }
            else if (rbDrawVertex.Checked == true)
            {
                for (int i = 0; i < edgeLoop.Count; i++)
                {
                    for (int j = 0; j < edgeLoop[i].LoopVertex.Count; j++)
                    {
                        VIZCore3D.NET.Data.Vertex3DItemCollection item = edgeLoop[i].LoopVertex[j];

                        vizcore3d.ShapeDrawing.AddVertex(
                            item.BaseCollection
                            , j
                            , palette.GetPaletteColor(j).Color1
                            , 3.0f
                            , 5.0f
                            , true
                            );
                    }
                }
            }

            vizcore3d.EndUpdate();
        }
Example #10
0
        private void ShowFrame(VIZCore3D.NET.Data.Vertex3D v)
        {
            vizcore3d.BeginUpdate();

            // Add Custom Measure
            vizcore3d.Review.Measure.AddCustomPosition(v);

            // Get Current Frame Item
            Dictionary <VIZCore3D.NET.Data.Axis, VIZCore3D.NET.Data.FrameItem> frame =
                vizcore3d.Frame.GetFrame(v);

            // Axis Frame Item
            VIZCore3D.NET.Data.FrameItem currentX = frame[VIZCore3D.NET.Data.Axis.X];
            VIZCore3D.NET.Data.FrameItem currentY = frame[VIZCore3D.NET.Data.Axis.Y];
            VIZCore3D.NET.Data.FrameItem currentZ = frame[VIZCore3D.NET.Data.Axis.Z];

            // Frame String
            string xFrameStr = string.Format("{0}{1}", currentX.Label, currentX.GridID);
            string yFrameStr = string.Format("{0}{1}", currentY.Label, currentY.GridID);
            string zFrameStr = string.Format("{0}{1}", currentZ.Label, currentZ.GridID);

            // Frame Position
            VIZCore3D.NET.Data.FramePosition xPosition =
                vizcore3d.Frame.GetPosition(VIZCore3D.NET.Data.Axis.X, xFrameStr);
            VIZCore3D.NET.Data.FramePosition yPosition =
                vizcore3d.Frame.GetPosition(VIZCore3D.NET.Data.Axis.Y, yFrameStr);
            VIZCore3D.NET.Data.FramePosition zPosition =
                vizcore3d.Frame.GetPosition(VIZCore3D.NET.Data.Axis.Z, zFrameStr);

            VIZCore3D.NET.Data.Vertex3D vmZ1 = new VIZCore3D.NET.Data.Vertex3D();

            // X-Base
            {
                List <VIZCore3D.NET.Data.Vertex3DItemCollection> xBaseLine  = new List <VIZCore3D.NET.Data.Vertex3DItemCollection>();
                VIZCore3D.NET.Data.Vertex3DItemCollection        xBasePoint = new VIZCore3D.NET.Data.Vertex3DItemCollection();
                xBasePoint.Add(v);
                VIZCore3D.NET.Data.Vertex3D vX = v.Clone();
                vX.Y -= 2000.0f;
                xBasePoint.Add(vX);
                xBaseLine.Add(xBasePoint);

                VIZCore3D.NET.Data.Vertex3DItemCollection xOffsetPoint = new VIZCore3D.NET.Data.Vertex3DItemCollection();
                VIZCore3D.NET.Data.Vertex3D vX1 = new VIZCore3D.NET.Data.Vertex3D(xPosition.Position, v.Y, v.Z);
                VIZCore3D.NET.Data.Vertex3D vX2 = new VIZCore3D.NET.Data.Vertex3D(xPosition.Position, v.Y - 2000.0f, v.Z);
                xOffsetPoint.Add(vX1);
                xOffsetPoint.Add(vX2);
                xBaseLine.Add(xOffsetPoint);

                vizcore3d.ShapeDrawing.AddDashLine(xBaseLine, 0, Color.Red, 5.0f, true, 100.0f);

                vizcore3d.TextDrawing.Add(vX2, new VIZCore3D.NET.Data.Vector3D(1, 0, 0), new VIZCore3D.NET.Data.Vector3D(0, 1, 0), 100, 100, Color.Black, string.Format("(X){0}", xFrameStr));

                // Middle Point
                VIZCore3D.NET.Data.Vertex3D vmX1 = v.PointToPoint(vX, 1000.0f);
                VIZCore3D.NET.Data.Vertex3D vmX2 = vX1.PointToPoint(vX2, 1000.0f);
                List <VIZCore3D.NET.Data.Vertex3DItemCollection> xMiddleLine  = new List <VIZCore3D.NET.Data.Vertex3DItemCollection>();
                VIZCore3D.NET.Data.Vertex3DItemCollection        xMiddlePoint = new VIZCore3D.NET.Data.Vertex3DItemCollection();
                xMiddlePoint.Add(vmX2);
                xMiddlePoint.Add(vmX1);
                xMiddleLine.Add(xMiddlePoint);
                vizcore3d.ShapeDrawing.AddArrow(xMiddleLine, 3, Color.Black, Color.Yellow, 5, 10, true);

                VIZCore3D.NET.Data.Vertex3D mX = vmX2.PointToPoint(vmX1, (vmX1.X - vmX2.X) / 2);
                mX.Y += 100.0f;
                vizcore3d.TextDrawing.Add(mX, new VIZCore3D.NET.Data.Vector3D(1, 0, 0), new VIZCore3D.NET.Data.Vector3D(0, 1, 0), 70, 50, Color.Black, string.Format("{0}", Math.Abs(vmX1.X - vmX2.X)));

                vmZ1 = v.PointToPoint(vX, 800.0f);
            }

            // Y-Base
            {
                List <VIZCore3D.NET.Data.Vertex3DItemCollection> yBaseLine  = new List <VIZCore3D.NET.Data.Vertex3DItemCollection>();
                VIZCore3D.NET.Data.Vertex3DItemCollection        yBasePoint = new VIZCore3D.NET.Data.Vertex3DItemCollection();
                yBasePoint.Add(v);
                VIZCore3D.NET.Data.Vertex3D vY = v.Clone();
                vY.X -= 2000.0f;
                yBasePoint.Add(vY);
                yBaseLine.Add(yBasePoint);

                VIZCore3D.NET.Data.Vertex3DItemCollection yOffsetPoint = new VIZCore3D.NET.Data.Vertex3DItemCollection();
                VIZCore3D.NET.Data.Vertex3D vY1 = new VIZCore3D.NET.Data.Vertex3D(v.X, yPosition.Position, v.Z);
                VIZCore3D.NET.Data.Vertex3D vY2 = new VIZCore3D.NET.Data.Vertex3D(v.X - 2000.0f, yPosition.Position, v.Z);
                yOffsetPoint.Add(vY1);
                yOffsetPoint.Add(vY2);
                yBaseLine.Add(yOffsetPoint);

                vizcore3d.ShapeDrawing.AddDashLine(yBaseLine, 1, Color.Black, 5.0f, true, 100.0f);

                vizcore3d.TextDrawing.Add(vY2, new VIZCore3D.NET.Data.Vector3D(0, -1, 0), new VIZCore3D.NET.Data.Vector3D(1, 0, 0), 100, 100, Color.Black, string.Format("(Y){0}", yFrameStr));

                // Middle Point
                VIZCore3D.NET.Data.Vertex3D vmY1 = v.PointToPoint(vY, 1000.0f);
                VIZCore3D.NET.Data.Vertex3D vmY2 = vY1.PointToPoint(vY2, 1000.0f);
                List <VIZCore3D.NET.Data.Vertex3DItemCollection> yMiddleLine  = new List <VIZCore3D.NET.Data.Vertex3DItemCollection>();
                VIZCore3D.NET.Data.Vertex3DItemCollection        yMiddlePoint = new VIZCore3D.NET.Data.Vertex3DItemCollection();
                yMiddlePoint.Add(vmY2);
                yMiddlePoint.Add(vmY1);
                yMiddleLine.Add(yMiddlePoint);
                vizcore3d.ShapeDrawing.AddArrow(yMiddleLine, 3, Color.Black, Color.Yellow, 5, 10, true);

                VIZCore3D.NET.Data.Vertex3D mY = vmY2.PointToPoint(vmY1, (vmY2.Y - vmY1.Y) / 2);
                mY.X += 100.0f;
                vizcore3d.TextDrawing.Add(mY, new VIZCore3D.NET.Data.Vector3D(0, -1, 0), new VIZCore3D.NET.Data.Vector3D(1, 0, 0), 70, 50, Color.Black, string.Format("{0}", Math.Abs(vmY1.Y - vmY2.Y)));
            }

            // Z-Base
            {
                List <VIZCore3D.NET.Data.Vertex3DItemCollection> zBaseLine  = new List <VIZCore3D.NET.Data.Vertex3DItemCollection>();
                VIZCore3D.NET.Data.Vertex3DItemCollection        zBasePoint = new VIZCore3D.NET.Data.Vertex3DItemCollection();
                VIZCore3D.NET.Data.Vertex3D vZ0 = v.Clone();
                vZ0.Z = zPosition.Position;
                zBasePoint.Add(vZ0);
                VIZCore3D.NET.Data.Vertex3D vZ = v.Clone();
                vZ.Y -= 2000.0f;
                vZ.Z  = zPosition.Position;
                zBasePoint.Add(vZ);
                zBaseLine.Add(zBasePoint);

                vizcore3d.ShapeDrawing.AddDashLine(zBaseLine, 2, Color.Blue, 5.0f, true, 100.0f);

                vizcore3d.TextDrawing.Add(vZ, new VIZCore3D.NET.Data.Vector3D(0, 0, -1), new VIZCore3D.NET.Data.Vector3D(1, 0, 0), 100, 100, Color.Black, string.Format("(Z){0}", zFrameStr));

                // Middle Point
                VIZCore3D.NET.Data.Vertex3D vmZ2 = vZ0.PointToPoint(vZ, 800.0f);
                List <VIZCore3D.NET.Data.Vertex3DItemCollection> zMiddleLine  = new List <VIZCore3D.NET.Data.Vertex3DItemCollection>();
                VIZCore3D.NET.Data.Vertex3DItemCollection        zMiddlePoint = new VIZCore3D.NET.Data.Vertex3DItemCollection();
                zMiddlePoint.Add(vmZ2);
                zMiddlePoint.Add(vmZ1);
                zMiddleLine.Add(zMiddlePoint);
                vizcore3d.ShapeDrawing.AddArrow(zMiddleLine, 3, Color.Black, Color.Yellow, 5, 10, true);

                VIZCore3D.NET.Data.Vertex3D mZ = vmZ2.PointToPoint(vmZ1, (vmZ2.Z - vmZ1.Z) / 2);
                mZ.Y -= 100.0f;
                vizcore3d.TextDrawing.Add(mZ, new VIZCore3D.NET.Data.Vector3D(0, 0, -1), new VIZCore3D.NET.Data.Vector3D(1, 0, 0), 70, 50, Color.Black, string.Format("{0}", Math.Abs(vmZ1.Z - vmZ2.Z)));
            }

            vizcore3d.EndUpdate();
        }