예제 #1
0
        /// <summary>
        /// Saves a new edit that defines an alternate face for a previously subdivided line.
        /// </summary>
        /// <param name="firstSide">The edit that initially subdivided the line.</param>
        /// <param name="altFace">The definition of the alternate face</param>
        void AddOtherSide(LineSubdivisionOperation firstSide, LineSubdivisionFace altFace)
        {
            try
            {
                LineSubdivisionOperation op = new LineSubdivisionOperation(firstSide.Parent, altFace.ObservedLengths, altFace.IsEntryFromEnd);
                op.OtherSide = firstSide;
                op.Execute();
                firstSide.OtherSide = op;
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.StackTrace, ex.Message);
            }
        }
예제 #2
0
        internal void Save()
        {
            // Return if we do not have at least 2 distances
            if (m_Distances.Count < 2)
            {
                MessageBox.Show("At least two distances must be specified.");
                return;
            }

            // Subdivide the line...
            LineSubdivisionOperation op = null;

            try
            {
                Distance[] distances = GetDistances();
                op = new LineSubdivisionOperation(m_Line, distances, !m_FromStart);
                op.Execute();
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.StackTrace, ex.Message);
            }
        }