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

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

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

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

            _id = newSpring.Id;
        }