mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Fix Clipping divide error (reported in #4057)
This commit is contained in:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user