/// <summary> /// Creates a section for this subdivision op. /// </summary> /// <param name="id">The internal of this feature within the project that created it.</param> /// <param name="start">The point at the start of the section</param> /// <param name="end">The point at the end of the section</param> /// <returns>The created section</returns> internal LineFeature MakeSection(InternalIdValue id, PointFeature start, PointFeature end) { SectionGeometry section = new SectionGeometry(m_Line, start, end); LineFeature newLine = m_Line.MakeSubSection(this, id, section); //MapModel.EditingIndex.Add(newLine); return(newLine); }
/// <summary> /// Creates a new <see cref="LineFeature"/> using the session sequence number /// that was previously recorded via a call to <see cref="AddFeatureDescription"/>. /// <para/> /// Only the session sequence number will be used when creating the section (any /// entity type and feature ID that may have been presented through <see cref="AddFeatureDescription"/> /// will be ignored - the values from the parent line will be applied instead). /// </summary> /// <param name="field">The name for the item involved (must refer to information /// previously attached via a call to <see cref="AddFeatureDescription"/>)</param> /// <param name="baseLine">The line that's being subdivided</param> /// <param name="from">The point at the start of the section (not null).</param> /// <param name="to">The point at the end of the section (not null).</param> /// <returns>The created feature (null if a feature description was not previously added)</returns> /// <exception cref="InvalidOperationException">If information for the item has not been /// attached to this factory.</exception> LineFeature MakeSection(DataField field, LineFeature baseLine, PointFeature from, PointFeature to) { IFeature f = FindFeatureDescription(field.ToString()); if (f == null) { throw new InvalidOperationException(); } SectionGeometry section = new SectionGeometry(baseLine, from, to); return(baseLine.MakeSubSection(m_Operation, f.InternalId, section)); }