compas-dev / compas-dev/compas
Projection.from_plane_and_point
- Dominant language
- Python
- Stars
- 386
- Forks
- 122
- Avg merge
- 11d 46m
- Merged PRs (30d)
- 1
Description
**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.
Contributor guide
Assessment
This issue has not been assessed yet.