Question: Is there a CAD format, which allows to describe mechanical bonds between objects (axes, joints, springs, etc.) and/or motion of objects ?

Answer: 
Bear in mind that the KMeans function is stochastic (the results may vary even if you run the function with the same inputs' values). Hence, in order to make the results reproducible, you can specify a value for the `random_state` parameter.
random\_state : int, RandomState instance or None, optional, default: None
If int, random\_state is the seed used by the random number generator; If RandomState instance, random\_state is the random number generator; If None, the random number generator is the RandomState instance used by np.random.

See: <http://scikit-learn.org/stable/modules/generated/sklearn.cluster.KMeans.html>