Help with applying transforms to a normal
Options
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.4K RobotStudio
- 384 UpFeed
- 14 Tutorials
- 12 RobotApps
- 291 PowerPacs
- 406 RobotStudio S4
- 1.8K Developer Tools
- 247 ScreenMaker
- 2.7K Robot Controller
- 279 IRC5
- 46 OmniCore
- 6 RCS (Realistic Controller Simulation)
- 3 RobotStudio AR Viewer
- 736 RAPID Programming
- 15 Wizard Easy Programming
- 105 Collaborative Robots
- 3 Job listings