from Part.Shape import Sphere sphere = Sphere() sphere.Radius = 10.0 sphere.Placement.Base = (0, 0, 0)
from Part.Shape import Cylinder cylinder = Cylinder() cylinder.Radius = 5.0 cylinder.Height = 10.0 cylinder.Placement.Base = (0, 0, 0)In this example, we import the Cylinder module from Part.Shape. Then we create a new cylinder object and set its radius to 5.0 and height to 10.0. Finally, we set the position of the cylinder using its Placement attribute. Package library: Part Shape