![RobotStudio event](https://new.abb.com/images/librariesprovider89/default-album/rs_webinar_invitation_2025_2.jpg)
Help with applying transforms to a normal
![Kevin](https://secure.gravatar.com/avatar/7261ac966558d2e27e79de3028c86d3c/?default=https%3A%2F%2Fus.v-cdn.net%2F5020483%2Fuploads%2Fdefaultavatar%2FK2266OAKOLNC.jpg&rating=g&size=200)
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
- 398 UpFeed
- 19 Tutorials
- 13 RobotApps
- 299 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 323 IRC5
- 63 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 812 RAPID Programming
- 5 AppStudio
- 3 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings