Hello, I have a problem with converting Tscript Expressions to python.
What is equivalent of $BBY, $BBY, $BBZ in python language?
How could i access bounding boxes in python?
Thank you.
hi faraz
im not infront pc but
if you are in sop context then:
docs.derivative.ca/SOP_Class
docs.derivative.ca/Position_Class
for example for the max point
inputs[0].max.x
if in geometery comp context then :
docs.derivative.ca/GeometryCOMP_Class
computeBounds
hope it will help
B.
Thank you, but i couldn’t find any reference about bounding box. I have read all this pages but nothing about bounding box variables in python.
It is, for example in the second link barakooda sent:
a=op(‘/project1/geo1’).computeBounds()
print(a.minx)
In the SOP context the equivalent is
op(“someSop”).min.x
For both approaches you can get min/max positions of the bounding box per axis, and it’s size and center
We’ve actually streamlined this.
For operators that supported $BBX/Y/Z use:
me.inputPoint.normP.x / y /z
docs.derivative.ca/InputPoint_Class
Cheers,
Rob.
Thank you so much, my problem has solved.