Measure the minimum distance

Hello! Ladies and gentlemen,

Is there a method or Python add-on to help measure the minimum distance between two components?

Hi tangtang,
Not that I know of.
Would it be sufficient to just do a simple calculation with vcNode.PositionMatrix and vcNode.BoundDiagonal?
For a more detailed solution, you could probably loop over the GeometrySets.

app = getApplication()
conveyor2 = app.findComponent(‘Conveyor #2’)
conveyor3 = app.findComponent(‘Conveyor #3’)
return_tuple = conveyor2.measureDistance(conveyor2, conveyor3)
distance = return_tuple
print distance[0]

2 Likes

MeasureMinDistance.zip (1.9 KB)
Tested version:4.7


Get it!

Thank you!

Have a nice day!