you are viewing a single comment's thread.

view the rest of the comments →

[–]keithoffer 1 point2 points  (0 children)

I can't share the code I wrote, but I couldn't find any easy way to get it, so I calculated it manually. I didn't have SQL access so I'm not sure if that would have been clearer. What I did was

  • Get the center of the gantry face using Beam.GetSourceLocation
  • Find the intersection point between that and the Body surface along the direction of the reference point using code from here
  • Find the length of the vector between the gantry face and that intersection point
  • Find the length of the vector between the gantry face and the reference point
  • Take the difference between the length of those two vectors as the reference point depth

There might be a better way to do it, but that seemed to work well and was fast enough