2 years ago
#70826
molonepa
Method to clip a plane to a bounding cube in Python
I have an infinite plane in 3D defined by the parameters in the equation Ax + By + Cz = D and I would like to clip it to a bounding cube.
The plane parameters consist of a list of A, B, C, and D and the bounding cube consists of a list of the eight corner points in 3D space. The desired output is the four corner points of the plane after being clipped.
plane_params = [A, B, C, D]
bbox_points = [[x0, y0, z0], ... , [x7, y7, z7]]
plane_corners = clip_to_bounding_box(plane_params, bbox_points)
Can someone provide a Python method for clipping the plane to these bounds which returns the four corner points of the plane or alternatively the mathematical formula for a bounded plane?
Thanks :)
python
3d
point-clouds
0 Answers
Your Answer