Hope you all are doing fine. I am trying to get minimum distance between two components when one component is just touching other component. Can anybody suggest how to get the minimum distance using NXopen API?
Also,i am trying to find out the point where one component is just touching the other component. Can anybody suggest how to get the point using NXopen API?
Any help will be greatly appreciated.
Thanks for your support and coordination in advance.
Thanks and regards,
I'd suggest using the .AskMinimumDist3 method, using the 2
components occurrence bodies as input. This method will report the minimum distance along with the point on either object.
Edit: correction based on @SteveLabout's input
That is a good function for what you are trying to do,but you can't actually use the component objects for input. Here is a list from the Open C docs - and even then, you have to look at either of the other ask_minimum_dist functions, because this was not included with the "3" version:
The objects can be:
1. any combination of points, curves, planes, edges, faces or bodies.
2. a faceted body and another faceted body or a solid edge, face
or body or a point
For objects not listed in 1, the error INVALID_ENTITY_TYPE is returned.