Help with applying transforms to a normal
Kevin
✭✭
in RobotStudio
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
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
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 786 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings