Universal Coordinates for a Product in Racks

Universal Coordinates for a Product in Racks

zachory_l
Not applicable
265 Views
1 Reply
Message 1 of 2

Universal Coordinates for a Product in Racks

zachory_l
Not applicable

[ FlexSim 19.2.0 ]

I populated boxes into a rack and am trying to extract the x, y, and z coordinates of any box in reference to the model. I have been clicking on the box I want the coordinates from, designating it as "so" and using the function so.as(Object).location.x, but the return value has been the incorrect x-coordinate from what the true location is of the box. Is there a way to do this where I can return the correct x-Coordinate in reference to the model?

0 Likes
Accepted solutions (1)
266 Views
1 Reply
Reply (1)
Message 2 of 2

philboboADSK
Autodesk
Autodesk
Accepted solution

Use Vec3.project():

Object obj = so();
Vec3 modelLoc = obj.location.project(obj.up, model());
return modelLoc.x;


Phil BoBo
Sr. Manager, Software Development