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

Answer: 
A gotcha with the k-means alogrithm is that it is not optimal. That means, it is not sure to find the best solution, as the problem is not convex (for the optimisation).

You may be stuck into local minima, and hence the result of your algorithm depends of your initialization (of your centroids). A good practice in order to find a good minimum is to rerun the algorithm several times with several initializations and keep the best result.

As stated by the others, `random_state` makes the results reproducible and can be useful for debugging
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>