/// <summary>
        /// Creates a spring at a specified origin.
        /// </summary>
        /// <param name="origin">The origin at which to create the spring.</param>
        /// <returns>The created spring.</returns>
        /// <remarks></remarks>
        public PSSurfaceSpring CreateSpring(Geometry.Point origin)
        {
            PSSurfaceSpring newSpring = new PSSurfaceSpring(_powerSHAPE, origin);

            _powerSHAPE.ActiveModel.Surfaces.Add(newSpring);
            return(newSpring);
        }
Esempio n. 2
0
        internal PSSurfaceSpring(PSAutomation powershape, Point origin) : base(powershape)
        {
            // Clear CreatedItems
            _powerSHAPE.ActiveModel.ClearCreatedItems();

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

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

            _id = newSpring.Id;
        }