Method for computing the distance between two parallel planes?
CristianoPizzamiglio opened this issue · 2 comments
CristianoPizzamiglio commented
Hi! I hope everything's ok!
scikit-spatial
already provides all the tools necessary to compute the distance between two parallel planes. However, I was thinking about adding a method to the Plane
class to directly compute such a distance. It's just about having a quicker way for doing it.
Does it sound pointless to you? If it doesn't, I will take care of the PR and the method's signature could be something like the following one:
def distance(self, other: Plane) -> np.float64:
"""
Return the distance to another parallel plane.
Parameters
----------
other : Plane
Other parallel plane.
Returns
-------
np.float64
Distance between the planes.
Raises
------
ValueError
If planes are not parallel.
"""
...
Thanks!
ajhynes7 commented
Hi Cristiano,
I don't see much value in adding this method because it only works for parallel planes. If I had two parallel planes and I wanted the distance between them, I could just do this:
plane_a.distance_point(plane_b.point)
CristianoPizzamiglio commented
Hi!
Yeah, that's for sure. I understand your point of view.
Thanks!