Setting custom orientation in hyperview
Hi all
I am trying to develop as script in hyperview where i need to set the orientation of the model normal to an element.
Its easier with standard orientation but for any other custom orientation I am not able to find anything.
- I need to find normal of any element in the model.
- find the respective view matrix for that normal
Thanks and Regards
Answers
-
Hello,
You can get element normal by querying with poIQueryCtrl class. If you want to get normal of solid face, you should do it with HyperMesh, not HyperView.
Calculating the view matrix from the normal is indeed right approach you can take but I'm afraid it is a bit difficult and complicated. Another thing you can do is to use SetLookAt method provided by poI3DViewCtrl class, which I think is easier for your case.
Regards
0 -
Hi Akitoguc
Thanks for your help in finding out the element normal but, I couldn't find any command like SetLookAt provided in poI3DViewCtrl class. Can you help me out with any example if possible.
Regards
0 -
Hi Saumya,
The following is example code. You need to add a view 'View 1' in advance. SetLookAt is available in HW v13 or later. Not sure with older versions as I don't have them anymore.
hwi OpenStack hwi GetSessionHandle session_handle session_handle GetProjectHandle project_handle project_handle GetPageHandle page_handle [project_handle GetActivePage] page_handle GetWindowHandle window_handle [page_handle GetActiveWindow] window_handle GetViewControlHandle view_handle view_handle SetLookAt “0 0 0 1 1 1 0 0 1” “View 1” hwi CloseStack
Regards,
0