On 28/07/2018 at 16:27, xxxxxxxx wrote:
Hello,
I'm trying to get the X&Y pixel coordinates of my polygon plane's vertices (as well as their depth). The output dimensions are 4096x2160 pixels (attached). These are the plane's 3D vectors followed by the pixel coordinates I'm looking to get:
# Top Left Corner: (-200,200,0) -> 1493,505
# Top Right Corner: (200,200,0) -> 2458,471
# Bottom Left Corner: (-200,-200,0) -> 1524,1712
# Bottom Right Corner: (200,-200,0) -> 2438,1509
How can I do this in Python? I've tried to use BaseDraw's WC, WC_V, WS, CS methods, but I'm not sure what to do with their results as they are not in pixels.
WC: Vector(-174.873, 181.224, 1288.966) # Top Left Corner
WC then CS: Vector(472.901, 423.506, 1288.966) # Top Left Corner
WS: Vector(472.901, 423.506, 1288.966) # Top Left Corner
WC_V: Vector(-163.448, 174.118, -151.55) # Top Left Corner
CS: Vector(-25959351, -25959394, 0),Vector(25960649, -25959394, 0),Vector(25960649, 25960606, 0),Vector(-25959351, 25960606, 0) # All four vertices
Thank you.