diff --git a/src/ifcopenshell-python/ifcopenshell/util/placement.py b/src/ifcopenshell-python/ifcopenshell/util/placement.py index 5e161d4f55..10b7e4e9bb 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/placement.py +++ b/src/ifcopenshell-python/ifcopenshell/util/placement.py @@ -20,7 +20,10 @@ import numpy as np def a2p(o, z, x): + x = x / np.linalg.norm(x) + z = z / np.linalg.norm(z) y = np.cross(z, x) + y = y / np.linalg.norm(y) r = np.eye(4) r[:-1, :-1] = x, y, z r[-1, :-1] = o