Forum Migration Notice
We're transitioning to a more modern community platform by the end of this year. Learn about the upcoming changes and what to expect.
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.6K RobotStudio
- 401 UpFeed
- 21 Tutorials
- 16 RobotApps
- 306 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.9K Robot Controller
- 366 IRC5
- 86 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 856 RAPID Programming
- 40 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 111 Collaborative Robots
- 5 Job listings