/// <summary> /// Creates a new solid sphere at the specified origin and radius. /// </summary> /// <param name="origin">Origin at which to create the sphere.</param> /// <param name="radius">Radius of the sphere.</param> /// <returns>The created sphere.</returns> public PSSolidSphere CreateSphere(Point origin, MM radius) { PSSolidSphere sphere = new PSSolidSphere(_powerSHAPE, origin); sphere.Radius = radius; Add(sphere); return(sphere); }
internal PSSolidSphere(PSAutomation powershape, Point origin) : base(powershape) { // Clear CreatedItems _powerSHAPE.ActiveModel.ClearCreatedItems(); // Create a plane at the point specified _powerSHAPE.DoCommand("CREATE SOLID SPHERE"); _powerSHAPE.DoCommand(origin.ToString()); // Get created plane id PSSolidSphere newSphere = (PSSolidSphere)_powerSHAPE.ActiveModel.CreatedItems[0]; _id = newSphere.Id; }