Fix Clipping divide error (reported in #4057)

This commit is contained in:
Bruno Postle
2023-12-12 22:15:59 +00:00
parent 6bbb509c09
commit 343589f1c0
@@ -78,7 +78,9 @@ class Clipping:
direction = ifc_file.createIfcDirection(self.normal)
normal = np.array(self.normal)
if np.allclose(normal, np.array([0.0, 0.0, 1.0]), atol=1e-2):
if np.allclose(normal, np.array([0.0, 0.0, 1.0]), atol=1e-2) or np.allclose(
normal, np.array([0.0, 0.0, -1.0]), atol=1e-2
):
arbitrary_vector = np.array([0.0, 1.0, 0.0])
else:
arbitrary_vector = np.array([0.0, 0.0, 1.0])