/// <summary>
        /// Creates a plane at a specified origin.
        /// </summary>
        /// <param name="origin">The origin at which to create the plane.</param>
        /// <param name="principalPlane">Sets the principal plane. Defines which plane is the principal plane of the workspace.</param>
        /// <returns>The created plane.</returns>
        /// <remarks></remarks>
        public PSSurfacePlane CreatePlane(Geometry.Point origin, Planes principalPlane)
        {
            PSSurfacePlane newPlane = new PSSurfacePlane(_powerSHAPE, origin, principalPlane);

            _powerSHAPE.ActiveModel.Surfaces.Add(newPlane);
            return(newPlane);
        }
        /// <summary>
        /// Creates a plane at a specified origin and sets its length and width.
        /// </summary>
        /// <param name="origin">The origin at which to create the plane.</param>
        /// <param name="principalPlane">Sets the principal plane. Defines which plane is the principal plane of the workspace.</param>
        /// <param name="length">The desired length of the plane.</param>
        /// <param name="width">The desired width of the plane.</param>
        /// <returns>The created plane.</returns>
        /// <remarks></remarks>
        public PSSurfacePlane CreatePlaneWithDimensions(
            Geometry.Point origin,
            Planes principalPlane,
            Geometry.MM length,
            Geometry.MM width)
        {
            PSSurfacePlane newPlane = new PSSurfacePlane(_powerSHAPE, origin, principalPlane, length, width);

            _powerSHAPE.ActiveModel.Surfaces.Add(newPlane);
            return(newPlane);
        }
        /// <summary>
        /// This constructor creates a plane at a specified origin
        /// </summary>
        internal PSSurfacePlane(PSAutomation powershape, Point origin, Planes principalPlane) : base(powershape)
        {
            // Clear CreatedItems
            _powerSHAPE.ActiveModel.ClearCreatedItems();

            // Set the principal plane
            _powerSHAPE.SetActivePlane(principalPlane);

            // Create a plane at the point specified
            _powerSHAPE.DoCommand("CREATE SURFACE PLANE");
            _powerSHAPE.DoCommand(origin.ToString());

            // Get created plane id
            PSSurfacePlane newPlane = (PSSurfacePlane)_powerSHAPE.ActiveModel.CreatedItems[0];

            _id = newPlane.Id;
        }