IFC5 Pre-Alpha References
Links
ACCA usBIM.ifc5
The online usBIM.ifc5 tool is available free of charge on request.
buildingSmart IFC5
buildingSMART IFC5 development
Transformation in a projective space
The projective space for the standard 3-d space is a 4-d space where (x, y, z) of the 3-d becomes (x/w, y/w, z/w, w).
Transformations such as translation, rotation and scaling can be represented by matrices and chained by matrix products.
import numpy as np
# 3D translation (X,Y,Z)
t_x = 10
t_y = 0
t_z = 0
# 2D rotation in (X,Y,-) around origin
angle_degrees = 90
angle_radians = np.radians(angle_degrees)
r_cos = np.cos(angle_radians)
r_sin = np.sin(angle_radians)
# 3D scaling in (Y,Y,Z)
s_x = 1.0
s_y = 1.0
s_z = 1.0
# matrices
matrix_translation = np.array(
[[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[t_x, t_y, t_z, 1]])
matrix_rotation = np.array([
[r_cos, -r_sin, 0, 0],
[r_sin, r_cos, 0, 0],
[0, 0, 1, 0],
[0, 0, 0, 1]])
matrix_scaling = np.array([
[s_x, 0, 0, 0],
[0, s_y, 0, 0],
[0, 0, s_z, 0],
[0, 0, 0, 1]])
# transformation
matrix_transform = matrix_scaling @ matrix_rotation @ matrix_translation
matrix_transform_list = matrix_transform.tolist()
print(f'matrix_transform_list:\n{matrix_transform_list}')
[[6.123233995736766e-17, -1.0, 0.0, 0.0],[1.0, 6.123233995736766e-17, 0.0, 0.0],[0.0, 0.0, 1.0, 0.0],[10.0, 0.0, 0.0, 1.0]]