Esempio n. 1
0
        public override VirgisFeature AddVertex(Vector3 position)
        {
            int         seg     = curve.NearestSegment(position);
            LineSegment segment = VertexTable.Find(item => item.Vertex == seg).Line;

            return(AddVertex(segment, position));
        }
Esempio n. 2
0
        /// <summary>
        /// Estimates the nearest point on a DCurve to the centroid of that DCurve
        /// </summary>
        /// <param name="curve">g3.DCurve</param>
        /// <returns>g3.Vector3d Centroid</returns>
        public static Vector3d CenterMark(this DCurve3 curve)
        {
            Vector3d center = curve.Center();

            return(curve.GetSegment(curve.NearestSegment(center)).NearestPoint(center));
        }