import rhinoscriptsyntax as rs
import math
thisView = rs.CurrentView()
thisCPlane = rs.ViewCPlane(thisView, None)
thisCPlaneName = 'TempCPlane'
rs.AddNamedCPlane(thisCPlaneName, thisView)
rs.RotatePlane(thisCPlane, 45, thisCPlane.Xaxis)
rs.ViewCPlane( thisView, thisCPlane )
circle_1 = rs.AddCircle(thisCPlane, 18)
object = rs.AddSphere(thisCPlane, 20)
bbox_world = rs.BoundingBox(object, thisView, True)
box_world = rs.AddBox (bbox_world)
bbox_cplane = rs.BoundingBox(object, thisView, False)
box_cplane = rs.AddBox (bbox_cplane)
rs.RestoreNamedCPlane ( thisCPlaneName, thisView )
rs.DeleteNamedCPlane ( thisCPlaneName )