compas icon indicating copy to clipboard operation
compas copied to clipboard

Projection.from_plane_and_point

Open romanarust opened this issue 3 years ago • 0 comments

Describe the bug If creating a Projection from a plane and a point Projection.from_plane_and_point(plane, center_of_projection), and the center_of_projection is within the passed plane, then the Projection is invalid.

To Reproduce

>>> plane = Plane( [4, 2, 0], [0, 0, 1])
>>> center = [3, 1, 0]
>>> P = Projection.from_plane_and_point(plane, center)
>>> print(P)
[[    0.0000,    0.0000,   -3.0000,    0.0000],
 [    0.0000,    0.0000,   -1.0000,    0.0000],
 [    0.0000,    0.0000,    0.0000,    0.0000],
 [    0.0000,    0.0000,   -1.0000,    0.0000]]

Expected behavior There is a check if the input is correct and an error is thrown if the center_of_projection is within the plane.

romanarust avatar Mar 09 '22 09:03 romanarust