public override VirgisFeature AddVertex(Vector3 position) { int seg = curve.NearestSegment(position); LineSegment segment = VertexTable.Find(item => item.Vertex == seg).Line; return(AddVertex(segment, position)); }
/// <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)); }