mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 01:07:59 +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)
|
direction = ifc_file.createIfcDirection(self.normal)
|
||||||
|
|
||||||
normal = np.array(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])
|
arbitrary_vector = np.array([0.0, 1.0, 0.0])
|
||||||
else:
|
else:
|
||||||
arbitrary_vector = np.array([0.0, 0.0, 1.0])
|
arbitrary_vector = np.array([0.0, 0.0, 1.0])
|
||||||
|
|||||||
Reference in New Issue
Block a user