コード例 #1
0
        /// <summary>
        /// Creates a cone at a specified origin.
        /// </summary>
        /// <param name="origin">The origin at which to create the cone.</param>
        /// <returns>The created cone.</returns>
        /// <remarks></remarks>
        public PSSurfaceCone CreateCone(Geometry.Point origin)
        {
            PSSurfaceCone newCone = new PSSurfaceCone(_powerSHAPE, origin);

            _powerSHAPE.ActiveModel.Surfaces.Add(newCone);
            return(newCone);
        }
コード例 #2
0
        internal PSSurfaceCone(PSAutomation powershape, Point origin) : base(powershape)
        {
            // Clear CreatedItems
            _powerSHAPE.ActiveModel.ClearCreatedItems();

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

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

            _id = newCone.Id;
        }