mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
See #4832. Use shape.transformation.matrix in v0.8.0
This commit is contained in:
@@ -158,8 +158,7 @@ def get_shape_matrix(shape) -> MatrixType:
|
||||
:return: A 4x4 numpy array representing the transformation matrix
|
||||
:rtype: MatrixType
|
||||
"""
|
||||
m = shape.transformation.matrix.data
|
||||
return np.array(([m[0], m[3], m[6], m[9]], [m[1], m[4], m[7], m[10]], [m[2], m[5], m[8], m[11]], [0, 0, 0, 1]))
|
||||
return np.array(shape.transformation.matrix).reshape((4, 4), order="F")
|
||||
|
||||
|
||||
def get_bbox_centroid(geometry) -> tuple[float, float, float]:
|
||||
|
||||
Reference in New Issue
Block a user