Forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - reperry

Pages: 1 [2]
16
Python and Java API / Re: Changing Size of Region Does More than That
« 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.

17
Python and Java API / 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!

18
Python and Java API / Re: Automatic create leveled bounding box
« on: February 18, 2016, 12:42:16 AM »
Thanks for sharing the script! It was hugely helpful in getting me started scripting for Agisoft. I am now modifying it for my own use, but I am confused. I would like to set a different center for the bounding box.

Currently (3dmij's script):
Code: [Select]
mx = (chunk.markers[c1].position + chunk.markers[c2].position + chunk.markers[c3].position + chunk.markers[c4].position) / 4.
mx = PhotoScan.Vector([mx[0], mx[1], mx[2]])
newregion.center = mx

This also works:
Code: [Select]
m2 = chunk.markers[mp0].position
m2 = PhotoScan.Vector([m2[0], m2[1], m2[2]])
newregion.center = m2

But when I try to shift the bounding box along one of the axes by adding a constant to one of the values, I see the box move along a diagonal path in my coordinate system:
Code: [Select]
m2 = chunk.markers[mp0].position
m2 = PhotoScan.Vector([m2[0], m2[1], m2[2]+5])
newregion.center = m2

Are there multiple coordinate systems at work here? It would be really nice if  could shift the bounding box in the coordinate system that is the same as the RGB arrows that show on the screen.

19
Python and Java API / Re: Checking point cloud points inside bounding box
« on: February 18, 2016, 12:37:00 AM »
I'm interested in this question too-- I'm suspecting multiple different coordinate systems at the root of a problem I have too. When I try to slide a bounding box along one axis (with a python script), it moves along all three axes.

Pages: 1 [2]