Cancel
Showing results for 
Search instead for 
Did you mean: 

Minimum distance between two components in assembly

Pioneer
Pioneer

Hello everyone,

 

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,

Bala

3 REPLIES 3

Re: Minimum distance between two components in assembly

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

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

Re: Minimum distance between two components in assembly

Siemens Phenom Siemens Phenom
Siemens Phenom

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.

Re: Minimum distance between two components in assembly

Experimenter
Experimenter

 Hello Bala,

 

Goto "Measure Distance" and pick the option "Between component sets"

You can select both component sets one by one then you will get the minimum distance between two component sets.

 

Best Regards,

Ramesh Vakada