Exemplo n.º 1
0
        /// <summary>
        /// Creates a new solid cone at the specified origin.
        /// </summary>
        /// <param name="origin">Origin at which to create the cone.</param>
        /// <returns>The created cone.</returns>
        public PSSolidCone CreateCone(Point origin)
        {
            PSSolidCone cone = new PSSolidCone(_powerSHAPE, origin);

            Add(cone);
            return(cone);
        }
        internal PSSolidCone(PSAutomation powershape, Point origin) : base(powershape)
        {
            // Clear CreatedItems
            _powerSHAPE.ActiveModel.ClearCreatedItems();

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

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

            _id = newCone.Id;
        }