RobotStudio event

Help with applying transforms to a normal

Options
I have a part located at the world origin with a Face 'face'.

I use: [code]face.GetNormalToSurface(testPoint, out hitPoint, out hitPointNormal)[/code] to find the normal through the surface from testPoint.

I then use: [code]Body normalLine = Body.CreateLine(testPoint, testPoint + hitPointNormal);[/code] to draw the normal. This appears to work OK.

I then start again, but first set the position of the part to 50,50,0 and the orientation to 0,0,45 with respect to the world coordinate frame. After executing the same code, normalLine is incorrectly drawn (it is not at 90 degrees to the face).

I think I need to transform hitPointNormal to match the movement of the part, but am unsure how to do this.

Thanks,

Kevin