Hello Alex,
Here's the sample code:
import PhotoScan
doc = PhotoScan.app.document
chunk = doc.chunks[0]
region = chunk.region
T0 = PhotoScan.Matrix.diag((1, 1, 1, 1))
if chunk.transform != None:
T0 = chunk.transform
R0 = region.rot
C0 = region.center
s0 = region.size
C0.size = 4
C0.w = 1
chunk = doc.chunks[1]
if chunk.transform != None:
T = chunk.transform.inv() * T0
else:
T = T0
R = PhotoScan.Matrix( [[T[0,0],T[0,1],T[0,2]], [T[1,0],T[1,1],T[1,2]], [T[2,0],T[2,1],T[2,2]]])
scale = R.row(0).norm()
R = R * (1/scale)
region.rot = R * R0
c = T * C0
c = c / c[3] / 1.
c.size = 3
region.center = c
region.size = s0 * scale / 1.
chunk.region = region
This should work to copy the bounding box from chunk #1 to chunk #2. However, it's important that both of them are either unreferenced or referenced the same coordinate system.