/// <summary> Translate copy group to level. </summary>
        ///
        /// <param name="mask">  The mask. </param>
        /// <param name="level"> The level. </param>
        public static void TranslateCopyGroupToLevel(QuickMaskType mask, int level)
        {
            // Make sure nothing is already selected
            SelectionManager.UnselectAllGeometry();

            // Set the mask
            SelectionManager.SelectGeometryByMask(mask);

            // Group on result
            var result = new GroupSelectionMask(false, true);

            // Translate in place
            if (!GeometryManipulationManager.TranslateGeometry(new Point3D {
                x = 0, y = 0, z = 0
            }, new Point3D {
                x = 0, y = 0, z = 0
            }, ViewManager.CPlane, ViewManager.CPlane, true))
            {
                return;
            }

            // Move the grouped result to the level
            GeometryManipulationManager.MoveGroupGeometryToLevel(result, level);

            LevelsManager.SetLevelName(level, "Created via API");

            GraphicsManager.ClearColors(new GroupSelectionMask());

            // Hide all other levels
            HideLevels(level);
        }
        /// <summary> Move geometry. </summary>
        ///
        /// <param name="mask">  The mask. </param>
        /// <param name="level"> The level. </param>
        ///
        /// <returns> An int. </returns>
        public static int MoveGeometry(QuickMaskType mask, int level)
        {
            // Make sure nothing is already selected
            SelectionManager.UnselectAllGeometry();

            // Select all lines to move
            SelectionManager.SelectGeometryByMask(mask);

            return(GeometryManipulationManager.MoveSelectedGeometryToLevel(level, true));
        }
        /// <summary> Copies the geometry. </summary>
        ///
        /// <param name="mask">  The mask. </param>
        /// <param name="level"> The level. </param>
        ///
        /// <returns> An int. </returns>
        public static int CopyGeometry(QuickMaskType mask, int level)
        {
            SelectionManager.UnselectAllGeometry();

            SelectionManager.SelectGeometryByMask(mask);

            LevelsManager.SetLevelName(level, "Copied geometry via API");

            var result = GeometryManipulationManager.CopySelectedGeometryToLevel(level, true);

            GraphicsManager.ClearColors(new GroupSelectionMask());

            HideLevels(level);

            return(result);
        }