Forum

Author Topic: Changing Size of Region Does More than That  (Read 4566 times)

reperry

  • Newbie
  • *
  • Posts: 19
    • View Profile
Changing Size of Region Does More than That
« on: February 18, 2016, 01:13:46 AM »
I am trying to reduce the size of the bounding region along one axis. When I use the following code (output included), the bounding region changes along all three dimensions and rotates as well. Can anyone duplicate this behavior? Am I misunderstanding what region.size is?

Code: [Select]
doc = PhotoScan.app.document
chunk = doc.chunks[0]
chunk.region.size
>>> Vector([20.0,20.0,20.0])

newregion = chunk.regionnewregion.size = Photoscan.Vector([20.0,20.0,20.0])
chunk.region = newregion
>>> Vector([20.0,20.0,10.0])

Thanks!

reperry

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Changing Size of Region Does More than That
« Reply #1 on: February 18, 2016, 01:20:28 AM »
Hm, the rotation only happens on the first change of size. (e.g. taking the raw scan output and defining a new bounding region size) After that, the box is always aligned to the coordinate axes. I guess that makes sense.