Yep, that looks fine. Now you can use a trick to compact your code a bit if you wish - it relies on the fact that in python/RhinoCommon, point3d objects have properties and methods associated with them. For example, to get the X coordinate of a point3d, you can simply type pt.X Also, you can perform operations with points, such as adding and subtracting them. Subtracting one point from another results in a vector from the first to the second, adding them results in the addition of the two points’ x, y and z coordinates to produce a new point.

So you can get the X, Y, and Z extents of the bounding box by subtracting bb[0] from bb[6], the x, y and z components of the resulting vector will be the lengths of the bb sides. Similarly, you can get the bb center by adding the two diagonal points and dividing by 2 (i.e. getting the average/mid point between two points).

So your code could look like this:

```
def SetSize(object, newX, newY, newZ):
bb = rs.BoundingBox(object)
dvec=bb[6]-bb[0]
ctr=(bb[0]+bb[6])/2
rs.ScaleObject(object,ctr,[newX/dvec.X,newY/dvec.Y,newZ/dvec.Z])
def AdjustSize(object, dX, dY, dZ):
bb = rs.BoundingBox(object)
dvec=bb[6]-bb[0]
ctr=(bb[0]+bb[6])/2
rs.ScaleObject(object,ctr,[(dvec.X+dX)/dvec.X,(dvec.Y+dY)/dvec.Y,(dvec.Z+dZ)/dvec.Z])
```