Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Siemens PLM Community
- NX Customization and Programming
- NX Programming & Customization Forum
- Get point coordinates of an endpoint of a line aft...

Options

- Start Article
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Get point coordinates of an endpoint of a line after rotating it through an angle

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-19-2018 03:38 AM

Hello,

It's more of a maths doubt rather then a NX doubt. Does anyone knows if there's a formula through which we can get the coordinates of an endpoint of a line after it is rotated through an angle. The below attached pic will help you in understanding the question better

If we take an example as per the above picture, I know point coordinates at X,Y,Z and I also know the angle (12 deg in this case), the starting point of the line is (0,0,0). Having this information is there a formula through which I can find out point coordinates i.e X1, Y1, Z1 ?

3 REPLIES 3

Re: Get point coordinates of an endpoint of a line after rotating it through an angle

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-19-2018 03:59 AM

Why not just ask the line for its end points?

Lenovo ThinkPad W540, Win7, 16GB.Developing in: Java | C | KFProduction:[NX8.5.3.3 MP11 64bit]Testing:[NX12.0.2 MP1]

Re: Get point coordinates of an endpoint of a line after rotating it through an angle

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-19-2018 04:10 AM

I have drawn two lines only for reference in the pitcture. I have line (0,0,0) - (x,y,z) with me and I also have the angle through which this line has to be rotated. And after the rotation I have the line (0,0,0) - (x1,y1,z1) with me and I want to the (x1,y1,z1) coordinates.

I do not if theres a rotation function available in NX with which I can rotate the line and then get its end point.

I would like to avoid creating geometry to determine the coordinates of (x1,y1,z1). So I want to know if there's a mathematical solution for this problem.

Hope I was able to explain the problem clearly.

Re: Get point coordinates of an endpoint of a line after rotating it through an angle

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

07-19-2018 06:23 AM

The mathematical solution is the rotation matrix

https://en.wikipedia.org/wiki/Rotation_matrix

Nikolas Losse | Developer | Siemens PG PR R&D TEC

NX12 | CentOS7 | Python

NX12 | CentOS7 | Python

Follow Siemens PLM Software

© 2019 Siemens Product Lifecycle Management Software Inc