You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it looks like the method does not work for higher dimensions - the point returned has at most 3 dimensions. A quick check can reproduce this behaviour -
from mathutils.geometry import intersect_point_line
import numpy as np
pointA = np.arange(50)
pointB = np.arange(100, 150)
pointC = np.arange(200, 250)
pointD = np.arange(300, 350)
centroids = [pointA, pointB, pointC, pointD]
print(centroids)
for centroid in centroids:
print(intersect_point_line(centroid, centroids[0], centroids[-1]))
The points are 50 dimensional, however, only a 3D point is returned. I am assuming that this is incorrect behaviour and we would need to implement a separate function for higher dimensions. Please let me know if this is correct. Thanks!
The text was updated successfully, but these errors were encountered:
Yeah, this seems like a mistake in Blender.
The expected behavior in their docs mentions nothing about restrictions on the dimensionality of the points as far as I can tell, but in the source code it seems to be hard-coded.
If I remember correctly, for the higher dimensional experiments we created a separate set of functions. Those would probably be the 'multiD' ones.
From the documentation of mathutils.geometry.intersect_point_line the point closest to the given point on a line should be returned.
it looks like the method does not work for higher dimensions - the point returned has at most 3 dimensions. A quick check can reproduce this behaviour -
The points are 50 dimensional, however, only a 3D point is returned. I am assuming that this is incorrect behaviour and we would need to implement a separate function for higher dimensions. Please let me know if this is correct. Thanks!
The text was updated successfully, but these errors were encountered: