homogenize_and_flatten_frames_numpy
- compas.geometry.homogenize_and_flatten_frames_numpy(frames)[source]
Homogenize a list of frames and flatten the 3D list into a 2D list using numpy.
- Parameters:
- framesarray_like[[point, vector, vector]]
The input frames.
- Returns:
- (N x 3, 4) ndarray
An array of points and vectors.
Examples
>>> from compas.geometry import Frame >>> frames = [Frame((1, 1, 1), (0, 1, 0), (1, 0, 0))] >>> res = homogenize_and_flatten_frames_numpy(frames) >>> np.allclose(res, [[1.0, 1.0, 1.0, 1.0], [0.0, 1.0, 0.0, 0.0], [1.0, -0.0, 0.0, 0.0]]) True