Hello everybody. i am new to programming with UG.
i am writing a program that in one of her steps the user can choose body or component from an assembly.
after i get from the user the selected TaggedObjects i check if they are typeof component or body.
i am trying to get the transform matrix for the component or the body that the user choose.
i saw that for component i can use the - .GetPosition to get the transform matrix, but i can not understand how i can find the transform matrix for bodies. i saw the AskTransformOfOcc function but i do not know if:
1.this the function i need to use for bodies (i did not found any example of this or UF_ASSEM_ask_transform_of_occ functions)
2. if this is the function i need why i get 4X4 matrix and not 3X3 matrix? what is the value in every place in the matrix?
3. is there any other way to get the transform matrix of body?
Many thanks in advance.
Solved! Go to Solution.
Have you installed the NXOpen API documentation, which is mandatory?
Have you checked the C header files in %UGII_BASE_DIR%\UGOPEN, especially the uf_assem.h file, which includes the description of the UF call in question?
Production: NX10.0.3, VERICUT 8.1, FBM, MRL 3.1.7 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 11.4
Development: C (ITK), .NET, Tcl/Tk Testing: NX12.0 | AWC 3.4 Preparing: NX12.0
Employees of the customers, together we are strong
How to Get the Most from Your Signature in the Community
NX Customization - Best Practice Guide
thank for the quick response.
i know the NXOpen API documentation but i did not know that the C header files contain more explanations about the functions.
i found in uf_assem.h description about the transform matrix that i get from UF_ASSEM_ask_transform_of_occ and it solve my problem.
thanks for the help!
Generally, bodies don't have transformations. If you create a cylinder with axis along the vector (1,1,1), then that axis vector is stored as part of the cylinder.
Another approach would to have a cylinder in some "standard" position, and then store a transformation that moves this standard cylinder as desired. But that's not how NX works..